VRChat - Importing an MMD to VRChat Megatutorial!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to yet another VR chat video tutorial this one is going to be a little bit different I'm not going to be covering a singular subject like with a se optimization video or with a cat splinter tools video this is going to be kind of a mega video of sorts so I forgive the probably pretty scary lengths here I'm going to be covering the entire process of bringing it MMD from the MMD format into blender performing decimation fixing the armature doing texture atlas aang merging bones for use with dynamic bones heading up root bones for dynamic bones exporting to FBX for use in unity then setting the avatar up for use in VR chat by way of the avatar descriptor component and then also adding in some dynamic bones just for an example depending on exactly how much I can manage to squeeze in here I may also put in a very short bit on an animation override just for a simple little face shape I will also have another video up soon that will cover that in much more detail but let's go ahead and get into just the beginning here this is gonna be split up kind of into chapters there should be timestamps below the video with a section on each that shows basically the different sections you can skip to so if you only have a question or you want to see a specific part of it just skip to it there so this process is going to be up to date as of the end of December 2017 it may change in the future depending on what new new tools come out or if the process changes due to changes in VR chat itself so let's go ahead and move on let's switch here the first thing I'm going to show you here is kind of the text version of a guide that I made on the steam guides forum if you go to VR chat in steam and you click on guides you can actually find this in the listing there it has all of my current videos and things like that but that's not really important what's important is I'm going to use this as kind of an overview for the tools that you use and also what exactly in d is but you may or may not know coming into this an MMD is a model payal used by a program called Miku Miku dance it's used for like anime music videos and dances and stuff like that there's tons of these models all over the internet and moreover there are some resources to get extremely high quality models from the internet you can get them from deviantART as well they tend to be a little bit lower quality much higher poly count things like that however it is still a good source so if you want to go through this and read a little bit more about it I would encourage you to do so this is a little bit more detailed than I'm doing here there will be one thing they'll go over in detail here that's also here respect the rules with MMD models because VR chat is growing a literally exponential rate it's it's becoming I guess more prevalent on the internet for and and more well-known that a lot of us are using MMD models for our avatars in VR chat and some of the models may not permit that they may specifically say in some cases that I've seen that you are not permitted to use the avatar VR chat if you have a question about it you can always attempt to contact the author at least make best efforts in that case in my particular case I managed to find my MMD author for my children though that I've used as my avatar and VR chat I contacted him on Twitter literally just using Google Translate because I don't know Japanese and they don't know English and I explained the use as best as I could and they were happy to give me the model and rather to let me use it in VR chat and as far as the licensing from the game goes Toho's licensing is pretty open for dojin works for fan works so thankfully I'm probably okay on that front if we start violating these rules on a wide I guess a a more a more prevalent kind of way if it shows up more often then these artists aren't going to be releasing their models publicly as much as we want in the future we really like their art obviously because we're using it them as our avatars please try and respect the rules within the best of your ability so anyways let's skip ahead here let's go down to the required tools there are some tools that you're going to need to import a custom avatar and there's several required ones first off is unity five point six point three P 1 this is the current version as of its I know it says November here but it's also as of December 2017 there are no plans currently to move on to a new branch of unity just yet but it will happen in the future blender 2.79 these are all links here I'll provide a link to this guide in the description so you can just scroll down to it and also I'll keep this up to date as it changes you'll need a blender script called MMD tools and I'm gonna have a direct link to the zip file here but I'm gonna show you the actual the way to find this branch power opiez branch and which version you should download I'll do that in a moment you'll obviously need the VR chat SDK which will require a VR chat dotnet account which you need anyways this is actually how you through unity upload your avatar to the VR chat server and finally I this used to be a recommended it is never required cats blender plug-in is an amazing plugin made by several members of the VR chat community but namely give me your cats and ho talks it is it it used to be a ridiculous effort to bring in your first model because every single MMD model is different this plugin will save you hours upon hours of messing with armatures and vines and eye tracking and optimization it isn't perfect I will I will reiterate that multiple times here it isn't perfect but it gets the job done 95% of the time I also want to point out that you need to keep your SDK up-to-date it is extremely important that you update check for updates as much as you possibly can I believe the last update was released sometime in mid-december as of this video it is extremely important that you keep up to date on that I have some recommended downloads here as well cube shaders which are probably the best shading the best shaders written available free for VR chat users for anime characters it is actually mostly by cubed paradox who is a VR chat developer and then by TCL who was also a non Aviara chat developer but it definitely a contributor to the community and a very very smart person regardless the the shader is awesome you should use it paint.net I also recommend for texture editing so I would install that as well just in case you want to do a little bit of texture editing in this tool I actually need to remove so PMX editor English or PMX editor I guess just for short is a tool to edit MMD models it is the native tool and the preferred tool for most people to build MMD's but there's basically no use for it anymore cats blender plug-in handles all of the translation for us it does it perfectly and it does it basically with a button press there's no reason to use PMX editor and in fact during translation through PMX editor now we'll actually screw with cats blender plugin as we move on so anyways those are the tools that you need again the links are right here make sure you get these versions and if the this says something different when you come and look at it then get the different thing get something that's the most up-to-date keeping this stuff up-to-date on your computer is extremely important because there's a lot of problems for example with the sdk if you're using an old one then you have problems with it and there's a lot of problems that can be solved by using the up-to-date sdk same thing from MMD tools and for pets blender plugin so anyways let's move on i said i was going to cover mnd tools a little bit more detail so let's go ahead and just search for MMD tools so not the the important thing i want to pick out here is you don't want to choose su Gianni's branch here i know in my previous videos i pointed here but look right here see how long ago this has been updated this is this is a very old branch so let's go ahead I'm going to do some things that you don't need to do because again you can just download through this shortcut here but let's go ahead and look at I believe it's under oh it's under issues and let's go to this right here and let's go here so anyways this is the version you want ignore all the stuff I did before I'm just showing you that it's very out of date this is the new version that is being maintained actively it was updated 12 days ago or I'm sorry nine days ago is the latest update looks like they just yeah so this is the one you want and you don't want to do releases do not download a release go to clone or download click on the green big green button and click download zip so the next thing we're going to cover is how to install that so let's go ahead and save it and I'm gonna save the file I'm gonna show you how to install that and I'm also going to show you how to install cat's blender plugin so now that you've got the latest MMD tools let's go ahead and grab the cats blender plugin from VR cat club VR cat club is this site right here let's actually go to the root of the site here's a forum around by myself by a van by psych we have a kind of community forum here where a lot of people post a lot of their information on events and things like that but here what we care about is tutorials and tools so go to VR cat Club go to tutorials and tools go to cats blender plug-in which should be near the top to see the first or second and you can download the plug-in here you also they also provide a link cats provides a link to the proper version of MMD tools that you need but here's the plug-in link right here it's just going to lead you to a zip that downloads directly from github so if I've already downloaded those two files the MMD tools because we downloaded it before and I just I did it beforehand just to prepare so let's go ahead and pull up the files that I have here this is the model um it'll work on I'll get to that in a minute here is the blender and MD tools and here is cats blender plug-in so let's go ahead and go to the blender plugins folder or the add-ons folder more specifically so I've drilled down all the way to it but I'll show you how to get to it right here all you need to do let's where can I get to let's go here this busey there we go so it's gonna live in Program Files not x86 because this is a 64-bit application so we go into Program Files you find blender foundation blender the latest version 2.7 9 I believe is it Python or scripts always gets this mixed up you go to scripts you're going to add-ons and now you get this folder here which you have open here you're gonna see a bunch of files here it's got a bunch of stuff basically plugins for blender various controls let's go ahead and open up the blender MMD tools dev test zip I strongly recommend either using 7-zip or WinRAR for this for reasons I will show you in a moment once we get to the model so let's go ahead and open up this folder you'll see a folder it says test samples MMD tools this is just a clone of the actual github master branch so what we're gonna do is just grab the MMD tools folder this one specifically not the rest of this crap you just want MMD tools and and just to be clear when you open the zip file this is what you see right you double click on the zip file you see blender MMD tools MMD tools dev test open it you want MMD tools this right here let's take this drag it in drop it computer it'll say hey you need to have administrator permission hit continue because you don't care and then you'll it'll dump it into the folder so there you go you've now installed MMD tools and we will enable it as soon as I open blender so let's go ahead and close this we're actually not going to use that method to install cats blender plugin because there's a different way that it wants to be installed so that it can handle updating automatically so let's go ahead and close this zip file let's open up blender so blender is going to look roughly like this when you open it for the first time there will probably be a camera and a cube and a light in the scene let me go ahead and turn on my on screen display here so you can see what I'm pushing if you do have those things on your screen all you have to do is hit a or I'm sorry not control a but a which selects everything and then press Delete and then press ok a should select everything on the screen they should turn yellow with yellow outline delete will pop up that dialog that says are you sure you want to delete like this and then you just click on that and it'll delete everything in the scene because we want to clear that before we start working once you actually do that stretch out your water side window here a little bit and then finally go to file go to save startup file and click it this will make it easier so you don't have to remove this crap every single time in fact I'm gonna do it right now because I want it to save that I have this OSD display running so I'll click it and then click it again so a lot of pop up are a lot of commands in blender involve clicking on another pop-up that appears beneath your mouse so just make sure you're clicking on it when you get to it so let's go ahead and install those tools first let's go to file and then we'll go to user preferences right here you can also pull it up using ctrl alt u you'll quickly notice that blender has a ton of keyboard shortcuts and the faster that you learn it the better so I've already searched it up here so that kind of was a spoiler there but all you have to do right here is hit refresh just for the sake of doing it you probably don't need it if you just booted up a blender type in MMD and you should see object MMD tools here and when you drop this open it should show you all these different things here the latest version is 0 6 0 according to this it doesn't really matter the versions I don't think are being updated on the current master branch anyways all we need to do is check that checkbox and then hit save user settings so we've now installed MMD tools if that's not everything we still need Kats plugin so let's go ahead and hit install from file we're gonna go it's gonna pop up a special snowflake blender like browser dialog let's go to downloads and I'm gonna go to tutorial downloads and I'm gonna click on cats blender plug in master zip I'm gonna hit install from file and there we go it now appears in 3d view the cats blender plug-in right here it automatically fills us out we click check save user settings so while I was doing all of that you may have noticed on the left side here that three tabs have appeared MMD tools MMD utils and cats cats is what we're gonna be using almost completely exclusively the this is where you do all of the fun stuff where you import the model you fix the model you do separation by materials for decimation translate you do eye tracking you do vibes you do bone parenting optimization you can update the add-on through here you can optimize by merging materials by merging bone chains by Atlus inaudi this plugin is ridiculously useful there's no reason that you shouldn't be using this you're just causing pain to yourself any problems that cats plug-in actually has in that 5 percent chance that you have a model that's going to be weird and different you can probably fix anyways by using different parts of cats blender tools so let's back up a little bit so I mentioned before that you would potentially have a problem with your zip file of your MMD whatever you find hey guys future tupper Here I am actually just going to pause really quickly here and say that if you're using WinRAR you can skip most of this next part so go down to the description find the timestamp that is labeled WinRAR and just click on that instead if you're using 7-zip then you need to do the rest of this the main thing that you need to find are that you need to see right off the bat is that I actually have Japanese characters right here like it's displaying in Windows Explorer the reason why is I've installed the Japanese language pack if you need to do that just open your Start menu type in language open up region and language settings here and then you can click on add language and add Japanese once you've done that you also need to make it you need to change it so that non Unicode programs use use Japanese this default character set click on region this is the part I forgot here and when it pops up you'll see a administrative tab on the region pop up here you want to change system locale for non Unicode programs to Japanese or Japan this will allow you to extract files using 7-zip and retain the Japanese characters in it I'll show you why that's an issue if I open up this file here you'll see that some of the textures have Japanese characters in the name if I actually if I didn't have this settings set those characters would be just garbled up another way that you can get around this problem I should probably mark this somehow in the video I guess I'll put it in there if you want to use rent WinRAR it's actually pretty easy you can just go to the language settings and you can just say in use shift-jis encoding and it will solve the problems for you you'll still need to install the japanese language pack as I demonstrated before but WinRAR is a little bit easier to work with I just prefer 7-zip so anyways we're done with that let's go ahead and extract the model so as you saw here I have this model here that I'm going to work on all we need to do is open it up to a decent where we actually want to extract it out here's the PMX file the actual model file right here if you look in here here are all the textures whoo oh boy that's not what I wanted to do there we go there's all the textures so we're gonna go mmm 7-zip is not see I said I prefer 7-zip and now it's giving me problems I'm gonna select all that the other way go into my model workspace and pretend that I didn't already do this before so what I have here is I already extracted the files into here and as you can see the files the texture files already have the character sets in there so let's go ahead go back into blender and let's begin the first part of the importing process so now that we've got the entire I guess workspace set up all that really remains is to import the model and start working on it the first thing that we're going to do is let's set up a startup file or a startup I guess setting for blender when you first start up blender before you actually include anything or before you do the things I'm about to show you you'll get like a cube in the middle of the scene you'll get a camera you'll get a light that's hanging out up here somewhere go ahead and select all of those things actually hold on let me turn my OSD display I always forget let's turn on this display down here and what you would do if you had a 3d cube in the scene let's just go ahead and add some crap in here so there's a camera let's add in like what is there I think there's a lamp in here a Hemi light that's normally in here and then there's like a cube or something like that let's just let's just stick in a cube there we go this looks a little bit different than what you probably see yeah I think it's just a regular cube in your scene but for some reason I chose a medicube anyways you'll see something that looks like this it's easy to get rid of all these things just tap a you may have to tap a twice if you've already selected one of those things and hit the Delete key like this you hit delete and a little window pop up press ENTER and it will go away so anyways once you've got your scene set up such that you like that you have all the crap deleted here and you've kind of stretched this out a little bit we can see then it's it's actually I can actually read all the labels here what you want to do is you want to go to file and go to where is it save startup file if we hit that it will actually save this entire set up for us so every time we open up blender it'll be a nice just clean blank slate for us to work with additionally something that I will strongly encourage you to do the entire time you're working on a model you want to use save ctrl s and save as copy all the time so what I typically do is I have a working copy that I just kind of go with the entire time I'd usually just call it the name of the model and then as I go along and I finished major steps I do save copy and I name it like so it would be like model underscore Atlas inor model underscore decimation done or something like that anytime that you finished a bunch of work that you don't want to lose just like in a video game you want to save a copy so let's go for a quick overview of how the controls work in blender most of the navigation is done with your middle mouse button so if you have a mouse that does not have a middle mouse button or a scroll wheel please dear God it is 2017 get a new mouse so once you get your new mouse this is how you move around in blender to rotate you just hold down the middle mouse button and move your mouse around and there you go you can rotate around to to pan around to pan left right up and down you can hold down the left shift key and hold down your middle mouse button move around and you'll get the just panning if you hold down the left shift while you're scrolling you'll get panning up and down or rather changing your elevation and then finally if you just scroll in and out without touching anything else then you get the zoom function so now that we have that let's move on let's go ahead and import our model we're gonna go ahead and click on cats which you've already installed let's click on the import model button at the very top here we're gonna spend pretty much all overtime in this pane on the left side here for a lot of our tools and buttons and stuff so click on import model let's go to our model which I have in just recent here but you may have to navigate to it you want to find your PMX file so let's click on that but not double-click the next thing that we're going to do is we're gonna hold down left shift and then click on physics and display we don't care about those particular things those are things like rigid bodies and joints display I think usually imports things like but I'm honestly not really sure what display doesn't or does not import we only really care about the mesh armature and morphs anyway so that's what we're gonna bring in additionally we want to change our scale one point I was way too big MMD models come in absolutely massive if you import them at one 100% scale I personally go with 0.1 Haute ox from cats blender tools one of their developers recommends point zero eight so eight percent of the total size let's go in between and do point zero nine which is nine percent so my typical setup that I like is 0.1 Botox goes with point zero eight let's go with point zero nine so let's hit enter there our scale is set properly these settings are what you want to stick with clean model is checked remove doubles is unchecked fix IQ links is unchecked rename bones left/right suffix as checked we named bones use underscores unchecked what is this option here I've never touched it before rename bones to English is going to be disabled because we're gonna do that with with cats blender tools and use maps for UVs we are going to leave that checked so finally let's go ahead and import in the top right here and we will get our little fox girl this model is from kimono friends it is red fox or whatever the actual Japanese name is I don't know doesn't matter what we're gonna do now is click this magical button here fix my fixed model does a huge amount of stuff it reaches the armature which are these bones that you see here they're basically what your your body attaches to and VR chat so that you can move your arms and stuff around it fixes the textures it doesn't work on the textures it changes the rendering mode so you can actually see the textures it does a huge amount of things it also translates bones let's see it listed off if you hover over here it makes its weight paint so there's no hard cut offs for movements or I'm sorry there's no hard cut offs for akkad I'm blanking on the word for morphing of the mesh based on bone movement it corrects the hips for full body tracking and also for general compatibility with VR chat it joins any extra meshes together and at correct shading which is what I talked about before so anyways enough talking let's hit the actual button so it's gonna give you a lower progress bar that'll pop up in your cursor and then you'll have your model so there's a couple things that we see right away first off we can actually see the textures like I said before if you look on the top of your screen here we see a very important number tries faces we don't care too much about verts we don't care too much about tries or what we care about the most in VR chat you were only permitted to use models that are less than twenty thousand tries here we are three thousand one hundred and seventy five over the limit an additional one because you can't actually have twenty thousand Poly's you can our tries you can only have nineteen thousand nine hundred ninety nine so we're gonna have to deal with that in a moment but the next thing that we are going to do after we hit fix model is let's translate everything in here because if we look at the model I'm gonna right click by the way right clicking is how you select things in blender so I right click on the mesh over here and you see the orange highlight appear over the mesh let's right-click on the armature and all the bones get highlighted so there you go there's your lesson and of course we can rotate and pan around like we did before so if we click on the mesh right click on the mesh and then we click on this little ball here on the right side that is the material pane these are called panes there's a bunch of different buttons to them this one is the material pane you can see that there are a ton of materials on this model which are in short their textures but they're a lot more than that but for the sake of this explanation they're basically textures that are all in Japanese by the way you see how this stuff is all popping up in Japanese you probably see a bunch of boxes so let's go ahead and fix that for you real quick what you need to do is if you go to file you go to user preferences down here let's go to system and I believe it's in our system what I have to oh here we go under system on the right side you'll see international fonts just click that checkbox and you'll get actual Japanese characters here it mean it doesn't really matter we're gonna translate all of it anyways but it just helps so you don't see a bunch of garbage on your screen so what we're gonna do now is we're going to do translation so this kind of we're going to translate the shape keys which is something else this button right here is the data tab and we can see that there are a bunch of shape keys in the model shape keys are basically what moved the face around so you can make it look like that you're talking so you make it look like you're winking that kind of thing this one I believe is winking yep so you see as I drag it left and right on the value you can see that she is winking at us let's go ahead and clear that just in case I didn't do that right so we're gonna translate all of those first let's kick click shape keys so once we click that watch the right side here Thank You trogdor for the commentary we can see that all the shape keys have been translated some of them don't make too much sense but some of them translate to the same thing every single time in particular uh-huh you're I think there should be here somewhere things like that c'mon tis a a common one a lot of these are mouth shapes for speaking this will become important later on so let's go ahead and move on to bones they've already been mostly translated when we click fix model but I like to click it anyways if you notice on the top side we get a bunch of status messages every time we click click translate that is a common theme with cats we get basically updates on what the script just did so let's do meshes and objects there's only two meshes two objects or whatever they were already translated that was again just out of habit clicking all four of these and then finally let's click on materials but let's take a look at the materials first first they're Japanese and now they're in English so the way this is working is it's actually sending off queries to Google Translate via a questionably ethical method of accessing the API but it either way it works it doesn't really matter but what we are now going to do let's see what's on my list here oh now that we're done with translation let's look at bone chain merging so I'm skipping ahead a little bit here in I guess learning about this kind of thing but let's go ahead and look at the armature here so when I click right click the armature the entire thing gets highlighted and if I hit the tab key watch down here in particular on this button it switches over to edit mode tab object tab edit tab object tab edit so this is very important we'll be using this a lot in a little bit once we're in edit mode we can see that these bones right here for the hair you might be useful for something like dynamic bones if we wanted to animate the hair but this is kind of too many too many bones so what we're going to do is we are actually going to merge these bones down so let's go to optimization let's go to bone merging and we are going to go to whatever these bones are called which I believe they're back hair and then some suffixes to them so we have the correct one chosen back here to one five bones let's change the merge ratio to 50% or rather let's keep it at 50% the reason why we're gonna do this is because if we do 50% it's going to reduce these chains from four to two this is going to increase the efficiency of our use of dynamic bone scripts once we actually get to that point in unity so tip merge bones and watch the magic happen there you go half of them have disappeared but not really what's happened is that the bone that was up here got merged down into this one and the bone that was here got merged down into this one so we have less bone bones to animate and basically half of the CPU load required to animate this right here there's not much else that we're gonna do this model in particular with bone merging this one's pretty light the only thing that's left is the tail and the tail is just one chain and unfortunately cat splintered tool is not detecting the bone chain of a single one like that you probably would have to do that manually that's a little bit out of the actually it's not really outside of the context of this of this video let's go ahead and give this a shot I didn't plan on doing this but we'll try it so let's choose a bone if you want to do this manually - like the tail let's choose a bone that is let's reduce this down from one two three four five down to say three so let's merge this one into that one and then this one into that one so what we need to do is we need to select this bone let's hit mix weights and what it'll do is it'll take that bum merge the weights into its parent which is this one here and then make sure the parenting works for any bones that were above it in the chain and then of course it deletes that bone so let's do the same thing here mix weights there you go now we only have three bones where before we had five we're reducing CP load very important and something I cover in the optimization video but I will reiterate on many times here so moving on we have finished bone chain merging so let's look at dynamic bone root creation so what we if you look at the model here we have a skirt that has all these little skirt phones that are parented to the hip if you try and do this if you try and animate the hip by putting the script on the model and then setting this bone as the root bone for the dynamic bone script you'll get all kinds of animation issues when you sit down it won't quite look right there just problems with that so anyways we have a way to solve that with this bone parenting thing right here before you use either the bone merging or the bone parenting module here make sure you click refresh list just to make sure that your drop down list is accurate so let's go ahead and go to our list here let's find the skirt which is skirt one zero ten bones that sounds about right let's hit parent bones and what this is going to do it's gonna be very quick it just created a duplicate of the hip it repented all the skirt bones that duplicate and then it actually that's about it and then it parented that duplicate to the hips so it will move with the hips it'll Ida it'll basically be the exact same bone as the hips except it won't it won't be animated by making them so it won't cause any problems with with animations and things so one thing you might want to check before you finish with everything on your armatures you want to test it out so what you can do is in cats blender tool you can hit start pose mode and you'll be able to right click on whatever bone and hit you have this little rotation ball that appears and you can rotate it and see that your arm works properly and the sleeve doesn't become detached and things like that if your sleeve is detached you may have to go into the armature find whatever extra bone underneath the arm doesn't look quite right and merge it down using mix weights so if there was a sleeve bone here that wasn't looking quite right I would go to spine chest either left or right shoulder left arm and I would look for extra bones here so if there was like something additional on above left shoulder then I could mix it down by selecting that bone and then hitting mix weights and you do that in edit mode of course so you do that and you hit mix weights and we'll merge it down a lot like we did the tail earlier even though this version doesn't have it so actually let's just go ahead and do it in the tail and I'll show you here so if I want to mix this one down all you have to do is hit weights and it'll merge it into the bone above it which I showed you before so you can do the same thing with sleeves if they don't work properly so let's go ahead and take a look at some of the other bones and make sure things work properly so the ears maybe let's make sure oh that's cute adorable well let's go ahead and move the arm around okay that works let's move the leg around a little bit that doesn't look natural whatever that's fine and then once you're done testing everything out actually let's try out the tail I wonder what the tail looks like it looks like a tail cool once you're done with everything hit stop pose mode it'll return everything back to normal and you can continue onward so anyways we can continue on we're doing this with some other bones let's do this with the hair bones but there's a problem here see that the front hair in the back hair are actually two separate bone sets here and gimmick which is strangely what the ears translated to up here these ear bones also are set off from the or they're parented to the head and we don't want to put an animation on the head I've never run into problems with putting dynamic bone scripts on the head but it's better to be safe than sorry so let's go ahead and choose back hair because it's the one with the most bones to reparent let's click parent bones and now let's take a look at what that actually did in the model so if we open up armature here which is the actual base object of the entire model and then click on armature again we'll get into the skeleton of the model by the way make sure you're an edit mode for the rig before we do this so let's now go to the hips let's open this up a little bit go to spine go to chest go to neck go to head and let's drag this open for visibility we can see that there's the route bone that was created by the script and we can see all the other hair bones and ear bones that we want to make children of the root bones so there's an easy way to do this select by holding down shift and clicking on each one that you want to create or you want to move into the root bone and then finally the last bone you want to select is the root bone make sure you select this one last or else this will screw up once you do this hit ctrl P and then hit keep offset what we just did is we just batch moved all of the parenting for all of those bones underneath the root the the back hair root so we can just leave it like that all we have to do if we want to animate all of those things with the exact same settings is just mark those as is just put the dynamic bone script on there and then that's it so we're gonna do the same thing actually again but back all the way up at the hips I want to animate the tail so let's go ahead and merge the tail into the root skirt same way we did before for a select tail shift-click on root ctrl P keep offset there you go it's now in there so what is next oh boy decimation my favorite part so now that we have fixed the armature about as good as it's going to get for the moment we need to bring this model underneath the poly limit so this this model is pretty close its I'm gonna go ahead and hide the armature here which I'm gonna do by right-clicking on the armature and hitting H which hides the armature if I want to unhide everything that I have hidden hit alt H and that unhides everything so yeah that's just a quick aside anyways back on target you can see that this model has is pretty decently oops hold on this is another thing if you go into edit mode and you see that the face is changing or Visine is changing you need to go into the data portion and make sure you have bases selected this actually affects this is how you edit shape keys if you want to edit a shape key you go into edit mode on the mesh with the shape key highlighted you can edit it but we don't want to do that now so let's go to basis so anyways this is gonna be a pretty easy model to decimate I've seen a lot of models especially from deviantART get in the upwards of a hundred and twenty thousand polygons or triangle range in that particular case decimating those down is going to result in something that looks probably not all that great but on the other hand a lot of those models also have a lot of hidden geometry which is one of the things we're going to deal with here so let's go ahead and I will illustrate the three different techniques that you can use to decimate your model so the first technique that you need to use for decimation is called planar decimation but before we do any decimation we need to do something called separating by materials so while we're in object mode hold on there we go while we're in object mode if you go to Kats blender tool on the left side here and you see this separate by materials button let's click on that and what's going to do is it's going to iterate through every single material or texture on the object it's a little bit more complex in that like I said before but it's going to iterate through all of them and separate the mesh out by whatever organized by whatever texture or material is assigned to them so a important thing I'm going to reiterate on before during and after this entire process is you see all these different meshes when you're done with all this merge them you merge them using join meshes right here this is deadly important do not leave these meshes unjoined if you leave these meshes unjoined it is horribly optimized you will tank your framerate and everyone else's framerate and people will hate you I'm pretty sure people have actually gone on which ones trying to track down people who have unmerged meshes just please the love of god just hit this button it's dead easy anyways moving on I'm going to be reiterating that reiterating on that again but anyways let's go ahead and take a look at some of potential targets let's take a look at this hair right here so if I click right click on the hair you can see that now it is on its own little separate mesh and you can see that it's it's decently complex it's not too crazy it looks like it's only you know a thousand 1376 tries not that big of a deal let's look at the back hair 1942 let's look at planar on the back hair so the first thing that you're going to need to do before you do apply any decimation modifiers is you're going to remove the shape keys on this particular part of the model but now you might be a little bit confused because before I define shape keys as being something that are primarily used on the face right well shape keys exist on every single one of these men and these meshes or at least the index for the the shape keys kind of the place where those shape keys are held but we can remove them from parts where they're not needed this is kind of also a preface to a warning you should never ever ever decimate your face your hands your let or your legs basically anything with the point-like your fingers ideally not your arms either so anything where you would have a lot of bending especially your hands and especially your face you don't want to do decimation the reason why is if you do decimation on your hands when you bend your fingers you'll get all kinds of weird jaggedness and weird effects if you decimate your face well you'll lose all your shape keys you'll be unable to use things like the lip-syncing which you don't want to lose that being said it can be very difficult to do decimation on an extremely high poly models where the face is super super dense thankfully this one is not too bad so we're not going to worry about it so anyways don't does make your face don't decimate your hands don't decimate your legs or arms there you go let's do the hair them so if I right-click on the hair object and you can see that I have it highlighted it's I know it's all orange but I'm gonna press tab to show you I have this highlighted let's open up the mesh object in the hierarchy here let's drop down the data object here and you'll see this key 0:02 if you're not sure if a particular part of your model has shape keys or not what you can do is you can select the mesh so let's take a look at the let's take a look at the ears for example which for some reason train translated to for garrison under the data tab here you can see shape keys the only one is basis which means there's no shape keys on the other hand if I could click on the face now other suns of shape keys obviously we don't want to remove these so if we look at the hair there are no shape keys so we are saved to right-click on this and hit delete what we can now do is click on this little wrench icon here which is the modifiers tab we'll click on add modifier and we're going to click on decimate right there let's go ahead and move that up to the top of the list very important that may be actually incorrect but just move it to the top of the list this armature one right here is something that is important for later on it basically attaches the armature to the model either way don't mess with that just move this to the top of the list let's click on planar so what planer does and I'm gonna actually look at this number first what planer does is it takes the angles between these edges here and it calculates the angle between the one face to the next face if they're within five degrees by default for the default setting it will attempt to merge them into a quad so this is this this specificity of me saying a quad versus a tri is very important here because planar is not really the end-all be-all for decimation it's not the greatest so let's take a look at so if we look at collapse with a ratio of 1.0 that means we have all of our faces still we can see that we have 1942 phases and if we look up here it says 1942 tries if we hit planar and with the default settings and we come out of edit mode of course we can see it drops down to 661 faces but if we click so what did we have before 1942 down to 661 did it just change numbers on me no it didn't okay so let's go ahead and hit apply very important please don't forget a hit apply and now our decimation is complete here so how many tries did we get this down to 12 98 even though faces say 661 the reason why is that we care about tries is because the unity converts to all the quads in the model two tries so that is what is actually counted when the SDK looks at how many how many Polly's or it says in the SDK to count for decimation so even though it says that we managed to get it down to 661 faces those are quads we actually still have 1298 tries which isn't quite enough we're still 22 530 so let's look at the next technique which is the collapse modifier which you probably saw a second ago so let's go ahead and right-click on these little poofy things on the thank you cat on the arms here which translated to 4 Momoko let's go ahead and I know these don't have shape keys so we can go ahead and right click delete shape keys gone let's add a decimation modifier right here and let's take a look at collapse so these particular I'm gonna hit tab right here these particular meshes aren't like they don't need that much detail they're flat lit when we actually put the correct shader on them and there's no need for this much complexity in it so let's go ahead and just reduce them down by ridiculous amount the way you do that is you just drag this slider down so these faces we're starting out with is twenty seven twenty let's come out of edit mode and let's drop it way down to like ten percent so we're now at two hundred and eighty and you probably saw the change in how it looks as we drop it down lower and lower well let's do ten percent let's actually do evenly ten percent 0.1 there we go we're now down to two hundred and seventy two hit apply and now you can see that these things are far less complex now this isn't perfect to collapse sometimes does some weird things like you see down here it doesn't properly join things and things look a little bit odd so I would try and limit heavy use of the collapse modifier it also screws with UVs so if you have something with that texture on it like this and you use the collapse modifier on it these lines might this is disappear or something like that so it may not be the best to use in situations like that now we have just a couple tries to get rid of we only have about eighty two to get rid of so let's look at the third type of decimation which is straight up just geometry deletion so this model is actually pretty well optimized aside from probably the buttons yeah it's a shame but just for the sake of this example let's go ahead and get rid of this button so what we can do is we can actually just remove geometry if we don't really care about it and that will save us tries obviously so what I'm going to do is I'm going to highlight some of the verts in this I'm in edit mode right now on this central mesh and I'm going to highlight some of the verts on this button I'm going to do that by pressing C which brings up the cursor select I'm gonna highlight just by clicking and dragging over a couple of them let's just do that I'm gonna hit escape to get out of cursor select mode and I'm gonna hit control L to select all linked vertices so now that is select that has selected the entirety of the button I'm gonna hit delete I'm gonna hit vertices and the button is gone so if I hit tab again we now see that we are under night and we are under 20 thousand tries we are nineteen thousand nine hundred and sixteen so decimation is complete decimation on this model is really easy you lose very little detail but because this model is pretty low poly to start with your experience will be different but anyways let's go ahead and move on to the next step so that you finish decimation you have one of two things you can do you can either cheat like me and move to a model that I've already finished estimating or you can go ahead and hit your join meshes button because if you don't do it your next step will break and if you don't join your meshes you will probably be the subject of a witch hunt that's not really that joke please join your meshes it's extremely important so anyways while I adjust my microphone and probably get some noise let's go ahead and move on to the next step which is eye tracking eye tracking is pretty cool it makes your eyes move around and track people that you are talking to it keeps swapping - ah for me that's that's a little alarming hold on let's make sure it's not doing that so it makes your eyes track people as they go around you it can look a little bit strange on MMD models sometimes on anime characters but in this particular case it actually ends up looking pretty decent so let's go ahead and go to eye tracking here and take a look at it mesh head left eye right I should look pretty much like this blink left and blink right may look different wink - and wink right - or what this one comes up with let's go ahead and make sure that those actually look like winks or blinks not winks let's look at wink - yep that looks like an eye closing and wink right - that looks like an eye closing see wink and wink right makes it look like that she's got like a happy face going on but we're not going to deal with that right now so let's kind of clear our shape keys and go back to basis so let's go ahead and hit eye tracking so cool aya tracking was created and you can see at the top that eye tracking is done the way that we can test this before we ever even get into VR chat by the way there used to not be any way to do this reasonably you had to do it either manually by rotating bones or by bringing in a VR chat and testing it we can hit testing on the top here and hit start testing and if we zoom in a little bit and pan up so we can actually see her face we can adjust where she's looking and then hit test rotation and you can see her eyes are moving around but so this model actually looks decent it's pretty subtle the movement and I kind of like it but if it's too subtle for you you can adjust the eye movement range let's turn it up to like 1.0 ish set range so now show you looks a little bit farther to the left and to the right it does rotate the pupil or the iris a little bit which looks a little strange in my opinion but hey I'm trying to cover everything here for you so fool around with this this is just for testing here these bars here eye movement range if you set it it will sit at that setting I'm gonna go ahead and set it back to 0.8 because I like that you can also test blinking so let's hit test for blink and reset shapes and lower led test obviously does nothing in reset shapes it does nothing because we assigned it to basis which means that it's not going to move once you're done with your testing just hit stop i testing and you're done it resets back to normal so the next thing we are going to do is even simpler than that we're going to create Visine by seams or what you make your mouth move when you talk and in VR chat you have to set it up a certain way with certain naming so that it actually uses them so for these particular for cat's blender tool actually handles most of the alt well not most all of the naming for you and all the blending it creates all of the shape keys based on three the shape key for the AA vowel for the oval and for the sound so we are going to use it automatically assigns a your and there because that is typically what those vowels translate to when they run through Google Translate you don't really need to mess with this you kind of just hit create Visine z' and it works so i'm gonna go ahead and click on the mesh and you can see that there's some vr chat vytas Eames that have already been created but let's watch and see what happens when I click on create Visine now we have a ton more and of course it tabbed away from it we have a ton more look at that these are all the different vowel sounds and all the different mouth sounds so if we go to ah she opens her mouth if we go to K she opens her mouth still so I mean this isn't perfect you could make this manually and make them look really really good but it's a lot of work and this is basically sufficient there's also there's a lot more advanced techniques that some people use with like muscle posing and stuff like that but honestly this is what I use and it works perfectly fine so we're done with Visine let's move on another optimization step is what we're going to do next and this one is to do with the materials I'm gonna hide the armature because we're pretty much done with that at this point let's right-click on the model and let's a good look at all the different materials we have so we have a lot of them here and what we might notice is if we look at some of them some of them are identical so if we look down here in the bottom right you can see the different textures so for face and from face shadow this one actually doesn't have that too many that are that are identical but either way in most cases there's duplicate ones here that use the same texture a very easy way of reducing your your material count is going to the optimization drop down here going to material and click on combined same materials now watch my list on the right oh boy nothing happened because none of them are identical so normally it what would happen here is if I hit this button it would merge any materials that have the exact same settings in this particular case it doesn't appear that the models have exactly the same settings on some of these things which makes sense this is a pretty minimal model and there's a lot of small textures for this so this is as low as we're going to get for the different materials on the on the character so we can solve this optimization problem a different way because do you know what's better than fewer materials one material so let's do texture add listing there are several ways to do texture add listing I actually have a video on a technique called manual texture at listing that I personally think is the highest quality version of doing texture at listing however here I'm going to show you how to do it in a completely automated way so if you don't want to take the time to do that you push you push a button and it works so let's click on the Atlas button here under optimization at listing is the act of taking all these materials and moving into one material with one image defined so let's go ahead and set up some settings here I'm going to set the margin to 0.05 I'm going to leave angle 82 I'm going to leave area weight at 0 and I'm going to change texture size to medium 2048 or 2k we're also going to see this is one texture okay go ahead and make sure that this is checked you probably don't want to pack Islands just because it might mess around a little bit with some stuff with the way the way some UVs might run over each other I haven't had good experience with PAC Islands here but it doesn't really matter let's go ahead and hit create Atlas but before we do that let's let's take a close look at the model so I'm going to take an image here and I'm gonna I'm gonna freeze framing here so I can take an image when I'm doing editing we can look at the quality of the model here we can see the textures and that kind of thing there's honestly not that much complexity to the textures here but there is some places where you know it's sharpness is good so let's hit create atlas and see what happens it's going to take a moment especially if you set it to 4k what you really shouldn't set it to but first off you'll notice that the eyes have gone black that is a problem with the transparency that's been set you'll also notice that there is some weirdness going on with the mouth here so there's some issues with this particular one that we've run into that we probably wouldn't want to continue on with normally what I should have added before I did this little part is you need to save a copy before doing this you should have saved a pre atlas version god the hindsight is 20/20 right because I didn't save one but you need to save a copy before you do this because this is a destructive edit once you do this you can't go back so we are going to go ahead and continue on with this model anyways but that's perfectly fine so now what we need to do is I've actually spotted something I need to remove let's edit the mesh real quick there's this little shadow thing we need to remove that there we go it'll save us a little bit of stuff so the model doesn't look as great as it used to it lost some of its fidelity if we go back and redo this actually I'm going to do that now we'll end up with something a little bit better quality so one moment and I will come back with a better version so now that I've redone all that work that I just did thankfully didn't take that long because cats is awesome let's go ahead and save a copy before we contend onwards so we're going to I'm actually gonna hit save first and I'm gonna hit save copy and we're gonna call this pretty Atlas free Atlas stop blend there we go so in case the Atlas doesn't look quite right we can come back so let's mess with the settings a little bit more let's try pack Islands this time let's set it to 2k let's keep that margin at the 0.05 area wait we'll leave the same angle we'll leave the same let's hit create Atlas and see what happens so we still have the problem with the eyes here but it looks a little bit better actually it looks exactly the same pack Islands didn't really help that much did it so this is basically illustrating one of the the be few I guess it's not really a criticism because honestly the Atlas thing is not really something that cats does they're using something called the smart UV project to create these atlases what the problem that I have in particular with this is it doesn't turn it doesn't come out with particularly good atlases they often kind of muddle textures together and they don't let pay particular attention to what parts of the model need to be big and what need to be small so what I'm going to do here is I'm going to manually texture Atlas this model I will create a manual texture Atlas you don't need to do that but I would trolly should suggest doing so using my manual texture at listing video so if you want to check out that video real quick I'm going to go through that process and we'll be back in a moment okay so we are done with that listening in my particular case I did my manual ass at listening techniques it took probably about 15 minutes or so to get it just the way that I liked it but you can see even though I only have one material here everything looks just about right additionally I did also have to adjust the transparency on here which may have fixed the issue before with the black eyes with the cats Bert excuse me with the cats version um I didn't try it so that's on me if you have that particular version and you want to use the cats at listing tool make sure that you follow the instructions in the exercise I'll just show you here screw it once you actually have the Atlas here you have the one material left over from the Atlas so I have a bunch of number after it go to the texture pain while you have this material selected go down make sure that alpha is checked and set to 1 under influence go back to the material go down to transparency click this checkbox and under when you have Z transparency selected turn alpha all the way down to zero and that should fix that particular problem but now we're basically done so now that a twisting and everything is complete all we have to do is export this to an FBX FBX is the format that unity expects for models to be input it is the one big format that it'll convert everything into if you throw something into it so let's go ahead and make work easy for unity because unity is mythical beast and export it to FBX right now so make sure that you save your final copy let's go ahead and hit ctrl s let's go to file let's go to export and we're gonna click on FBX now there are particular settings that you want to use to export these things I'm going to put images on the screen right now right in the middle here or something like that just put them like right here dude that's fine I'm going to walk through them as I go through them so there are 4 different tabs you want to look at here I'm going to go to my VR chat presets here and I'll show you how to save this in a moment under main you'll want to all these settings to look like this geometry you'll want them to look like this armatures you'll want them to look like this in animation you'll want them to look like this if you don't do this right you probably won't get shaped keys or your bones won't export properly stuff like that also I have camera and lamp D selected on main just because out of habit but anyways once you set up your settings how you want to save it or how you want to use them every single time if you just hit this + key here and you just say VR chat settings all you have to do every time that you pull it up is just click on VR chat settings and now that's a duplicate here and it will get it will set it to the settings that you have there before so there you go all you need to do now is hit export with these settings and that's pretty much it we now have a FBX file so if we open up model workspace here and we go in this folder here we can see if we organized by date modified there is the redfox FBX file right there there's the red fox blend that we are working on up here here's the texture atlas that I created using the manual texture atlas method which looks like this now if you created it using using cats blender tool it's gonna look like this it's gonna say generated atlas bacon the blah blah blah time stamp on it or some random number and it's gonna look something like that you'll want to put both of these into unity and I'll show you how to do that in the next section so now that we've finished everything that we need to do with blender let's go ahead and move on to unity the first things that you were going to need to do is download a couple of things you probably already saw the links that I had before but we'll go over again them again really quickly well we'll have a couple downloads that we get to as we go along however the primary ones that you want to grab are of course the unity SDK and I'm sorry the VR chat unity SDK and the and cube shaders which will allow us to apply a shader in game that makes this model look well more like this I'm going to go ahead and assume that you've already installed unity 5 point 6 point 3 P 1 that is the current version as of the end of December in 2017 this may have changed just you should always be checking the VR chat docks which you can get to by adducts VR chat comm click on get started and just click on getting started here and it will give you an up-to-date information on getting getting the correct tools installed you can see a link right here to unity 5 point 6 point 3 P 1 and the VR chat SDK in the documentation you can also get it by going to the VR chat net slash home page and clicking on SDK here which will give you a download for cube shaders which is another unity package you can go to VR cat club again and click on go to the thread and tutorials and tools that should be sticky to the top of the forum if you then go into the thread and click on and you can get the latest release here you'll be brought to the releases tab in the cubes unity shaders github page where you can download the latest version the latest version as of right now is 0.21 which they released it looks like about three weeks ago so we will go ahead and well I'll assume you've downloaded these I have already done so I've got them right here so let's go ahead and boot up unity let's see yeah that works ok I'm going to create a new package or new project for this because you won't have any projects here if you just click on new right here and you can create a new project just this way we're gonna call this one tutorial project it'll create all the necessary directory structures for you it typically does this in the documents folder in your in your user directory so if you click on documents you'll find your folder in there which will be important in just a moment so the next thing we need to do is we need to import the packages that we just downloaded namely the SDK and cubes unity shaders the way that you import any unity package there's a couple ways to do it you can find the file itself let's go ahead and just import the VRC sdk this way you can find the file itself double click on it and it will import the package that way that is one way to do it it'll pop up with all of the files that it's going to be importing allowing you to preview what's actually going to be added to your project and hit import the VR chat SDK does take a moment to import it's got a lot of dll's that it has to link and all that kind of stuff so while that's going I'll explain the rest of the process here what we're going to be doing after we bring in these packages where I'm going to bring in the files that were created in blender we're gonna handle rigging then after that we're gonna check the rigging configuration which is an important step that a lot of people forget about we will then place the model into the scene set up the materials for the model will fix scaling using a unity cube just kind of as a ruler we will then import the dynamic bones plug-in from the store and set up dynamic bones on the character I'll set up the avatar descriptor and the vines on the character then we'll import muscle poser from the store which is another useful plugin and create a basic animation that we can use for an override after that we should be pretty much done so anyways we now have the VR chat SDK imported so let's go ahead and move on with another method to import a package which you can do via the assets drop-down up here so if you click on assets click on import package and hit custom package you can then start going through all of your different files here we're going to go ahead and go to my tutorials download folder and I'll find the cubes shaders v21 package open it and it's the exact same way as before so you can just double-click on the package in Explorer or in a file menu whatever you want to call this or you can import it via the unity drop-down menu we'll click import as you can see it's creating folders in our assets folder down here assets is where all of your stuff is stored everything from imported packages to shaders to models textures to materials prefabs all that kind of stuff they're all stored down there so what we're gonna move on to now is what did I say let's go ahead and bring the files in for our avatar so the way I like to do this is I like to create a folder and just called avatars go into that create a folder and create one for this individual one which we're going to call redfox so let's open that up let's go back to the actual model workspace here where we have the red fox the files as I pointed out before that we care about in this particular situation our red fox that FBX and the texture atlas so what we now need to do is oh I'm sorry if you have it done texture at listing which you should have done but if for some reason if you did not do it instead of importing obviously your texture Atlas you need to import all of your textures here but you should be doing texture atlas thing anyways so what we'll do before we do any of this is now create one more folder inside of the red fox folder we'll call textures open that folder and drag our texture atlas in or your your your texture files it doesn't really matter you need to bring in your textures before you bring in your model or else importing don't get all weird if you do that accidentally I'll show you what to do with that in a moment another thing that we need to check is make sure we don't have any cats crawling on the desk repeatedly then we check the texture import settings take a look at some of the stuff here and the Alpha settings are something we want to check on you probably don't want to have alpha is transparency on here we'll deal with that in a different way however the default settings should be mostly fine so we will go ahead and leave that as is so let's go back to the root folder for red fox let's open up our dragged in the red fox net FBX file which is the actual model so now that we've got her dragged in the next thing that we need to do is we need to rig this as a humanoid in the particular case that we're working with here the character is a humanoid as a as in it is a bipedal character with two legs and two arms a head and neck a spine a chest and one one hip then this is what you would want to do for anything that follows that typical layout if you have something that's strange like I don't know like a four-legged character or things like that things get significantly more complex there are several ways to work around that I will not be covering that here because that is more of an advanced topic however what we need to do now is if we click on the actual model down here in the assets we go to the inspector up here you'll see import settings up here so we'll see model rig and animations go to rig go to the animation type change it to humanoid and hit apply it'll take a second as it automatically detects the bone layout let's go ahead and check and make sure it work properly I clicked on that way too quick what you want to do after you've applied it is hit this configure button here so let's take a closer look at the model that we've imported and make sure that things play nice so first off let's look over here on the right thing because of cats renaming everything it's pretty easy to quickly check and make sure all of our bones are assigned properly hips should be in hips spine should be in spine chest should be chest and upper chest should be set to none you should never ever have anything set in upper chest if there is something setting up her chest click this little dot right here scroll all the way to the top of the list and select none leave upper chest like leave it as set as none extremely important left shoulder left arm left elbow that are right right right yep yep yep oh good if you want to set toes and if you have toes that you can assign out then you can put them here in this particular case this model does not have toes toes can allow you to kind of step on step up on your tiptoes if you get up high enough some people like that some people don't it causes some issues with the height of the character in game but we'll leave this as is this model imported pretty much with the rig working perfectly thanks to cat setting it up for us so let's go and hit done here and then finally we are going to drag this character into the scene and take a closer look at it so the way I like to do it is I like to drag it into the hierarchy here on the right because it places it directly at zero zero zero first thing you'll notice is that something doesn't look quite right it's transparent that is because we need to make some changes to the materials materials are basically like materials and blender they contain information like textures shaders settings for those shaders things like that so if you go into the materials folder which was created when you brought your avatar in click on the texture or textures you can hit control a and it will select all the textures in your or all the materials in your folder let's take a look at the settings here so we're using standard shader and we're in transparent rendering mode so we can fix that pretty quick by just hitting opaque so this is a flat lit aren't not flat lit but is a shaded lit using the standard Unity shader setup here let's go ahead and make some changes so it looks a little bit better first off let's go ahead and use cube shader that's going to make this look a lot better let's switch over to so I'm going to click on the shader drop down here go to cube paradox and click on flat lit toon you can now see that the character is actually flat lit like how it looked in blender the next thing we want to do is we never change the rendering mode from opaque to cutout now your model may disappear here but don't worry drag your alpha cutoff down to probably about as low as you can go but without things getting weird so probably around like point zero one or something like that what this is doing is it's setting the transparency cutoff if a if a point on the texture the Alpha channel is beyond a certain transparency level then it simply will just not render that particular pixel off of the texture it's not perfect but it's probably the best result that we have right now until we get full alpha channel support in textures the next thing that you may want to mess with is with the outline or with the shadow I'm sorry you can also see that if you want to get into more advanced to use you can set things like a color mask a normal map in a mission map you can change the emission color you can mess with tiling I probably wouldn't mess with the tiling in the offset since you've so carefully set up your UVs before let's turn shadow down a little bit that's just kind of a personal preference I like to set it down to about 0.1 there we go and then this is very important outline mode I typically go with tinted outline even if you don't want an outline on your model which looks like this and personally I think tinted looks pretty good I would normally turn the outline down a little bit maybe to 0.1 so yeah I think this is this looks fairly good however a lot of people don't like the outline look to it so what I would do is I would not set outline to off I would set outline width to zero the reason why is you want to be able to keep double-sided rendering of the of the mesh as you can see on the inside of the skirt it is tinted there if we turn it to off it's no longer going to do double-sided shading so you're gonna be able to see right through any faces which the normals are facing away from the camera in other words you would be able to see from the backside of meshes so what we're gonna do instead is set it to tinted set the outline to zero I'm going to set it to 0.1 just out of personal preference and this is a the outline width is a purely aesthetic choice it's it's up to you what you want to choose I think I usually run with about this size you can also adjust the color of the tint so if you want to tint it and what I mean by tinted is it takes the color of the texture and then it tints it to create the outline so if I make it a very light color for the tint you can see that it's accurately outlined here and let's turn this up a little bit just so you can see Changez 2.4 you can see that the outline is actually orange for her orange shirt however it is slightly tinted from the original color to indicate that it is an outline if we change it to white then it's gonna be the exact same color as the textured sampling from if you change it to black it's just going to be black I usually stick with a kind of grayish color like this and I like to stick it to like point 1 let's see how dark that is yeah that's perfectly fine that's great so now we're done with most actually pretty much we're done with the cube shader setup here there's a lot of cool stuff you can do with shaders you can setup there's no a screen space shaders which lets you set kind of a texture that stays in place as you move your head around and look at the model there's um snips cyber shader which is this cool kind of rolling a missive effect of a circuit board kind of deal there's a bunch of cool stuff you can do with it however if you want to apply a shader just a one particular part of the model and not to all of the model you're going to have to do a little bit of extra work you're gonna have to make sure that that particular part of the model is a separate material and that is something I'll probably cover in a different video it's a fairly short process but there's several ways to do it and I want to make sure you guys have all of the options available for you so that'll be something I'll research later kind of just came up in my thoughts right now let's see what's the next thing we need to do oh we need to fix scaling so the way I typically fix scaling there's a couple ways to do it but this is I feel like the easiest way right click in your hierarchy click on 3d object click on cube and it'll drop a cube into your view you can change your movement modes for objects in the top right our top left here let's go ahead and set it to the translate tool just for so we're not rotating the cube when we don't need to I'm going to set the position of the cube for X and Z to zero I'm going to set Y to let's see here actually let's do this first let's for the scaling I'm gonna set the X to point 1 and the Z to point one just so we have kind of a stick and then let's drag it over here so it's out of the way let's make her I'm trying to think how tall I wanted to be let's say 140 centimeters which conveniently is 1.4 meters in this in unity unity works in all meters and let's go ahead and set Y to half of that so let's set that to point seven so what that now means is that the this stick that I've created is one point four meters tall or 140 centimeters and it is the center of it which is right here is set point seven meters or one half of one point four off of the off of the zero plane so what we now want to do is we want to rescale the redfox down that down so she's approximately matching that this cube so I'm going to move this a little bit closer so there's a couple ways to do this if you want to do it just by writing numbers you can adjust the scale here so we could say like point eight point eight point eight okay we're getting closer but maybe you want to fine-tune it a good way of doing this is changing to the scaling tool which is this button one this button right here you can see that it changes to a bunch of little boxes and if you click on it and just start dragging you can kind on the center box don't do these side boxes or else you're gonna squish them down like that you don't want that so click on the center box and start dragging let's bring her to about there that looks like she's about the right height and if you wanna check the perspective you can mess with your camera perspective just by clicking on these little arrows here and you can set it to flat projection by clicking on the flat face of the cube and we can now see that she's a little bit taller than the things so let's drag it down just a little bit hello cat yes thank you for the fourth time running into my microphone excellent so now she's about the right height here so let's go ahead and move forward so I'm gonna come back out of projection mode or flat projection mode and let's go ahead just hide the cube next thing that we are going to do is let's import dynamic bones from the store so asset store is where you pick up all of your assets that you purchase in particular I'm going to be downloading two of them the first of which is dynamic bones so I'm going to just search for dynamic bones which I've already purchased it's $20 it is well worth it go ahead and click on import import here and there you go dynamic bones is installed dynamic bones is basically the way that we move hair and stuff like that in the scene so that the character actually has a realistic movement to their hair and say ears and stuff like that so before we get started let's go ahead and show how you would test this sort of thing if this thing had dynamic bones on it but I'm gonna show you what it looks like without it if we hit the play button at the top here and then click on scene if we move her around nothing's happening her hair isn't moving our ears aren't moving she's stiff as a board so now what we're gonna do is we're gonna add dynamic bones to the model using those root bones that we set up a while ago so let's go to add component let's type in DUI in for dynamic boom it's at a dynamic bone component you'll see a bunch of different settings here but the most important ones are route all these sliders here and potentially maybe exclusions if he didn't do route set it properly also colliders if you want to mess with that which will do momentarily so let's go ahead and set one on our hair so we're gonna go up to the the bone structure until we reach neck head our root hair bone that we set up here excellent yes Thank You cat six no five times now she's running across my desk anyways what we're gonna do is now assign the route back hair which is what we set it before to the root bone right here and we'll see that a bunch of very faint white lines come up representing the the dynamic bones that have been created I'm going to use my typical settings I use for hair and other things like that and also skirts I think I used this for when I did do that I set damping two-point-five elasticity to 0.1 stiffness 2.1 and inner to about 0.85 or 0.9 so what these different things do you can tap you can mouse over them to see what these things do with very short and terse tooltips damping is how much the bones slowed down which I'm going to translate to basically if the bones were a spring damping is how fast these Springs not stops oscillating back and forth elasticity is how much force is applied to each bone to the original orientation so basically how quickly does the bone try to return back to its original state and then in stiffness how much bone original orientation is preserved basically how much of the original the original position of the bone is respected when movement is being taken to account and then finally inert is how much the character's position change is ignored in physics simulation I typically set this fairly high just because it makes it so that the because all of our all of the bone movement is affected by character movement in VR chat so this is the kind of in doll modifier like this whole effect every single movement of the bone so now if we go into play mode here and we click on scene we move around you can see that the hair is moving slightly and the ears are moving slightly so that looks pretty good now what we're gonna do now is I'm going to add some colliders to the hands so colliders basically allow you to interact with the bones themselves and let you play around with play around with your own hair essentially so let's go down the left shoulder left arm left elbow left wrist let's say on the middle finger I'll add this component let's say you want to add a dynamic bone Collider and if we look at this giant yellow circle it's just appeared we need to drag this down by quite a bit so we're going to add a couple zeros in front of our radius let's change this to maybe that point zero zero one that looks about right so you want the circle to kind of surround your hand like that but not be too crazy so what we want to now do is just click on the little gear up here on the top right click copy component go to the right shoulder right here right arm right elbow right wrist middle finger click on the gear for the transform click paste component as new and now we have a Collider on both so if we click there we can see we have a collider in both hands we're not done with colliders just yet we need to tell the the head hair bones that we need to respect the colliders that we've assigned here so we are going to go to the dynamic bone script by the way colliders you need to place directly on the bone it's being used for I'm sorry I didn't cover this before but dynamic bones can be assigned anywhere in the model I typically put them on the route of the model so I don't have to go around if I want to make changes to them so anyways colliders let's go ahead and add this here let's drag actually let's do this the easy way I know I want two colliders let's add two here click on the little dot next to the field add one of them and then add the other one there you go you know have colliders so this technique could also be applied to say adding a Collider to the head so the hair never clips inside of the head this isn't perfect if your head moves faster than the update rate which is hard capped at 60 then you are not going to it's not going to act right it's gonna look a little bit strange so the best thing to do is just set your inert high enough so that your hair never really moves quite that much that's what I do on my models and it looks mostly fine so I would recommend starting out with the settings that provided you here and working from there if you want to try something else so let's move on now that we've mostly finished with dynamic bones so let's go ahead and set up the avatar descriptor itself so go back to the root of the object hit add component and type in avatar or just a VA and then click on an avatar descriptor this is something that the VR chat SDK is added in for us so let's go ahead and look at our options here view position is this little view ball that's appeared right here it's where your eyes will appear in the model obviously we don't want it right there so let's go ahead and go back into flat projection mode and zoom in a little bit oops I didn't do it quite right and there we go so let's go ahead and move this down such that it is about right here you want to put it out of my experience I've found that putting it about on the nose is the best policy the reason why you don't put it directly between the eyes is when you go into an actual standing animation instead of the a pose that we have here your model moves slightly and it changes the position of the character but it doesn't change the position of the view ball so I have found typically the best position is about right here you need to play around with this the view ball position is something that a lot of people struggle with to get exactly right what I'm showing you is a quote good enough solution there are ways for you to really pinpoint down the best positioning for it in particular Mimi a technique that works pretty well that I'm not sure if she's posted anywhere but me me you should post that on the VAR cap forms I think you might have I don't know I can't remember anyways let's drag this down by setting it a little bit lower and adjusting at 1.4 isn't good 1.2 isn't quite right on point I'm sorry one point one one point one five one point one six seven six let's do that excellent so now what we can see is that we've got the view ball set up and approximately the right horizontal or vertical position but now we want to fix it for the horizontal position actually that's a little still a little bit low let's do like that yah-yah-yah plate play with the view ball this is gonna be your ear you're gonna be playing with the white position if you want to get this exist is actually right then you're gonna be playing with this for a little bit and the only real way to test it is by going into VR chat so what we now are going to do is I'm going to set the Z position quite low normally what they recommend what VR chat recommends is that you said it just kind of like here but I don't like that I set mine to point zero two which is inside of the head the reason why I do that is it makes it feel a little bit more immersive it makes it feel like that you're actually in the proper viewpoint position for the character I just have a better experience with that so let's go back to the avatar descriptor the next thing we want to look at is the default animation set if you have a male character set it to male if you have a female character set it to female it's that easy custom sitting and standing animations we'll deal with in a moment lip-sync this is where we're going to now put in the Vice Eames that we added before actually this also has something to do with the with the configuration that we did before the rigging configuration so we'll go to that in a moment if you haven't set up by seams or you don't want to set up by seams that's perfectly fine but what you need to make sure that you do is in the rigging configuration screen let's save this as red fox you want to go to the head right here and unassign the jawbone go to jaw and set it to none before I click on this look at what it's assigned to right now front hair one that's gonna look very strange if I don't apply seams so let's go ahead and set that to none and hit apply because if I was talking and I had my bone the bone that was applied to it was front hair one which I'm going to assume is probably this one right here this would wiggle every time I talk which looks very strange but what we're gonna do instead is we're going to set lip sync devising blend shape and then it's going to ask for the skinned mesh render that we want to apply to it which in our case is going to be body so let's drag this here and now we have a bunch of things to fill out basically for all these different visors you want to assign them so we're gonna say SIL for silent P and oh you alright I hopefully just fast forward it remembered it fast-forward through that because that's a pain so anyways you've got all those assigned congratulations and now you have blend shapes from when you're talking and this is pretty much done for setting up the next thing that we need to do to out let's import the muscle poser so what we're gonna do now is we're gonna create a cool new animation I'm gonna create a basic animation overwrite so you can see the the essentials of doing this but what I'm going to do to help doing that help me with doing this is I'm going to use an asset called I think it's called muscled pose animator can i spell muscle correctly I cannot ah here we go so let's go to a muscle animation studio right here or edit editor and click on import this asset is $15 if you're going to be doing a significant amount of animations especially with your fingers or honestly with any muscles that are on your body if you want to kind of move it around that kind of stuff this is like super well worth it so I'm gonna go ahead and import that and we'll see how to use it in just a moment so I've imported it so I now have the muscle animation editor here let's go ahead and create an animation the very first thing you need to do before you create an animation is hit ctrl s to save create a duplicate of your model by hitting ctrl D in the hierarchy when you have it selected and then deactivate your primary model you don't ever want to create animations on your main model there's a bad bad bad idea and it will like because adding nations to a model can sometimes be a destructive thing it can sometimes set screw up the model for use for the VR chat so make sure you create a duplicate and then go ahead and we're gonna go ahead and create a folder and call it animations just out of habit and now what we need to do is grab our override controller so I'm going to search in the top right here for override custom override controller I'm going to hit control D to create a copy of it I'm going to drag that into animations the copy that I've just made I can tell it's the copy because it says overwrite it says one right there and we're gonna drag that here then click on the folder again let's rename this custom overrides controller and let's say box over arrives so you can see here that all these different things are the different animations you can override we can override any of the hand animations any of the emote animations any of the like standing animations for idle or prone or running or all that kind of stuff but what we need to do now is we need to actually create an animation and the way that I do it there's a couple ways to do it but the way that I do it is I right click down here in the assets I hit create I go to animation and I name it something I'm gonna call this one happy now what we need to do is we need to actually animate the character so let's go ahead and drag this onto the character here click on the character and hit control six or go to the animation pane right here and we're gonna see this window pop up if you're familiar with flash or maybe whatever I mean whatever they're calling Adobe Flash nowadays this may look very similar it's kind of a keyframe and motion tweening kind of thing like it's that same kind of general concept each unit of time is one second so between zero and one right here is not zero and one minute it is here on one second you can zoom out to get longer animations but in this particular case because we're using this for an override the override is going to be exactly two frames long so first thing that we're going to add let's go ahead and hit the record button here and you're going to notice something with the models going strange as soon as I hit it she goes down then the muscle pose animation that's because this is I'm not really sure if this is a bug or if it's just because the animator gets turned off or something this is what the destructive edit is once you do this then model is kind of bone for use in VR chat but that's okay because we have the original one let's go ahead and hit add property let's go down to body and skinned mesh render and this is where we're gonna find the blend shapes so let's find the happy are the like the happy animation kind of thing it was a wink and wink right wasn't it so let's add wink and let's go ahead and add wink right oops that's the wrong thing uh here we go where are we yeah wink and wink right yep there you go you can see the model moving around just I'm adding these things this is a very it's a strange process it doesn't really like I'm not sure why it's doing this so anyways what we want to do is we want to edit the these values as we have the the time bar right here on whatever position we want it to be in oh also you're gonna notice that it's added some keyframes way out here in the distance for you go ahead and right-click and delete key on those we don't want it to be all the way that far out so the first thing we want to do is let's set our original let's set the first frame to be 100 and 100 for that so now she's got a little happy face now let's go ahead and animate the bones because now what I'm going to use this animation on is I'm going to override the the victory sign the V for victory sign and I'm going to replace it with the exact same thing so I'm going to recreate it so that is added into this animation so what I'm going to do that with is with that muscle pose animator that I had and let's go to a muscle animation editor let's go ahead and pull up the fingers here and just out of habit I know that I'm gonna need negative 1 for left thumb and as you can see it's starting to add things for me as I need them then 0.73 or I'm sorry 0.78 here for the left index point seven eight for the left middle and then negative 1 negative 1 and then negative 1 again 0.78 0.78 negative 1 negative 1 so now we can see if we move this out of the way her fingers now look like the victory sign great we're done almost so let's go ahead and close this right here I want to copy this entire keyframe so we need to click this right here so that we have all of them selected right-click or I'm sorry not right-click hit ctrl C to copy move our time indicator to the next frame just the next frame and hit control V the reason why is we need animations for overrides to be at least 2 frames long you can't have a 1 frame long animation so we'll have a 2 frame long animation here and it's not gonna loop or anything like that so it's perfectly fine let's go ahead and uncheck record and close this because we are done so now we have this animation how do we apply it well first off we don't need this model anymore so let's go ahead and delete it let's go ahead and reactivate our original one here and we are going to go into our Fox overrides here take happy and drag it over victory there you go we now have an animation over right there let's go back to the red fox model let's go to custom standing animations and drag fox overrides into that box there you go we now have an animation over I done you can do anything with animation overrides you can turn on a sound effect it can turn on a light you can turn on a prop in your hand all of them are animated you do all those things by animating them in the animator in the animator well the animator doesn't just move things you can basically do anything with a unity component or a component on a object in unity that you could do by hand in the editor so you want to change the color of a light you can do that with an animator you want to change a blend shape you can do that with an animator as we saw I'm going to turn a game object on or off you can do that with an animator you want to change the volume of a sound effect you can do that with an animator and you can do all these things over time so animations are extremely powerful in unity and in VR chat this is an extremely extremely basic overview of how to use overrides just to create a face shape so now what we're going to do that we finished that is actually we're pretty much done let's go ahead and show you how to log in so what you need to do is you need to go to VR chat SDK and hit settings well click on that and I'll drag this into view let's go ahead and hit logout you need to login so I'm gonna log in here with my super secret password and then hit sign in and you will see that your keep using the correct unity version we are logged in this tougher debt it all that kind of stuff the next window that we are going to want to open is the where's it show build control panel which is also off screen for some reason so I'm gonna drag this onto the screen we can now see that first off it tells us our SDK version date which by the way at the time that this is made 1212 is the latest one please keep your SDK up-to-date it is deadly important almost as important as removing meshes actually it's probably more important than removing or merging meshes not removing meshes you can see that we don't have any problems with the model we don't have any rigging problems we don't have anything where that it's saying like hey this might not work for full body you know okay this your your your shoulder is not the child of chest or whatever the heck that is because cats did all the hard work for us it fixed all of the problems that set everything up for it you don't have to wrestle with any of those stupid problems anymore the only warning that we're getting is warning what 19 thousand five hundred and five polygons this avatar will not perform well in any systems that's wrong this avatar is one draw call this is the most optimized an avatar could possibly be for a VR chat the only way we could get more optimized is if we lowered the number of the polygons on here which would help us with GPU rendering but GPU is not our current bottleneck so in short this model is as optimized as it could possibly be aside from possibly removing the dynamic bones so anyways we're done congratulations we have the model completely done let's just go ahead and hit build and publish and I'll show you the last part of it let's hit build and publish here and it's going to build the actual avatar model for us and there we go we now have our model it's gonna pop up this little window let's get this out of the way name the avatar tutorial Fox description doesn't matter because this doesn't show up anywhere content warnings doesn't really matter because these don't show up anywhere and then we click this checkbox the above information is accurate and I have the rights to upload this content to view our chat very important and then click on upload and it's gonna sit here and push my uploads beads it's got blowed the preview image and I'm done I could log in right now and have the red fox that's it I know this video was long I know this was difficult I know it may have been painful but you now have all the skills necessary to bring in literally any MMD model that you want into VR chat and there are thousands out there tens of thousands in in addition to that these techniques that I've shown you so far can be used for basically any model the only nuances that are going to be different is just basically like maybe the rigging will be a little bit different when you bring it in for say gmod or XPS models maybe you'll have to create a rig from scratch god help you maybe you'll have to you know merge some different textures together with a texture Atlas it doesn't really matter the process is roughly the same this is all you really need to do in order to get this to work this way so congratulations thank you for making it all the way through this video I hope this video is helpful if you do have any questions feel free to try and hit me up on discord I'm getting pretty busy nowadays but try and hit me up on discord I'm on the VR chat official discord if all else fails you can also obviously check out the avatars Channel on the disco on the VR chat discord you can check out the avatars MMD or avatars rigging you can also of course go to VR Kat if you have any problems that you want to post about there you can also go to the support forums for VR chat which you can get to by going to the documents the docs VR chat comm and clicking on support at the top and finally if you are having major technical issues with the game you can post an issue to that same support forum at VR chat docks or you can email hello at VR chat net however I would only really do that if you're having severe technical problems with the game but yeah that's the basic support chain you should probably be using most of the time if you're having avatar problems just go to the VR chat avatars channel on discord but that is about it thank you very much for watching and good luck
Info
Channel: Tupper
Views: 398,315
Rating: undefined out of 5
Keywords: vrchat, mmd, unity, blender, decimation, cirno hijack
Id: 7P0ljQ6hU0A
Channel Id: undefined
Length: 99min 57sec (5997 seconds)
Published: Sat Dec 30 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.