Tuesday, December 11, 2012
Hi-Res simulated cloth as skinned mesh
Here is a small snippet to convert a vertex-animation into a joint animation. This comes in handy when you, for instance, simulate a piece of cloth in maya and want to import it in your game engine.
This function creates a joint per vertex and uses the pointOnPolyConstraint (Maya 2012 or higher) to align them to the sim. I love this constraint, its basically constraining in UV-space.
For decent looking results, I simulate a hires mesh and wrap deform a lowres mesh for game export. From the hires simulation I then generate a texture sheet with normalmaps that will be used in a "texture atlas walk shader".
Hopefully I can post more on that later.