time sampled variants?

   2045   8   3
User Avatar
Member
355 posts
Joined: 11月 2015
Offline
I’m creating a lookdev. template scene and I have a turntable xform prim I want to have two variants, one when it’s animated (spinning) and one when it’s not. After I set this up and drop down a set variant lop, it says setting animated variants is not supported in USD. What would be a good way to setup animated variants?
hou.f*ckatdskmaya().forever()
User Avatar
Member
8538 posts
Joined: 7月 2007
Offline
traileverse
it says setting animated variants is not supported in USD
Is that a Houdini limitation?
Based on Pixar usd glossary:
Each Variant can contain arbitrary scene description including the introduction of additional composition arcs. This gives us great flexibility in building up variations out of existing, modular pieces that can be referenced, inherited, etc.
it sounds like it should be possible if each variant can really contain any scene description or reference
Edited by tamte - 2022年12月12日 18:13:53
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
355 posts
Joined: 11月 2015
Offline
tamte
traileverse
it says setting animated variants is not supported in USD
Is that a Houdini limitation?
Based on Pixar usd glossary:
Each Variant can contain arbitrary scene description including the introduction of additional composition arcs. This gives us great flexibility in building up variations out of existing, modular pieces that can be referenced, inherited, etc.
it sounds like it should be possible if each variant can really contain any scene description or reference
It seems to work but I get this warning:

Attachments:
time_sampled_variant_error.jpg (61.9 KB)

hou.f*ckatdskmaya().forever()
User Avatar
Member
7755 posts
Joined: 9月 2011
Offline
traileverse
tamte
traileverse
it says setting animated variants is not supported in USD
Is that a Houdini limitation?
Based on Pixar usd glossary:
Each Variant can contain arbitrary scene description including the introduction of additional composition arcs. This gives us great flexibility in building up variations out of existing, modular pieces that can be referenced, inherited, etc.
it sounds like it should be possible if each variant can really contain any scene description or reference
It seems to work but I get this warning:

That means the selection of the variant can't be animated, the variant itself can contain animation. To animate which variant is visible, two references would be needed and the visibility flag can be animated instead.
User Avatar
Member
355 posts
Joined: 11月 2015
Offline
jsmack
traileverse
tamte
traileverse
it says setting animated variants is not supported in USD
Is that a Houdini limitation?
Based on Pixar usd glossary:
Each Variant can contain arbitrary scene description including the introduction of additional composition arcs. This gives us great flexibility in building up variations out of existing, modular pieces that can be referenced, inherited, etc.
it sounds like it should be possible if each variant can really contain any scene description or reference
It seems to work but I get this warning:

That means the selection of the variant can't be animated, the variant itself can contain animation. To animate which variant is visible, two references would be needed and the visibility flag can be animated instead.

I'm not animating which variant is active, there is no animation on the set variant LOP, it's picking up the animation that's on the prim. How would I get the set variant in a non-time sampled stream? the image shows what the set variant LOP looks like at the moment and you see no animation.

Attachments:
time_sampled_variant_error1.jpg (29.1 KB)

hou.f*ckatdskmaya().forever()
User Avatar
スタッフ
357 posts
Joined: 2月 2008
Offline
The warning comes from the stage being time dependent, and thus the node being time dependent too - you can ignore the warning, or you can cache the animation which will improve performance overall.
User Avatar
Member
355 posts
Joined: 11月 2015
Offline
npetit
The warning comes from the stage being time dependent, and thus the node being time dependent too - you can ignore the warning, or you can cache the animation which will improve performance overall.

Setting a cache LOP to 'always cache all frames' gets rid of the error; is there any way to see what the cache LOP is doing in terms of memory used and so forth? The performance of the scene didn't seem to take any hits performance-wise but how dangerous is it to cache all frames in memory like this? Or is it totally Ok to do so?

Attachments:
time_sampled_variant_error2.jpg (51.5 KB)

hou.f*ckatdskmaya().forever()
User Avatar
スタッフ
357 posts
Joined: 2月 2008
Offline
The cache LOP will "bake" all animated time samples on the input stage for the given frames. By doing this, the stage stops being time-dependent, which impacts performance as the node chain becomes more complex downstream - like in SOPs, a time-dependent node chain will result in all the time-dependent nodes being re-evaluated when the current frame changes, so avoiding upstream time-dependencies, or moving them as far downstream as possible, is highly recommended.
While in your current example it barely affects performance, if you were to create these animated variants upstream of a large and complex LOPs graph, you'd be forcing a large part of the graph to unnecessarily recook for every frame/subframe when writing to disk. You might also be creating unnecessary time samples all over the stage, increasing the memory footprint of the stage.

Memory-wise, it is no different than writing out the given frames to a single USD (you benefit from data deduplication, only animated attributes/properties/primvars/etc result in time samples for the given frame range).
It doesn't allow for any targeting or granularity however as it caches the entire input stage.
If you want better control over explicitly creating time samples where you want them, take a look at the Edit Properties LOP or, in your case, with the transform7 node (where your animation and time dependency appears), set the "Frame Range/Subframes" parm to "Sample Frame Range" - this will "bake" the resulting transforms to time samples for the given frame range and get rid of the time dependency.

More and more LOP nodes have this "Frame Range/Subframes" set of parameters to help minimise the impact of creating targetted time samples on the stage.
User Avatar
Member
858 posts
Joined: 10月 2008
Offline
Old thread but I have a similar problem with Arnold and material variants. Karma accepts setting the variants and it's lovely and beautiful but Arnold complains about "time varying variant selections". The cache lop removes the error but Arnold ignores the variant settings.
--
Jobless
  • Quick Links