Most Effective Way To Export Blender Hair Simulation into Unreal Engine 5....

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so hello everyone today I'm going to show you how you can get this type of hair from blender into un engine so in this tutorial I will show you the whole pipeline how I export the blender hair simulation into and engine and you can see there this is actually blender hair simulation that I exported in Andel engine F so for demonstration I will create a new level sequencer so that you can understand the whole process easily so I will just create a new level sequencer in this one uh I will just just create test like this and this one we'll save this thing and then simply you have to add your add your metahuman like this and then we have the metahuman control you have to remove everything from the metahuman rig and face rig and then you have to press on ADD I will just attach my animation so there is my back flip animation you can see so I attach my animation to The Meta and then what you have to do you have to stretch this thing to the end of your animation so it's cover the whole area like this so after this what you have to do you have to just go a little bit forward hold your left Mouse and then drag this whole thing forward so you will create this type of Gap in the front and then what you have to do you have to just right click big to control rig metahuman control rig and then press create so it will create your metahuman rig so you can see it looks like this so I did this thing because uh this Gap if you want to do some kind of clause simulation so you have to make sure that your object is in the T POS and not in a POS so it is better to have a t instead of a POS for claw simulation so in my case I'm doing the claw simulation also if I show you My Level sequencer so you can see it is it is first in the T POS and then it gradually come to the main animation so because I want to do some kind of claw simulation also that's why I just create this T POS so if you want to create the T POS also it's very simple so after creating this thing you have to just remove the frames between this you have to just delete this frames so you can see there is Gap in this one uh you have to just click on the metri and then you have to just up this thing like that [Music] okay like this and this one also like this and the hands will be like that this one will be like this so when you straight up everything you can see it looks something like this you have to click on your this rig and you have to add the key frame because if you didn't give any kind of key frames in this one it will be not applied the animation to the character so you have to just click on those and you have to just add key frames like this select this one and then add some key frame like this so if you see now it will go like this gradually and then it will be go to that position okay so right now is doing this weird switch so you have to fix this also so you have to go to this one this square one and you have to rotate your character into 90° and then you have to just give a key frame and in this one also 90° and and you have to just give a key frame so you can see it is holding that position and then it snap to that animation and if you don't want this type of hand down down stuff then what you can do you can minimize everything and you can just duplicate this thing so you have to just press shift middle Mouse hold and then drag this thing like that so it will be copy this key frame and you can just place this thing there and what will happen now it will stay on that position for a bit and then it will slowly go down okay like that so after this what you have to do you have the whole animation right there with this T POS so now you can do any kind of claw simulation also in this one you have the T pose also and you can do the hair simulation also and it looks something like this and you have to make sure that your red line is properly at the end or else it will not add the key frame at the end you can see right now there is missing so for the demonstration purpose I'm not going to change this thing and if you do this type of stuff then you you have to remove everything your delete this thing your animation and do the whole process again from the start and it will fix your issue okay so right now I will not going to do this because I already did it in my main level sequencer I just use this level sequencer to show you so it doesn't matter also so after this what you have to do the main stuff happens right now so if you watch some tutorials on YouTube or any other website or anywhere on internet so you will see something uh like this to export the mesh first then the skeleton of the metahuman and they try to do some kind of bone deleting and try to retarget that bone to the mesh and try to fix that thing in blender so that's a Next Level hustle and if you try to do that same thing your brain will be blast it is so hard to do and you have to do a lot of things like you have to retarget bones to the mesh and all stuff to get that same metahuman ring into blender so there is a easy way to do this stuff I found recently so the thing that you have to do you have to just click on the body and you have to right click on this one and there is a big animation sequence if click on this one and I will just choose a position okay and Export the animation as a sequencer so it can take some time to to the animation you can see it's completed right now you have to just go to your folder where you save your animation so in my case it was there so now you can see there is a animation sequence and if I double click this one so it's totally baked into this mesh and you can see it is properly doing the stuff so right now it is showing the complete mesh but but when you export this thing into blender it will just show on the the body of this thing like you can see there it will just show this much if I double click on this one so like this much so what you have to do now is just rename this thing if I go to the animation sequence where I exported so this one you have to just rename this thing to the body like this and you have to duplicate this thing uh if I go duplicate so you have to duplicate this thing and you have to name this thing face then you have to duplicate again you have to write [Music] shoes and then you have to duplicate again so we have body we have pH we have shoes and we need a pants okay so I will just write pants like this okay so I created four different type of this things but in your case it could be it can be different if you're having no shoes and no pants in your metahuman then you have to just create only this body one because the body the legs and the are all joined together when you do not use any kind of pants or shoes so but in my case it was there the shoes and pants so I have to create this one so yeah you have to just make sure that how many parts of how many parts of the body are separated and you have to create everything separated okay you have to create those many like those many animation sequencer so for the body it was already there we need to retarget the face so you have to just right click on this one there is a replace skeleton and then you have to just click on the face this one and you have to press okay so when the face is done you have to double click this one and you can see now the face is properly animated you have to close this one now you have to go to the pants you have to right click so in the pants you don't need to replace the skeleton what you can do is very simple you have to just go to this mesh option and you have to just choose your pant so in my case it was this one cargo pant you have to just apply to the assets and then you have to go to your shoes double click this one and then the shoes are already there so you don't have to change this shoes you have to just apply to asset this thing and then save so now you can see we have the body we have the face we have the pen and we have the shoes okay so we have four different type of Animation sequences and the advantage of this thing is so when you export this sequences into blender what will happen is it will export the mesh and the bones and the animation all together in a single piece okay so you don't need to do any kind of bone retargeting or mesh that all stuff the old one so this is a new method you can try it's very useful so I will just show you the blender one one also so after this what you have to do you have to just right click on this one not right click you have to double click and you have to open this animation and then there is the option of export asset you have to click on this one and click on preview mesh so you will see something like this you have to just choose the location where you want to save your thing I already saved the meshes so if I go to the character once from and you can see I already exported all the meshes into like this 1 2 3 4 so you have to just click uh double click on the animation sequence suppose face go to the export this one preview mesh and then you have to just export so when you export all the animation sequences all four we will go to blender so there is one thing that I forgot to tell is when you click on this one and when you export the meshes like this one preview mesh you have to just choose the folder so when you press on save you will see something like this and in this one you have to make sure that you untick level of detail and collision will be on you you just have to copy the options that I use in this one and make sure that you use export morph targets just take the box that is that you're seeing in this one and just follow the whole stuff okay so and then you have to just click on export okay so this is the most important thing or your animation will not export properly to your xpx format okay so after that when you export all your animation this for animation and it will just create some kind of Animation preview meeses you don't need this thing you can remove this stuff and you have to just uh export everything into blend uh into fpx format and then you have to open your blender you have to click on import fbx so there is my one body mesh so if I click on this body mesh preview and make sure that you turn on the animation so I if I click on import fpx you can see my all animation is baked into the mesh and it works perfectly fine so you don't have to do any kind of like mesh like animation retargeting in blender it just work perfectly fine okay so you can see it works perfectly fine and it transfer all your mesh bones animation everything into one okay so like this it it will look like this and you have to just import everything like that uh your head your your face your shoes and your pants everything uh from un uh from un engine to that one so in my case I just show you one these things but if I show my my full body stuff so there is my full body stuff I will just do not save this thing so right now you can see there is my full body and I do the same process so it just copy all the animation into this one and it works perfectly fine but but you will face one problem with the head the face one so the problem is like if I just create a new one so if I export my head mesh with the same process like click on this one preview mesh like this and I will just export the face I will just click on Save make sure that the Box are properly ticked yeah and I will just export this thing I will just click on file import fpx I will just go to my location so there is my face mesh and if I import this thing you will see a error so you can see there is a python error and you can see like there is no Motion in this one so I don't know why this things happens but I got a solution for this one you have to go to your browser and then you have to write autoex fpx converter okay you have to write this thing and you have to go to fpx converter and you will see something like this you have to just click on window and make sure that you download 20 2013. 2 version this one not the 31 because in 31 there is a virus but in 21 it there is no virus so just make sure that you download this thing the last one so when you download the software you have to just install this thing it will look something like this when you open it for the first time so what you have to do in this one you have to just export your face mesh into this one and it will be convert the fbx into another fbx that is compatible with the blender and you have to just click on convert so it will create a folder into this one you can see it will take some time and the mesh is converted you have to just double click on this one and now you have to import this mesh into blender so if I show you if I remove this thing if I click on file import fpx uh you can see 2013 I will import this mesh into [Music] blender and now you can see the problem solved the animation exported properly and everything works fine okay and if you want to remove this weird all skeletal just go to this one uh not this one this one and there is a I think bone option yeah bone take this one and yeah you see box perfectly fine so like this you can export everything I'll just remove this thing for now I will open my my blender file that I created so this one so yeah when you export everything it will look something like this and you can do all kind of hair simulation like you can do claw simulation into this one because you have Depot you can do hair simulation like this you see I do the hair simulation into this one and you see this is doing all the hair simulation like that and after that you have to just create your hair simulation so in this tutorial I'm not going to show you the hair simulation how to do this hair simulation uh the one tip that I want to show you is that I want to give you not show you is when you do the hair simulation for this type of Animation like the complex animation backflip or some kind of too much movement stuff then you have to make sure that you in the particle settings when you do the hair simulation you have to make sure that you use much like quality step like too much like I use 80 and in the Collision quality I use 30 so this is like too much your it uh the whole hair simulation took me like 2 hours to bake so it will increase your render time but this type of Animation uh I think this is the best thing to do because I try with the lower value and I try bunch of settings just for now you have to make sure that when you apply the hair simulation in this type of complex movement you can see multiple back flips and all type of stuff so you need more samples like this quality step to get better quality of your hair so yeah that's the only tip I want to give because I try all type of values from like 10 15 2 5 everything so best thing works for me is 80 and 30 it will be depend on your system also but if you're increasing this value in this one like 80 and 30 then it will just inrease your render time a lot I will explain this thing uh in other tutorial so after this what you have to do you have to just do your hair simulation or claw simulation whatever you want to do but I will show you the hair one right now so you have to just click on the mesh after doing the hair simulation you have to go to your file and then you have to click on export and there is a lmic file okay so we are exporting this thing into lmic file so you have to click on lmic so the first thing you have to change is you have to go to scale and you have to write 100 okay and then you have to make sure your frames are good enough and you just untake everything untake this one also particles just take export here and untick everything and make sure this one is UN render and select the object and visible object this one okay and just select your directory where you want to save this lmic file and then export okay it will take a little bit time not that much like 10 to 15 minutes depending on your hair simulation how heavy it is so yeah after that I will show you the under one so the first thing you have to do you have to go to your edit and plugin and you have to enable groom plugin make sure that you enable this two plugin and it will show for a restart you have to restart your computer not computer like you have to restart your Andro engine and then you have to just create a level sequencer if I show mine so you can see so not you do you don't have to create any kind of level sequencer you can use the one that you use for the baking animation this one also you can use this thing also uh it will be better to use this one because you have already have the metahuman control rig and you do this thing also so use this thing okay but for showcase I will just show my how I use this thing okay so there we have the camera and there we have the BP okay so the next step is how you can export the that thing into import that hair simulation into blender okay so you have to just open your file so you can see there is my file and the other tip I want to give you is make sure that you have enough hard drive space in your PC because it will take a lot of space you can see it is 60 GB for 400 frames so it going to take a lot of space from uh on your hard drive so make sure that you have enough space so after this what you have to do you have to just export this lmb file into this one so right now I will just export this thing there but make sure that you properly exported into a folder so you will see something like this if you are not seeing this type of window then make sure that you enable the plug-in that I show and you have to just change this thing to rotation to 90 and scale to minus1 you have to change this thing or it will create some kind of uh rotation problem into an unre engine you can use guides so you can try with all also but sometime it crashes crash the Unreal Engine so just try those things uh first try with guides and if it's Crash then try all okay so for my case uh guides work perfectly fine for for me so you have to just leave everything like this and you have to click import okay so after importing this thing you will see something like this and it going to take a little bit longer like 15 to 20 minutes depending on your uh lmb file size so mine is 60 GB it took me like 20 minutes to export not 20 like 15 minutes so it depends on your lmb file size how how big it is so if I show my lmic file you can see you will see something like this okay and the other problem you will face like when you export everything and there will be a autosave option will pop in this area you have to cancel that that thing okay because if you just auto save this thing your unre engine will crash maybe in my PC it was crashing I don't know why but you have to just cancel that thing and you have to save your project from this area Okay so this is the another tip you have to follow and there we have the two different lmic files not LM one is groom and one is groom cache so you have to click on the metahuman and then you have to just click on the edit blueprint you will see something like this you have to open this thing and you have to click on viewport you can see so in this one you will see here option so in the here option in the groom asset you have to just attach this groom asset to this one okay so it will take some time you can see now it is attached properly now you can see there is a rotation problem in the groom one but you don't have to be worried about this thing because we twist our metahuman into the control rig if you remember that so so that's why it is doing this stuff and it it doesn't create any kind of problem so you have to leave this thing like that and then you have to click on the guide cache and then you have to just scroll down like this and you will see the groom cach you have to attach this file to this one and yeah everything is done and make sure that you turn off the looping because if you enable this thing it will Loop the animation the in this viewport and it doesn't feel good so just Loop just untick this one and then you have to close this thing okay so when you in your main viewport you see it looks perfectly fine it aligned with your mesh properly and if it is not aligned yet like if you're getting some your hair is in the ground or in the left or right then try to um try to go to your blueprint and try to edit this thing into this one just do some up and down uh 90° rotation most of the time you have to just uh rotate this thing into 90° it doesn't matter in X direction or y direction you have to just do 90° rotations because from blender to unel engine there is a 90° difference I don't know what was that but you have to just play with the 90° like you can uh move this thing to 90° like this if I move this thing X you can see it gone it's gone but in in your case it it may help you but most of the time you don't need to do anything in this one it will work perfectly fine like this so right now you can see it is moved like this but when I move my level sequencer it aligned with the mesh okay so like this you can export your blender animation into this one but still you will get some kind of weird your skin is showing from the mesh if I show you like it is not showing right now but yeah you can see there we have a small pop in the head but in your case it may be like little bit the head is moving like this if I show you and yeah the other thing okay the most important thing I forgot okay so after this you have to open your level sequencer and the level uh level sequencer you have to click on the face you have to click on ADD not this one you have to go to your BP this one and you have to select here then it will be add a ha option like this so and then after this you have to click on the Hair Plus and then you have to enable the chroom cach okay so it will apply the groom cach also and then your simulation will be applied to your this one okay so you have to follow this step properly and after this you will see some kind of mismatch in your mesh and your hair so it will look something like this if I show you it will look something like this the UN timing matching stuff like that so what you have to do you have to just untake your magnet this disable this thing you have to zoom in to your frame and you have to just uh do this thing manually just just move this thing up like left right and try to move the whole here forwards like this and try to match this thing like this okay so it will be matched with your skeleton properly and it will be simulating properly if I undo everything so you have to just do some kind of hit and trial in this one so like this and at some point you will see your hair is perfectly matched with your skeleton not skeleton like in your metahuman and you can see it is properly follow the metahuman if I show you you can see it is properly follow the path of the metahuman head like this okay so you have to do some kind of hit and tri and now you can see there is a popping like this so you have to just deal with this thing you have to just go up and down like this left and right and you have to just align this thing like that okay and yeah and and I'm not saying that it will be perfectly match with this thing it will not I don't know why but it doesn't match perfectly with the meta head I don't know there is some kind of popping stuff also in the blender I didn't see any kind of popping like this but when I export this thing into un engine it it just mismatched this thing I don't know why so you have to just deal with these things and you have to just make sure that you are using a proper camera angle for this one so when the hair is popping like this make sure that you do not capture that angle just move your camera in some other direction yeah something like this because if you try to do simulation in other stuff and try to export in andal engine 5 there will be some kind of problem in this things it will not be perfect every time but you can see we can use this thing also it is doing perfect job but in some areas it just pop the head a little bit it is what it is like stuff so you can't do anything about this so you have to just deal with these things and make sure that you use uh separate type of camera angle like this where the head is popping you just hide the hide that angle sorry not angle like that portion with your camera angles like that and yeah it will work perfectly fine and the UN engine hair simulation is not good for film making stuff like that it is made for games basically so it is not that much high quality and it is for basically for real time so there is not that much detail of hair simulation so that's why I use blender to create my hair simulation and yeah everything okay so yeah it was just like that you can see it is matching quite a bit good quite good so with yeah you see there is a popping in the head in this area you see so when this thing happens you have to just go down or just go some else camera angle or you can fast forward that area and yeah you you have to just deal with these things you can't do anything so if I get something more accurate uh uh stuff or any kind of method then I will definitely make another tutorial for this one for the hair simulation I will make another tutorial how to create this type of hair simulation and blender because if I try to combine everything in one uh tutorial then it going to be so long no one will watch and yeah that's it for this tutorial thank you for watching
Info
Channel: EVERYTHING IS CGI
Views: 320
Rating: undefined out of 5
Keywords: Blender, Unreal Engine 5, Hair Simulation, Game Development, 3D Animation, Character Modeling, Real-Time Rendering, Materials and Shaders, Interactive Hair Dynamics, BLENDER HAIR TO UNREAL ENGIN 5
Id: trZOuPte9KY
Channel Id: undefined
Length: 28min 17sec (1697 seconds)
Published: Fri Mar 01 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.