USD sequence vs single USD file

Hey everyone,

For some scenarios in our pipeline we are exporting usd files as a sequence so we can distribute the creation of that seqeunce on the farm as it contains very heavy data.

It seems like we can just import that sequence as a reference in Houdini and it looks good on the first glance.

I am not sure tough if we should do that. I am aware there are tools like usdstitch out there, that can stitch usd file sequences together and I am sure there is reason for their existence.

Then there is also this whole topic of USD Value Clips which I just have found out about. I am also not sure if we should use that or not?

So I am essentially looking for advice what to look out for when working with usd file sequences. If there are pros and cons, if there might be a reason to use them (performance?) or if they should always be stitched together or value clipped before layering them in the final stage?

Hey,
I’m guessing you are loading the sequence via a $F4 expression in the reference node? While that works for the active UI session, it won’t work as soon as you try exporting the active stage/layer.

What will end up happening is that you will get a reference per frame, essentially loading all files at the same time (and since a value source only comes from the top most layer (without value clips), you will end up with only a single frame being loaded). You can also “simulate” this if you put a cache LOP node after your reference node.

In H20 there is a new node to make value clip creation easier:
https://www.sidefx.com/docs/houdini/nodes/lop/geoclipsequence.html

SideFX recommends using that, you could also stick to using the native USD value clips tools, you can find more info here for a rough overview. (SideFX also wrapped these via the ROP nodes)

To answer the question why “dynamic/expression like” per frame file loading is not supported: There is a performance cost of not knowing what is being loaded in the active file: 1. From the Houdini side of things, it would make your whole node tree time dependent, which you want to avoid as much as possible. 2. From the USD side of things, every frame would have to retrigger loading the whole hierarchy, which does not scale well.
So value clips eliminate this by explicitly specifiyng what attributes carry the animation data and what file(s) on the active frame are allowed to be considered for pulling the data.

So in short: If you are writing files per frame, you’ll have to use value clips to bring in the data.

I hope that explains the rough idea.

1 Like

Hey @LucaScheller,

Thanks for you answer!

What will end up happening is that you will get a reference per frame, essentially loading all files at the same time (and since a value source only comes from the top most layer (without value clips), you will end up with only a single frame being loaded). You can also “simulate” this if you put a cache LOP node after your reference node.

Ahh this is the explanation I was looking for!
With value source, do you mean the value of an attribute? Or do you mean the attributes that are available at all? And if a later frame in the usd sequence would add / edit an attribute it would not be considered?

In H20 there is a new node to make value clip creation easier:

We are still stuck with 19.5 at the moment.
So I think the “old” workflow there if I understood it correctly would be:

  1. Create the usd sequence with a regular usd rop with $F expression in output path
  2. Create the value clip representation of that usd sequence with the manifest and template file with the USD Stitch Clip node: USD Stitch Clips
  3. Simply reference the template file in the scene

But then there is also the Value Clip Lop node. I am not sure what the purpose is there:
https://www.sidefx.com/docs/houdini/nodes/lop/valueclip.html

Oh and there is one more question I am interested in:
With value clips ans usd files per frame. Let’s say you have a huge fx cache, can you actually save memory by loading it with value clips? Is USD smart enough to only load the current frame data? Would this be an advantage over a regular single usd file that may be huge in size and not fit in memory?

With value source, do you mean the value of an attribute? Or do you mean the attributes that are available at all? And if a later frame in the usd sequence would add / edit an attribute it would not be considered?

With value source I mean the layer that “wins” the value resolution based on the composition (arcs). This layer (or in case of value clips layer(s)) is then the source of where USD loads in the attribute data from.

In USD you currently can’t have dynamic hierarchies (at least without custom tooling) per frame. Value clips basically bake down the structure of what prims/attributes are available across the whole frame range into the topology/manifest file and then the value clip metadata specifies what file to load the data from each frame for time samples values. If a file doesn’t have the attribute, it can either can interpolated or value blocked (see Value Clips Missing Data for more info).

Here is some reading material on composition/value resolution, I think that should help with clearing up the terminology:

  1. Create the usd sequence with a regular usd rop with $F expression in output path
  2. Create the value clip representation of that usd sequence with the manifest and template file with the USD Stitch Clip node: USD Stitch Clips
  3. Simply reference the template file in the scene
  1. Yes, make sure that you have “Flush data after each frame” turned on in the ROP settings

  2. Yes, or use the usd commandline tools (that also ship with Houdini) or do it via Python as described here

  3. Yes, alternitavely you can also use the Value Clip node with the generated manifest/toplogy file and write the value clip metadata your self. This is for example more flexible when you need to author the metadata at multiple prims (usually asset structure root prims).

With value clips ans usd files per frame. Let’s say you have a huge fx cache, can you actually save memory by loading it with value clips?

Yes Value Clips only load the data of the active frame (and surrounding if interpolation is needed).

You might also want to check out the Composition Examples file here, it contains the examples shown in the guide.

2 Likes

Hey Luca,

thanks for the great explanation. Cleared up a lot of the confusion!

1 Like