Using agent metadatas as xgen custom shader attributes
From Atoms Crowd 3.0, you can control custom xgen shading attributes with agent metadatas.
- Create an xgen description
- Inside the preview/option tab, go under the "custom shader parameters" area and add an "hair_color" color attribute.
- Create a new arnold shader and attach to the color attribute an "aiUsetColorAttribute" node
- Set "hair_color" as attribute name on the "aiUsetColorAttribute" node.
- Now attach the shader to your xgen description
- Create a new atoms scene
- Add an "addMetadata" module, then set the metadata name to "xgen_hair_color" and vector as type. Finally assign some random color to the vector value attribute.
- If you want to see inside the viewport the color add a "copyMetadata" module and set "xgen_hair_color" as source and "color" as destination, turn on copy and initFrame options. Finally under the settings tab of the agent group turn on the "Use color metadata" option.
- Export an atoms cache and a groom cache from your sim.
- Create a new atoms proxy node and set up the variation table, the atoms cache and the groom cache
- Render your scene with arnold.
Copyright © 2017, Toolchefs LTD.