How to Swap VRoid VRM textures with blendshapes in Unity
Vložit
- čas přidán 5. 09. 2020
- Seventh part of my VRoid tutorials. This time I'll be showing you my original technique of swapping textures with blendshapes
EDIT You should set the blendshape to "Is binary" instead of using the transition functionality of a tracker. This allows compatibility with all trackers whether they support instant transitions or not.
Make sure to check the previous tutorials on how to setup your Unity project for VRM file loading:
• How to Change outline ...
If you end up using these techniques I'd love to see them so don't be afraid to @ me in twitter~
𝐒𝐎𝐂𝐈𝐀𝐋𝐒 𝐓𝐎 𝐅𝐎𝐋𝐋𝐎𝐖:
🐦 Twitter: / suvidriel
🎮 Twitch: / suvidriel
💬 Discord: / discord
#VTuber #ENVtuber #vroid
Music:
Flying High by FREDJI / fredjimusic
/ fredjimusic
Music promoted by Audio Library • Flying High - FREDJI (...
Short Trip by Roa / roa_music1031
Creative Commons - Attribution 3.0 Unported - CC BY 3.0
Free Download / Stream: bit.ly/roa-music-short-trip
Music promoted by Audio Library • Short Trip - Roa (No C...
Intro:
Track: Phantom Sage - Our Lives Past (feat. Emily Stiles) [NCS Release]
Music provided by NoCopyrightSounds.
Watch: • Phantom Sage - Our Liv...
Free Download / Stream: ncs.io/OurLivesPastYO
Art in the painting by:
/ aicandii
/ nesimoonheart
/ tiuuie
/ lucycandy19
/ 2wintails
/ _kiyou__
Wow this is exactly what I was looking for! Thank you for being so helpful and creating these tutorials!
Oh wowza! I had no idea you could make a new blend shape / emotion face nor did I know this was possible :o Thank you so much!!!
My mind is blown. I've been struggling with hair blendshapes. Thank you so much for making this!
Just what I was looking for. Thank you, this helped me a lot.
Thank you for helping Stella with this!
Hey suvi, thanks for the refresher
Exactly what I needed and worked like a charm, thanks so much!
How did I not find this until now?! Thank you so much Suvi!!!! Since the VRoid Stable update, my initial way of doing blush and tears has since become troublesome (I would use separate hair files). This saves me so much more time!
Thank you for the tutorial, going to give it a try!!
i found it really usefull, as i couldn't find any way to do this by myself i just duplicated the face and added there just the blush and place it with a bit of off setin front of the actual face, it works but it is way more efficient to do it like you said
This was so helpful, tysm
Thanks so much for this! This is amazing!
Two days ago I worked this out by experimenting. Today I discovered you documented how to do this MONTHS ago. Subscribed now ;-)
Thank you so much for this tutorial!!!
Thank you for these tutorials. You helped me a lot ^_^ also I really love your accent
Thank you so much! This was a very good and straight forward tutorial! Immediate subscribe!
I swear you are the only person on CZcams who has made this tutorial. Thank you!!
It's an old gamedev trick I learned years ago when working on some game projects
Thank you very much ! It helps me a lot!!
Thank you so much!
Thank you, I had to sub. Plan to do my own and know absolutely nothing after buying 2 avatars from people.. :o Thanks again!
oooooo Okay this is going to be interesting to play with, especially if other objects can be swapped out too.
Yea you can adjust texture coordinates of all the materials so even those of accessories as long as your accessory is using the MToon-shader. If you use Unity default shader then you can adjust whatever properties that shader offers - can't remember if it had texture coordinates
THANK YOU THANK YOU THANK YOU AHHHHHHH
Thank you for the tutorial! Can you do these for the eye textures too?
Yes you can~ Just make sure to use the "Is Binary"-checkbox in blendshape settings to make the transition instant.
would it be possible to have a tatoo that is basically a number that counts up with every button press?
Thank you for this tutorial! I am having an issue however with it nowadays when trying to make an alternate outfit where the new blendshapes do not show up in VseeFace? Maybe it's because I made the model with the stable Vroid release instead of the Beta?? IDK. Can anyone help pls? Thank you in advance!
Amazing tutorial thank you so much, could you please make a tutorial on how to do the same thing in blender? or show us how to swap between meshes with blendshapes/shape keys? (like the same model but taller or modified both exported from vroid)thank you very much keep up the good work
Changing the height of the model with shape keys likely will not give too great results as shape keys do not move around the bones- only the vertices
Shape keys also do not move texture coordinates so if you wanted to make changes to the face using shape keys you'd need to create duplicated geometry and move those into view - take a look at the "Extra"-shape key of vroid base female model as that moves the crossed eye-layer from inside the head to the front of the eyes
Suvi, what would I do if I'm trying to blendshape clothes with different templates? For example, I'm trying to do this technique but for 2 hoodies, 1 inner top, and a dress.
Thank you for this tutorial!!
I was wondering, could use this method to create different mouth expressions and then make it trackable?
Depends on the tracker you're using. In VSeeFace you can override the default expressions with custom ones if you want to track them - alternatively you can always use hotkeys. However, lipsync can be a bit problematic since it'll try to merge multiple blendshapes
@@Suvidriel I see! Thank you for the info!
I'll be trying this out to see if it'll convert to mmd as well as the regular expressions do
This is a very vrm-specific mechanic so likely will not convert to mmd
What are the advantages of your custom mtoon shader over this? I want to add extra extra face textures but I'm thinking of using this method so that I can potentially use the other face textures in apps other than vseeface.
The only advantage really is that this works with vrm-compatible apps while the other one works only with vseeface, vrchat and custom unity solutions. This method only supports instant texture swap so no smoothing at all.
Hey Suvi! Awesome tutorial as always!
I do have a question regarding exporting, though. I don't have the "base", if that's the right term. You know, skin-colored layered. When I export, it exports completely transparent(and the lines I drew on VRoid) and that's it. I noticed this while creating my character a few months ago while exporting for some clothing adjustment. It wasn't that big of a deal, but in this format, I kinda feel like it does, especially in Photoshop, I can only copy the non-transparent space. How can I fix that?
When you export your model as vrm it should combine all the face layers into one merged texture. You'll get access to it when you import the vrm to unity
@@Suvidriel Okay, I'll try it in a few minutes. Thank you much for the quick response!
❤❤❤❤
3:09
Is the limit on how many customizable expressions you can do only up to four?
Nope. Unity supports up to 8k textures. You can even fit in more if you lower the quality of each face
Is there a way to make swapping textures like you did with the face (I plan on eye color) as a shape key using blender? There is a certain program I use my VRoid model in but only shape keys show up not blendshapes. Thank you again for another awesome tutorial!
Sadly uv-maps don't seem to be affected by shape keys.
One alternative is to have geometry scaled down inside the head and in shape key move it to the correct spot. This is how the extra-shape key is done for vroid default models.
@@Suvidriel That’s actually a really good idea to move it out kinda like you did with the tongue shape key tutorial. I’m still very new to blender so I’m not sure how to copy the eye part with a different texture. I understand how to move it out and make it a shape key though. Would the eye still track with the texture on it or would it stay in the same spot then if the eye moves it looks like I have two eye irises on one eye?
@@chickishot8172 Hmm haven't tried tbh. I think there may be eye-bones so copying the weights might do it
@@Suvidriel I do believe there are eye bones, but a little confused about copying the weights over. Haven’t really messed with weights except for the plugin for unity that allows for bones and the weight of bones to be transferred from one body part to another. Also not sure if that would allow it to follow the eyes or not if I did do that. Thank you for the advice though. 🙂
@@chickishot8172 The weights need to be done in Blender. It may be possible to copy the current eye geometry and retain the weights too - haven't tested. Even if it wasn't the weight painting of the copied eyes should be relatively simple.
this was nice and easy explained :D i could finish some angry expression very fast....im lacking into those coordinates....i've found the first face of my cube but i cannto find the rest of them ._. any tips?
basically divide 1 by the amount of textures on the axis to find the size of each texture. That's how much to add to the offset for each texture so for a 4x4 texture the size is 0.25 so the third texture would be at 0.5
This sounds logic 🤦♀️ Thx for answering ❤️ Gonna try it out after work. 😊
is there a way to stop the quality from lowering? I did this method for the body texture on my model but the texture get's blurrier :')
Try adjusting the texture's size and compression settings in Unity
@@Suvidriel AH tysm! that's better! I have it on 'none' and it helped but the texture is still smoother than it was previously when it was a singular texture/has a different look to it than it did when it was a single texture ? so idk how I'd fix that- :')) aaa-
would it be the same thing with eyes? i see some people toggle the eyes of their vroid to have stars.
Yes you can. Check some of the previous comments about it if you need more help :) I'd recommend vseeface sdk and the modified mtoon shader from one of the newer tutorials though.
so I've been using this method for a while now, but just tried applying it to my whole body texture to swap out a lingerie tex. It works fine in unity, but when exported the texture swap doesn't work? any suggestions?
It might be a bit tricky to use it for the full body tbh. I'd almost recommend using a shader like poiyomi and then combining it with VSFAvatar-format as you can animate material swaps with that
Is there a way to do this with the eyes since the eyes are in a different size
Same thing applies.
So I followed the tutorial and it works as intended however, I want to get rid of the transitions completely because I can still see the texture shifting even with VSeeFace transtions set to 0. Is there a way to make it so blendshapes take no transtiion time in Unity?
You can set the is binary-flag on for the blendshape
TYSM!!!! Its exactly how I wanted it! You are amazing!
is it possible to do this for eye and face textures at the same time? so for the yandere face for example the eyes would go dull as well at the same time?
yes you can add multiple materials in the blendshape clip
@@Suvidriel Would you go about it the same way then?
2 thanks, one day
im sorry if im stupid but is there a way to do this but with the use of a blender model?
Depends entirely on how the face is textured. If the face is in its own texture then you should be able to follow this tutorial just fine. You'd just need to draw the additional face textures in either blender or in photoshop instead of vroid.
If, however, the face texture is already part of a texture atlas then it may get trickier or even very difficult due to the already big size of the texture atlas image.
Ahhh I need help! One of the coordinates don't seem to be working. Which direction should I add more expressions if I want more than 4?
Either of them works but remember that the max is always 1 so if you have 4 textures in a row then each coordinate is 0.25 instead of 0.5 etc
@@Suvidriel I have it with 4 horizontal, 2 vertical now and I've been able to make that work! But with 4x4 I was not able to get the expressions from the second row :/ Thank you for replying!
i dont understtand for some reason ALL my faces are the same face with the toggle expression i think i did something wrong ;(
You can do this with the eyes right? I know you said at the end it's the same I'm just confused haha
You can. However, if you're using VSeeFace I recommend you use the custom MToon shader from my latest tutorial instead
can you do this but with maybe eyes? like if I wanted to make an expression that was making an 'XD" face, how would I do that? I am also using a male model, so I am unable to edit the blendshapes to find the hidden extra eye expression that comes with the female models. I am at a loss of how I can do this facial expression without having to scrap my male model and remake him as a girl.
it might be easier to add overlaying plane on top of the eyes if you want to add the XD-face
@@Suvidriel how would I be able to do that? what's an overlaying plane?
@@crymouse You could either model one in blender or add a quad in unity and place it in front of the eyes with that X-texture
@@Suvidriel is there anyway I could get the texture from the female model? VRoid has the exact eyes I want but they’re only available for female models. I tried to see if I could copy the blend shape but it didn’t work as I thought it would.
@@crymouse The eyes are done using a quad that moves in front of the eyes. The male model is completely missing the shape keys (possibly even the geometry) for the movement so it's not possible to copy the blendshape
Do you have a tutorial on using this method to swap clothes?
If the clothes are just different textures for the same outfit model then you can use the exact same method
@@Suvidriel How about models?
@@Blockistium For models you could use the vearDresser tutorial to add multiple different outfit models. Then just use alpha to show/hide clothes in the blendshapes
@@Suvidriel What would you do if the outfit models are different?
@@hugesoxfan50 You could build all the outfits on same avatar and swap visibility or wait until my new vtuber app gets released as it has model swap function
Thank you. Very wonderful tutorial. Unfortunately setting a blendshape to binary in programs that don't have transition settings makes the transition instant, meaning that other features like the brows, eyes and mouth teleport to a new location and look buggy )=
That's true. The alternative is to do 2 blendshapes. One for the texture swap and another for the parts that need to be smooth. However, then you need to use 2 hotkeys in the tracker
I hacked the MToon shader in UniVRM and got blends to work so you can fade between two textures. Only took a few lines of code. But it would not work in other apps, just Unity. The approach above should work in any VRM compatible app.
@@XOrdinary99 Custom shaders with some lerp should work well but you'll need a tracker that supports it. VSeeFace will be getting this support at some point
@@Suvidriel I am not a VTuber - I am exploring using Unity and VRoid to create an animated comic. But it would be great if there was a standard way to do this in the future. I look forward to that video!
would you be able to use this technique for swapping outfits on one model in vrchat? o3o
Well you could if you were to animate the texture coordinate movement but tbh I'd probably use poiyomi-shader's dissolve-effect instead to create a nicely animated transition between 2 outfit textures.
However, if you need more than 2 then I did release a modified mtoon-shader that might work with vrchat too and supports 4 textures atm. No nice dissolve effects with that tho
how do you do it on eye texture?
Same way pretty much. The eye texture has different dimensions but it works the same so double the canvas size etc
@@Suvidriel Will it be possible to have it a tutorial? Tried looking else where and no one can do it.. I tried your advice its just its kinda hard to measure :((
@@Suvidriel tnx for the reply tho
@@Kaithew If you're using VSeeFace I'd almost recommend checking the multitexture shader tutorial I did last year. It allows smooth transition between different textures
@@Suvidriel Yes I do! I'm gonna check it out!
You can do this with eyes but it's has a bit more steps
Tbh these days you should use a shader that supports smooth transition of textures and then just use the vsfavatar-format instead
Good tutorial. But the epic music overpowered your voice
Thanks. There's a bit more updated tutorial about this topic which does it using shaders. If you're using VSeeFace I recommend checking that one out instead.
Me salio blanca la cara :(
2.49 the texture makes me laugh
You say you can swap out the clothes? With MATERIAL? but how? it's a mesh. Can you change MESHES with expressions? Oh? Blendshape an entire outfit?!
There are few ways. If your clothes are using the same mesh template, say vroid's dress, then you can simply swap the texture around for a new outfit.
If you want to try something hackier you can actually duplicate the body-node in unity, assign a different outfit mesh and then swap those around with blendshape clips (works with univrm 0.62 but not really with newer ones), although I'd highly recommend vseeface avatars format instead of vrm at that point since then you can animate the active-state of the clothes and thus prevent them from rendering at all
I have the volume all the way up!... and i can still barely hear what you are saying.
there is way too much info or explanation you are leaving out between steps
so telling people to go watch other videos for most of the required info for this tutorial
makes no sense
The other video I'm refering to was basically showing how to create a new Unity project and drag in the UniVRM asset package. Detailing that specific step in every video would make these tutorials sadly a bit too long and repetitive. The video in question is linked in the description.
This is a more advanced tutorial so I highly recommend you check out the earlier parts in the series first if you're new to Unity to familiarize yourself with the tools.
The other video is the base info that you need in order to understand this video so yes, it does make sense. I started learning this stuff 2 days ago and i understand what they are saying, just need to rewind the video sometimes because of me being new to unity and 3d in general. Also the volume is just fine, i really don't know what you're complaining about but these all seem your issues of not wanting to learn a program in order. They did a great job with the video. Go learn a bit more about unity and VRM and then come back, it will make sense.