Unreal Cloth Modeling Considerations

Posted by:

Unreal Cloth Limitations, When to Use Cloth:

Unreal cloth is not a versatile as you might like.  It has a lot of limitations chief among them is that it is limited to 3 collider shapes: Cube, Sphere and Capsule. Of these shapes only the cube can be scaled in all three axis.  The sphere can only be scaled uniformly and the capsule can only be scaled uniformly and then along it’s long side.  This makes for very poor collision shapes.  Not only that but you can’t combine multiple colliders under the same joint.  If you could you might be able to place a few smaller shapes within the body and approximate the underlying surface.  You will not get cloth to drape across a figure.  You will not get it to cling and slide defining the shape underneath, you will not get it to collide and bounce off of the character mesh in any precise way at all.  Cloth is primarily made for long flowing surfaces like skirts and capes or a trench-coat.  Simple capsule colliders that approximate the limbs are fine for a collision with something like a cape because it needs only to have a brief collision and then it will continue to blow around and trail the character.  Cloth is not as effective for something like a short jacket or shirt because such things lay close to the body and need to collide with complex underlying shapes.  You may be able to get a corner of a jacket to react correctly but by far most of it will need to be skinned and have precise cloth mapping that will help get a bit of dynamic movement in choice areas.  I should mention that using a combination of rigged and dynamically solved joints in the skinning of cloth objects with cloth solving on top would be the optimal way to generate better clothing flow but of course this would require a lot of additional development on the front end.

Unreal Cloth Considerations for Character Designers:

When creating surfaces that will be driven dynamically there are a few considerations that will make rigging the surface possible:

  1. First off, when modeling character surfaces having an idea of what will be purely skin and what will be driven by cloth will save you a lot of time and improve performance for the game and the pipeline.  Only surfaces that are loose and exposed to “air” should be cloth. So in most situations clothing lying close to the character’s body will be purely skinned. A close fitting t-shirt and skinny jeans will be entirely skinned.  A looser fitting jacket will probably have cloth simulation. So if you know that the t-shirt will be skinned and the jeans will be skinned and the t-shirt lies on the outside of the jeans then you know that the jeans beneath the t-shirt need not be modeled.  If fact, you could conceivably make these the same object sharing the same UV map and shader. The jacket lying on top will certainly block most of the t-shirt, so no need to model the surface lying under the jacket. Knowing that we need only part of the shirt modeled textured and rigged and the same for the jeans up to where the shirt is covering takes a fair amount of work out of the character development and processing power for that character.
  2. Surfaces should be optimized for skinning and clothing.  This means quads running in logical directions and relatively evenly spaced edges.  Here we are looking for edgeloops running parallel to the structure of the surface. You can break some rules, tris are fine in compact areas and surface redirections.  Stay away from n-gons, and edgeloops that helix up surfaces or redirect illogically. Some surfaces exported from sculpture programs or cloth generation programs create surfaces that have discoordinated geometry.  These have to be re-topoed. Make sure that you run cleanup on all of your surfaces because non-manifold geo is always problematic.
  3. All connected surfaces that will be driven together must be geometrically connected.  Which is to say that the mesh must be connected by vertices not just part of the same object.  For instance if there is a button on the surface of a jacket that is merely part of the same object but not merged in by its vertices then it will not follow its place on the jacket.  It will float along kind of doing its own thing. Which brings us to our second consideration.
  4. When rigging surfaces, skinned but especially dynamically solved surfaces should maximize texture information and limit geometry.  This is of course a general rule of 3D animation but it is especially important for game engines as poly count and skinned surfaces are taxing on processing power.  As a rule of thumb, if you can’t see a feature of the model in profile from the camera angle you are working with then it should be texture that describes the feature not geometry. If you must have it be geometry then try to strip it down to only what you need to get it to look okay in profile.  And back to consideration 1, you need to stitch it in to the surface, having every vertex at its base connected into the surface it is on so you want that connection to be pretty light.
  5. Modeling edges and back faces:
    First off, you may not need to do that at all.  If you can get away with the mesh being a “single sided” surface then that is actually fine.  Unreal has a two sided face rendering option. However, I don’t know if it takes the same UV layout or if another surface can be assigned to the back faces (somebody should look into that).  If the character is featured close enough to the camera to be able to see the edges of its clothing then just modeling the edges is not enough. You have to model the back faces of the object too.  The reason for this is that the cloth solver creates a certain tension across the surface. As long as the surface is unbroken it reads it as solid and connected to the next line of verts. Once that surface ends the edge of it will go just as slack as the rest of the surface.  If the edge of the model is just tucked under then it will flop out and be exposed. It will also create a weird sort of buckling of the surface as it sort of tries to hold its form but relax at the same time. Modeling the back faces creates a tension that holds the back of the edge up.  You should only need to model the back faces up to where they are no longer visible but it is probably easier to just extrude the entire surface. The edge should not have any profile edge-loops. That is to say no edge-loops running parallel to the edge down the center. That line of geometry will also sag. 
  6. Layered surfaces:
    Layered surfaces are both the idea behind cloth and it’s biggest drawback.  There will be interpenetration between the cloth surface on top and the surface on the bottom if you are not careful to model the surface properly and set up the correct dynamics for the cloth surface.  You will want to take this into consideration when modeling.  Delete any surfaces that won’t be seen due to higher layers of purely skin weighted clothing items.  Good use of the clothing maps will help minimize penetration.  Know that when the cloth relaxes during simulation that it will develop it’s own ripples and creases.  Insure that your geometry won’t cause too much rippling as it relaxes, driving the concave ripples into the underlying surfaces.  But, that being said, moving the dynamic surface out away from the underlying surface may help in creating a bit of buffer between the two surfaces, so find a happy medium between those.
  Related Posts

You must be logged in to post a comment.