From cgwiki
Revision as of 07:36, 1 May 2021 by MattEstela (talk | contribs)


We talked earlier about layering in the context of departments, but not layers.

The Pixar docs talk about layers in a well meaning but somewhat abstract way, containers and photoshop and stuff. I found I understood it better with specific examples, as well as the dreaded counter examples.

placeholder notes

Anything you do in usd is implicitly in a layer.

When you create a reference, it's put in its own layer.

It's also why a file lop is an alias for 'sublayer', the usd method for loading stuff from disk without the reference tricks.

A layer is usually linked with a path on disk, this is obvious with a sublayer or reference, that path is the usd file you loaded.

But what about when you use a sop create? That usd geo didn't come from disk, its been generated from nothing, so there's no save path defined.

That doesn't matter until you append a rop, at which point yes it matters.

The rop 'save style' menu is to decide what layers should do, and yes, there's photoshop analogies here. You could do several things

  • If you've loaded stuff from disk, leave them alone, just store any of the edits/overrides in the usd specified in the rop
  • Take all the contents of all the inputs (except references), bake them into the usd specified in the rop
  • Bake everything into the usd specified in the rop, so you have a big fat usd file, no external dependencies.

Ok, so again, what happens when you save a sop create if you don't use the 'bake everything' mode?

Ideally, an error. In practice, a mess. The layer will have a pretend save path baed on the houdini sop path, so op:/obj/geo1/polyextrude. If you hsave, you'll likely get a warning, and a subfolder like $HIP/obj/geo1/polyextrude.usd. Ugh.

To fix, look for a 'layer save path' parameter. It exists on sop create and sop modify, point that to where you want your little sop network to be saved.

When you click save to disk on the usd rop, any layers that have a save path defined, that need to be saved to disk, will be saved to disk.

Why would you need this? If you had lots of complex sop creates, one for buidling the set, another for pulling in an RBD sim, another for the fur, and you want the final output to be a small 'master.usd', while next to it are big seperate files for set.usd, rbd.usd, fur.usd.

In reality, this rarely happens with lops. You'll likely be pulling in set.usd from someone else, so you don't have to worry about save paths, and you'll be told 'just put all the fx stuff into fx.usd'. In that case, just set the save style to 'flatten', walk away.

There's a kind of confusing, kind of useful 'scene graph layers' pane, pop it open, click through some of the flows we've created so far, see how the layers have evovled. Also note the handy 'save path' column to tell you when things will save to dumb locations.