From cgwiki

Lops network style

When you've used Houdini for a while, you start to recognise good vs bad network wiring styles. Good is my way, bad is what everyone else does. But there's some network behaviors that are the same no matter what, if you have lots of things, if you want to see them together you need to wire them all to a merge node, often towards the end of the network.

Earlier we wired 4 pig references together as a single wire, which feels very un-houdini. Lops is flexible enough that you could have had them all running left to right, and all fanned into a single merge as you would in sops.

Don't do that.

As a broad rule, a single vertical chain is better. Couple of things to ponder:

  • sops generally start with a standalone node (a pig, a file loader, an box), then any subsequent nodes modify or replace whats connected to them
  • lop nodes generally add a thing, and leave the input untouched. Eg you create a pig lop, then append a camera lop. The camera does't replace the pig, it just gets added, like an inline merge. Remember, Lops is mainly about scene manipulation, not geometry modification.

You want details, like reasons why and stuff? Ugh.

I'm told that USD prefers to have all the assembly done up front first, so you glom all your stuff together like a katamari damacy ball, once you have it all in place, you then do atomic edits on the bits you're interested in. If you need to fan out, fan out. If you look at katana graphs they seem to follow a similar style. Changes can run atomically on the thing you want to modify, and skip the rest. If you run the other way, like have lots of parallel vertical branches, then wire them all together at the end, that final 'merge' node has to do a ton of recalcualtion every time you make an edit 'recomposing' the scene, slowing things down. That's bad.

There's hazy ground of course, but the upshot is if in doubt, run your nodes in a vertical chain.

Lights and cameras

So that said, lets take the pigs we have so far, maybe the sublayer where you saved all the 4 edited pigs to a single file, and append a light. There, light. Lops has some silly showoff features here for placement; get your mouse into the 3d viewport, hit enter to enter the current node's state, you get a few buttons above the viewport. click the diffuse button and gently caress a pig, it will move the light so that it shines with maximum brightness where you click. Try the same for specular. Cute.

Now append a camera node. Look at the Scene Graph Tree, you can see there's tidy top level folders for lights and cameras. Move the display flag to the camera node, and in the viewport click where it says 'no cam' in the top right, and change to the camera. Ooo, camera! Click the padlock icon on the right of the viewport to lock the camera to the view, do your usual Houdini tricks to adjust the view (space-f, space-g etc).

You could write this out to usd, read it back in, the lights and cameras will be there, and interestingly, will also work in Maya, Katana, UE4. Now we're getting to tricks that most other 3d file formats can't do.


prev: UsdGuide03 this: UsdGuide04 next: UsdGuide05
main menu: UsdGuide