Versions Compared

Key

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

Atoms currently supports only cloth in Maya, although it can be visualized and rendered in Houdini too.

The cloth cache files are generated in a post process and you will need a cache sequence file as input.

Please have a look at this tutorial to know more.



Process

Cloth caches are exported in a post process after your simulation has been cached. 

For adding cloth to your crowd simulation you will have to:

  • Run the variation builder on a character having a cloth setup in your host application. In Maya we use nCloth.
  • Build a simulation, apply the cloth variations on your agents and create an atoms cache.
  • Use the

    Cloth

    Simulation Exporter to create a clothcache file sequence.
  • Set up an Atoms Proxy with cloth cache.
  • The simulated cloth meshes will only be visible in the viewport with the AtomsProxy and not with live simulation.

    Cloth tools

    Cloth setup

    The Cloth Setup tool allows you to tag variation meshes as "hidden". You can access the tool via the Atoms menu: Atoms > Tools > Cloth > Cloth Setup

    Hidden meshes will be added to your variations, but won't be rendered or displayed in the viewport by the Atoms Proxy.

    They will only used when generating cloth caches, you would usually tag nRigid meshes as hidden if they are not meshes used at render time.

    The Cloth Setup UI lets you tag, untag and select all hidden meshes.

    Cloth Simulation Exporter 

    The Cloth Simulation Exporter lets you generate cloth cache file sequences and debug the exporting process. The post process generating the cloth cache will only evaluate agents with variations having cloth and rigid meshes. 

    The first parameter of the UI (Action) defines the behaviour of this tool:

    • Build Scene & Export: builds the Maya scene and exports the cloth cache from it.
    • Build Scene: builds the Maya scene only.
    • Export: exports the cloth cache 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 cloth sim file field and the merge option.

    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 cloth cache frame range will have the same frame range of the input atoms cache.

    • Cloth Sim File: destination path for the cloth cache file sequence.
    • 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.
    • 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.
    • 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)
    • 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.
    • 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.

    Image Removed

    Export

    Use this action only on scenes built previously by a "Build" run.

    • Cloth Sim File: destination path for the cloth cache file sequence.
    • 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.
    • 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).
    Image Removed

    Constraints

    Currently only the "Component", "Component to  Component" and "Point to Surface" constraints are supported.

    Once you have created your nCloth setup in your variation scene, the variation builder will take care of exporting it alongside your variations.