Add animated elements in Bifrost-USD
To store animation such as a varying attribute or a deforming shape in a USD stage, you must connect the frame output of a time node to the corresponding Bifrost-USD definition nodes, and use the add_to_stage node inside a feedback loop to accumulate the data in the stage from frame to frame. Save the stage to file after playing through all frames.
When working with animation in USD, make sure that Cached Playback is off in Maya.
The frame input is available on the define_usd_mesh and define_usd_attribute nodes.
- If you want to animate specific attributes and not the whole prim, connect
timetodefine_usd_attribute. - To animate the shape, connect
timetodefine_usd_mesh. - If the attribute values to animate are connected to the
attribute_definitionsport of adefine_usd_meshnode that is already set up for animation, then you do not need to connecttimeto thedefine_usd_attributenodes individually.
You can edit the existing compounds or build your own to animate other prim types or specific attributes.
In the parameters of a
define_usd_meshordefine_usd_attributenode, enableuse_frame.Connect the
frameoutput of atimenode to theframeinput. In the following example, the display color attribute will be animated as well because the mesh itself is animated.
Select the
add_to_stagecompound downstream, and press Ctrl+G to make a compound.
Double-click the compound to enter it.
Right-click on the
stageport of theinputnode and choose Set Port Feedback > out_stage. The ports are now linked as feedback ports.
Exit the compound and play the scene through to accumulate the animated data in the stage.
After playing through, you can save or export the stage to file.
If desired, you can create a condition to save automatically on the last frame.
