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
time
todefine_usd_attribute
. - To animate the shape, connect
time
todefine_usd_mesh
. - If the attribute values to animate are connected to the
attribute_definitions
port of adefine_usd_mesh
node that is already set up for animation, then you do not need to connecttime
to thedefine_usd_attribute
nodes 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_mesh
ordefine_usd_attribute
node, enableuse_frame
.Connect the
frame
output of atime
node to theframe
input. In the following example, the display color attribute will be animated as well because the mesh itself is animated.Select the
add_to_stage
compound downstream, and press Ctrl+G to make a compound.Double-click the compound to enter it.
Right-click on the
stage
port of theinput
node 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.