UE4 Character Cloth Simulation

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so in this video we're gonna look at soft cloth width in unreal so for this video all you need is Unreal Engine 4 and in your Epic Games if you go to an real engine and the learn tab you scroll down a little bit you'll find the content examples click on 'contact examples and create a project after you created the project if you go to maps and you look for cloth you can open up the cloth map and it will bring you to this map now in this video we're gonna look at creating white maps within the skeletal mesh editor inside of unreal we're not going to touch the env cloth by Nvidia because it seems to be a bit of an outdated process so the reason why I'm talking about this map is because right here you have these different cloth simulations with different settings and later on we can come here and copy some of the settings on these different simulations onto our own character here we have a character that as this simulation applied to his clothes you can see how it moves using these blendable animations this method is the preferable method if you're using cloth simulation on a character a playable character now on an NPC character you can use something a bit more accurate and we're gonna see that in later videos but when you have blender balls like this which is blending one animation to the other it's great to use this dynamic system because the blending is happen happening inside of Unreal Engine and so if you're using a system where you are baking your animations you'd have to create every blend for outside of Unreal Engine and that would take a long time so this is the best method for dynamic cloth animations and let's look at it and see how we can apply these to our own characters and before I do that you you can also investigate this guy here if I browse the asset and let's just open up the blueprint if I press mesh here and I press this magnifying glass it will take me to the mesh and if I open the mesh I can see the clothing tab and I can investigate how this was painted and you can do that by yourself and see how it was paint and it's physics assets assets and how dad is set up so I'm gonna do this on a personal character actually show you how I did this or a personal character before we move on I want to show you the wireframe on this you get really good results as you've seen when you have a lot of virtus density this is very dense as you can see if we look at our character here our character is not as dense novartis wise as those cloths the bigger the density the the better the result but still if you want to do these on a character which has a lot of cloth you have to keep in mind that really big density is gonna create a character with a lot of polygons with a lot of vertices and you might not want that so you kind of have to sacrifice one for the other so here I have a custom character imported into Unreal Engine and I specifically selected this character because there is a problem with this wireframe here as you can see here in the wireframe it's a bit hard to see but you can see that the mesh or is closed as problem right here in the center my problem I mean that the density is not equally distributed the spacing between the pixels between the vertices I mean is not equally distributed especially here in the center if you want to get simulation you want to have even spacing throughout your map I'm gonna leave it at that and I'm gonna show you how to simulate and you'll see what I mean as this is going to cause some issue now I believe what happened here is when the character was when a character was created and a clothed applied to it and skin white supplied to the clothes he was in a T pose his legs were closed and when I imported it into unreal it imported to me than a pose then because it had skin weights applied to the quote when he opened up his legs a little bit he created that issue in the middle of that cloth so it's something to keep in mind make sure that the wireframe shows you a evenly distributed vertices okay so the first thing we to do is if you don't already have the clothing tab open you have to go to window and click on clothing and then you'll have a clothing tab here now I already have a clothing asset here there's my mask down there but it's not applied to my clothes so I'm gonna show you how you can create one so if I go into section selection so that I can select different parts of my character here otherwise it's just gonna select the skeleton bones and I going to create clothing that from section I can rename my asset name this is gonna be a new asset and I can choose my physics asset usually just if you already have a physics asset for the mesh it will automatically select it so if I press create now there's a new asset here but this asset is not applied to the clove yet we need to apply it if I right click and I choose apply clothing asset I can choose my new asset and click on it and it will be applied one thing to keep in mind is you don't need to apply it right away you can first paint on it and then apply it and that will make the painting process faster when when it's not applied but of course you can't really see as the simulation if it's not applied so I am going to apply it right now or simplicity sake I'm gonna press activate cloth painting and you can see that this is my other asset and this is the new asset you can see the problem in this area ear this is gonna create a few problems in simulation still I'm gonna show you how you can achieve this you can paint it you have the the settings down here you can have different tools like brush gradient smooth and fill we mainly gonna look at brush here and then the radius usually the radius comes at 128 a little bit big so I like a radius of 8 if your radius is really low you might miss out some vertices so radius of 8 usually works for me you can see what works for you now paint value is a hundred this is s to do with density usually if you go to a hundred and you start painting you get these white area this means that this white area is going to be simulated the pink area is not going to be simulated now you also have the brush strength and it's usually set to OFF 0.5 if I go down to 0 here in the paint value and I start painting it gives me black but if I keep painting on these areas starts coming as pink again and if I increase my strength to 1 it will paint pink right away I like to keep it at 0.5 and let's just paint value of 100 down here basically what is pink we'll still have skin weights applied to it and what's white will not if we simulate this if we press H we can see the simulation happening pressing and holding H on the keyboard you get the simulation happening there is deactivate the cloth and also see the simulation going on and if you if you come here to your previous scene you can't select an animation if you have an animation for your character and we can see how it looks okay that's some protrusion over there on his right leg and on his left leg as well obviously we can improve this by creating a transition between the pink area and white area the simulated is not simulated area if we go here to our smooth then use these tool settings mesh this is the amount of smooth you want so if I press smooth mesh it will smooth between the two areas and we can get a bit of a better result can also go into your paint and then reduce the value go into your brush and reduce the value a little bit and you can paint in your own transition right let's look at why that is happening and why that is happening is if I go into my physics asset my physics is what's gonna determine what will make the cloth move you can see that these capsules here they are the ones responsible for moving the cloth I push this capsule up front a little bit to the front a little bit and you can by pressing spacebar you can rotate them and scale them now if I save my physics s it didn't go back here something to keep in mind you might want on turn it on and off again and let's see our animation still a bit of a beautiful problem there so if I go here and I rotate these guys so this is what's what's making it possible the physics asset is what making it possible for this to move so if I activate in deactivate now there's no more protrusion there it's a bit better so I can keep arranging it and pushing it forward a little bit and making that work a bit better can also look at your capsules while you're looking at the animation if you go to character clothing and turn on collisions you can see what your capsules are actually doing this creates an asset a physics asset here and it creates a mask so this is like a weight a weight map this mask here now you can come here after you're happy with the simulation that you have we can come here and improve the simulation by using the cloth config settings now the cloth config settings this is why I open up the content examples if I go into content examples I go into these cloths here and I select one that I like and for example these one over here it's more literary type it's not too stretchy so I like these one I can right-click and I can go and edit and this is the one I click on it's acid and I get the cloth config down here so if I right click here where it says cloth config and I just choose copy now I go back to my project and there's cloth config here if I right click on this and paste now I have the configuration the same configuration applied to my mesh at any point I can remove my clothing data and I can apply a different clothing data so this is the the previous one that I had it's a bit more stretchy and you can see because I made it a bit more stretchy you can see the problem that we're having because of the skin weights that I've talked to the beginning of the video the spacing of the vertices wasn't right here in the center if I look at my wireframe you can see the stretching there on the wireframe it's terrible so you have to keep that in mind if this was a garment that was closed all around the character and it was going all the way to his feet this kind of simulation would probably suck it would probably not be ideal and that's why we're looking at Becky and baked animation later on so I'll see in the next video
Info
Channel: MadPonyInteractive
Views: 75,467
Rating: 4.9468932 out of 5
Keywords: tutorial, 3D, code, zbrush, zscript
Id: X5acomKAux4
Channel Id: undefined
Length: 11min 28sec (688 seconds)
Published: Tue Dec 10 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.