Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

“Clip cloth” is a new cloth cache generation method introduced in Atoms 7.

It consists of generating a database of cloth simulations per animation clip; the clip cloth cache generator tool can then use this database and the anim state metadata on each agent to automatically generate a cloth cache from your simulation without simulating all the agents with nCloth.

The cloth simulations in this database are stored in root space. This allows Atoms to easily apply and merge them to the final simulation.

Create your nCloth setup

This is the same step used for the standard cloth workflow.

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 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 operator, so a skin deformation must be applied. For this reason, a skin deformed is necessary before the cloth is set on the geometries affected by leg joints.

From the scene above, export

Generate the clip cloth database

As mentioned before, we need a database of cloth simulations per clip.

Create a Maya scene and initialize the Atoms scene with the default Atoms man character, then load the variation table you exported before.

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

From the Atoms menu open the “Clip cloth exporter”:

image-20241014-165100.pngimage-20241014-165219.png

This tool is similar to the cfx exporter. You can build, build&export or export the scene/cache.

In the “Variations” section, you can choose an external variations file or use the variations from the scene.

In the “Animation“ section, you can choose which animation clip to use to generate the clip cloth cache.

in the “Geometries” section, you first need to choose the agent type, then you can choose a specific variation or you can manually choose which geometries to uses to build the scene and export the clip cloth cache.

In our case we have just one variation called “casual” that contains the t-shirt_GEO and jeans_GEO geometries.

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 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 at the beginning, but instead to blend poses it blends cloth cache frames.

At this point press run and the tool creates a maya character in your scene apply the nCloth setup and the manIdle animation and then export the final cloth sim on the disk.

Remove the agent_000 group the tool created and redo those steps to export the manIndleToWalk and the manWalk clip cloth caches.

Generate the final cloth cache

Open the scene above:

In this scene there is an agent group with a grid layout, state machine a follow curve and variation module

image-20241014-170544.png

Select the state machine module, and in the “Metadata section” activate the “Write anim state metadata” option.

image-20241014-170637.png

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 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 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, do it then create an atoms proxy node, load the atoms cache and the cloth cache the “Clip cloth cache exporter” has generated.

image-20241014-171427.png

  • No labels