Atoms supports static xgen collections for Renderman and Arnold.
注意 |
---|
In this section it's explained how you can manually export geo with fur and set up your variations. This will be handled automatically if you use the Variation Builder. |
Exporting xgen collection and meshes
Create an xgen groom on our atoms robot, something like in the picture. Then you can start to export the data needed by atoms.
First you should export the meshes. Please remember to export them after you created an xgen groom, this is because xgen adds a xgen_Pref attribute on the mesh that the Renderman procedural uses during the rendering. Export the meshes with the atoms mesh exporter (Atoms menu: Atoms > Export > Mesh exporter) or using the variation builder.
Now you can export the collection. Select the xgen collection and select from the Atoms menu: Atoms > Export > Xgen Collection Exporter.
Select the head mesh and inside the ui press the geo field select button. Choose an output folder, set an output name in the last field and press export.
The tool saves a copy of the current collection in the output folder, it renames the collection using the output name and it exports all the materials attached to the descriptions. It creates also a .groom file, this is an atoms file that you will use later to setup the agent variation.
If you want check the content of the .groom file, open it with python. It's an Atoms MapMetadata.
Setup the atoms scene
- Create an agent group
- Add a grid layout module and set the grid size to 3,0,3
- Add a state machine module and set the state to 1
- Add a variation module and se tthe variaiton name to Robot1
Now from the Atoms menu: Atoms > Variations > Import variation json, import the robot.json variation file from the AtomsMaya\data\variation folder.
Open the Agents Variation Manager from the Atoms menu: Atoms > Variationa > Agents Variation Manager.
Select the atomsRobot from the column on the left. Inside the geometry tab add a new entry press the right mouse button. Set "hair" as key and set the path of the .groom file you exported. Change the robot1_head path with the mesh we exported at the beginning of this tutorial.
Go inside the GeometryGroup tab. Select the Robot1 variation and add a new entry pressing the right mouse button on the table on the right. On the first field select hair and on the second one select one material. The material you select doesn't influence the hair material because at render time it always use the ones contained inside the collection folder. Press ctrl+s or from the File menu choose "register to atoms" to save the changes.
Exporting caches
The xgen fur can be renderer only using the atoms proxy node. So you need to export first an atoms cache using the Cache exporter from the Atoms menu:
Atoms > Export > Cache exporter. Select the agent group from the list and press export.
Now you should export an alembic cache because the xgen procedural can read only the mesh animation from an alembic cache.
Open the alembic exporter from the Atoms menu: Atoms > Export > Alembic exporter. Inside the ui select first the agent group at the top and then select all the agent on the bottom widget. Select Variations from the mesh mode menu and turn on the "Groom Cache" option. Select an output file and finally press "Run".
Creating an atoms proxy
Create an atoms proxy node from the Atoms menu: Atoms > Rendering > Create Atoms proxy node.
Set the atoms cache you exported before and also the alembic groom cache you exported before. Inside the alembic groom cache folder you will find a file for each agent, just select one of those files.
Rendering
Renderman: Create some renderman lights and select from the Atoms menu: Atoms > Scene > Setup xgen settings. This will add a mel script to the renderman post world ri injection scripts. This script sets up the xgen camera attributes at each frame.
Arnold: Create an Arnold light.
Finally you can start the render.