Atoms now works with fur (dynamic and static) and cloth deformations.
Currently this is just supported in Maya and it uses XGen and nCloth.
Process
Both cloth and groom caches are exported in a post process after your simulation has been is cached.
For adding cloth/fur to your crowd simulation you will have to:
- Run the variation builder on a character having a nCloth and/or XGen setups in Maya.
- Build a simulation, apply variations onto your agents and create an atoms cache.
- Use the CFX Simulation Exporter to create a clothcache and/or groom cache file sequences.
- Set up an Atoms Proxy with the cloth and/or groom caches.
The simulated cloth meshes will only be visible in the viewport with the AtomsProxy and not with live simulation. Fur is only visible in your renders and does not get displayed in the viewport.
CFX Simulation Exporter
The CFX Simulation Exporter lets you generate cloth and groom cache file sequences. It lets you also debug the exporting process. The post process generating the cloth and groom caches will only evaluate agents with variations having nCloth (nCloth or nRigid) meshes or scalp geos.
The first parameter of the UI (Action) defines the behaviour of this tool:
- Build Scene & Export: builds the Maya scene and exports the caches from it.
- Build Scene: builds the Maya scene only.
- Export: exports the caches from a scene previously built by this tool.
UI parameters will be shown or hidden depending on the selected action. The "Build Scene" action has the same parameters of the Build Scene & Export mode except the output fields.
Also the "Build Scene" action does not work with batches, it will only build the first batch scene.
Build Scene & Export parameters
When using this action the output cache frame ranges will have the same frame range of the input atoms cache.
Cloth
- Enable: Enables cloth building build and export.
- Cloth Cache File: the output cloth cache file path.
- Merge: If this option is activated and the selected cloth cache file already exists on disk, the cloth cache generated by this build will be merged with the current content of the cloth file cache sequence.
Fur
- Enable: Enables fur building build and export.
- Groom Cache: the output groom cache file path. Groom caches are the alembic alembics for the scalp geos.
- Curves Cache: the output curve cache file path. Curves caches are the alembic alembics for the XGen hair guides.
Source
- Cache File: the input atoms cache.
- No Batch/Use Batch: activates the batch mode. With batching on, the built/export process will be divided in sequential steps. This is particularly useful when working with a cache containing a high number of agents having cloth meshes. Even though batching will create a new scene per batch, you will gain performance from not having a heavy cloth simulation.
On the other hand it's better not to use batches when you have a small number of agents you want to simulate. - Batch: the number of agents per batch.
Filter
- Agent ids: you can filter agents with a comma separated string. (i.e. 1,2,5-10: this will only generate a cloth cache for agents 1, 2, 5, 6, 7, 8, 9 and 10. Agents without cloth meshes will be ignored)
- Variations: only agents with the given variations will be cached. If the field is empty all variations this filter won't be considered. You can specify more than one variation with a comma separated string (i.e. Robot1,Robot2. Agents without cloth meshes will be ignored)
Variations
- From Scene: the variations will be read from your scene.
- From File: variations will be loaded from a file.
- Variation File: the variation json file.
Options
- Ignore Render Geo: when checked only the geos relevant to the simulation will be built.
- Pre Roll: a number defining the pre roll value for the cloth simulation. The simulation will start at the initial frame of your cache minus the given pre roll value. (i.e. if the cache starts at frame 1 and the pre roll value is 20, the simulation initial frame will be -19). The agents will animate from their bind pose at the simulation initial frame.
- Height Offset: an offset height value for your agents. The offset will be applied at the simulation initial frame.
Rigid Meshes
- Users can also provide alembic files that will be used as rigid meshes during your simulation. Users can also provide rigid parameters for those alembic files to make the simulation more realistic.
Export
Use this action only on scenes built previously by a "Build" run. The top part will be exactly the same as for the "Build and export" action.
On the bottom few other parameters will have to be filled in.
- Cache file: This becomes visible only when a groom cache path is given. This is the original atoms cache used for the generating the scene.
- Variation File: This becomes visible only when a groom cache path is given. This is the original variation file used for the generating the scene.
- Sim Start Frame: the simulation start frame as described above in the pre roll parameter description.
- Start Frame: start frame for cloth cache.
- End Frame: end frame for cloth cache.
- Stack Order: this option will be stored in your cloth cache and will be used when reapplying your cache on the meshes at render time. First: when reconstructing the mesh, the mesh will have the cloth cache applied first and then it will be skinned (this value should not be used for cloth simulation). Last: only the cloth cache will be applied to your mesh (no skinning). You can find more info here.