Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the man.ma scene above, you can find the man character with the tshirt_GEO and jeans_GEO meshes set with nCloth. There is only a small difference with a normal setup. The jeans_GEO also has a skin cluster deformer applied before the cloth setup. This is needed if, in your simulation, you are using ground adaptation or foot locking. Beacus Because when Atoms generates the final cloth cache for an agent it first merges the cloth cache frames of all active animation on the agent in root space, then converts the cache in word space. However, the agent’s final pose could differ from the input animation pose due to ground adaptation or foot lock operatorlocking, so a skin deformation must be applied. For this reason, a skin deformed deformer is necessary before the cloth is set on the geometries affected by the leg joints.

From the scene above, export the variations using the variation builder.

Generate the clip cloth database

...

Now we need to generate the clip cloth caches for the manIdle, manIdleToWalk and manWalk clip since they are the only 3 animation clips used by our agents in the simulation inside the sim.ma file below.

...

Then in the “Option“ tab choose a preroll of 10 frame, and in the “Output” tab set a folder that will contains our database of clip cloth caches. The merge option is used if you want to merge the new clip cloth cache you are going to generate with a one that already exists on your disk. For example imagine you have2 have 2 o 3 variations with different cloth geometries. You need to build and exporter each clip cloth per animation for each variation, and in this case you need the merge option since they must be stored in the same manIdle clip cloth cache.

The “Enable loop blend” does exactly the same thing the state machine doesn’t when an animation clip has the loop active and the loop blend property > 1. It blends some of the frames at the end of the animation loop with some frames at the beginning, but instead to blend poses it blends cloth cache frames.

...

This writes on each agent the anim state metadata. This metadata contains information about the current clips and states active, with clip name, current frame and blend weight of each active clip. Wiht With this information and the database of clip cloth caches, the “clip cloth cache exporter” is able to generate a final cloth cache from the simulation.

Open the “Clip cloth cache exporter” from the Atoms menu:

image-20241014-170846.png

image-20241014-170931.png

Add the agent group to the export list. Set a path where the cache is going to be saved in the “Cache path” widget. The , choose the path where we stored the clip cloth caches we generated in the “Clip cloth path” widget and then press “Add” button. You can pass multiple clip cloth paths, so if you have multiple clip cloth databases/path you can specify them here.

At this point press the “Export” button and the tool generates the final cloth cache.

To check the result we need to :

  • export first an atoms cache

...

  • create an atoms proxy node

...

  • load the atoms cache

...

  • on the proxy node

  • load the cloth cache the “Clip cloth cache exporter” has generated

...

image-20241014-171427.png