Deborah R. Fowler
Houdini and USD
Posted Dec 2 2019
Updated on Dec 21 2019
- Solaris - Houdini's tool to create and edit USD. A network context called LOPs for creating layout, lighting, rendering.
- Karma, the Viewport becomes your renderview
(Hydra-based IPR), and you use a karma lop (node) with "save to
disk" to render your scene inside a lop network context (using
USD).
- TIP you must create your render folder
- TIP variance threshold (limits the samples, pixel samples is max). Type d to change the preview settings.
- http://www.sidefx.com/docs/houdini/nodes/lop/karma.html
- cpu but intended to become gpu and will replace mantra
- LOPs - to be able to set up your scene in USD format to
use Karma, you will use a lops network.It is a way to organize
your entire scene.
- documentation tutorials AND FILES on LOPS https://www.sidefx.com/docs/houdini/solaris/tutorials.html#overview
- very brief intro to lops and Karma by Varomix https://www.youtube.com/watch?time_continue=2&v=SpFf9saFAkc&feature=emb_logo
- CG Forge Karma & LOPs https://www.youtube.com/watch?v=y2ywi_c-ftg
- CG Forge Karma & LOPs part II - lightmixer, light linking, render settings https://www.youtube.com/watch?v=wLJmr5d78I0
- TIP - to move your camera, lock and move
- TIP - once geometry is in LOPs, it is referred to as a "prim" or primitive, not the same as a Houdini primitive
- Load as Reference should be on in a sopimport
Houdini
18 Launch Presentation is an excellent place to start with
H18 new features.
USD - no, not US dollar, but "Universal Scene Description" developed by Pixar.
USD is a toolset for reading, writing, editing and previewing 3D data. It is "stackable" in non-destructive layers.
Hydra is an API for generating an image from a USD scene. USD consists of C++ libraries with Python bindings for scripting.
- Pixar documentation
- NOTE: ignore Pixar USD documentation section https://graphics.pixar.com/usd/docs/A-Tour-of-USD-Houdini-Primitives.html - at the time of this posting this section is out of date (it is dated Oct 25, 2019)
- usdview will show you the contents of a usd file (you
can run the command fro the command line rendering tool in
houdini
- Houdini implementation
- You can create an ASCII readable version from your USD ROP by
adding an a to the extention ie. .usda
- to convert USD files from binary to ASCII use usdcat
- From the Houdini Command Line Tools 18.0.287: usdcat file.usd --out file.usd --usdFormat usda (NOTE -- is a double dash)
- usda is the extenstion for ascii, usdc is binary
- Example files of writing, converting and reading USD here
- you can also view a LOP node by RMB LOP
Actions->Inspect->Flattened Stage
- command line rendering also works on your usd scene file. With the above example file do the following:
- run Command Line Tools 18.0.287
- husk.exe simpleScene.usd_rop1.usd
- this command will produce your render in the folder with
karma.exr
- SIGGRAPH Asia 2019 (posted Dec 3, 2019) presentation by Luke Gravett - Animal Logic using Solaris/USD
- TIP - you can view your USD scene with a network panel USD/Scene Graph Tree
- vex and usd https://www.sidefx.com/docs/houdini/solaris/vex.html
- USD have a "Purpose" - so it is easier to use proxy geometry
- instancing can be used inside lops using addpointinstance
- override elements of assets using point attritubes (like style spreadsheets but better)
Overview and Terminology
NOTE: there is an excellent introduction
and overview to USD in the sidefx docs, below is a very
brief summary
Understanding USD will help you understand Solaris, but the
details are handled by the lops nodes.
USD has been used by Pixar and is now open source with the
intention of having a common file format. It consists of layers,
and sometimes an anology to photoshop is used in terms of layers.
In Houdini there is a prune node that "hides" layers. Working in
"stage" in Houdini is the resulting composition of your layers.
Stage is a USD term to compose layers.
- layers - allow artists in different departments to work on the same entity, great for collaboration
- provide non-destructive editing
- variants - allow assets to package up similar but varied assets in one so they can be easily selected. There is also a concept of inheritance.
When composing layers, opinions are considered, so a
property will be overridden if the layer has a stronger opinion.
Layers contains Prims (not like a Houdini prim but a USD
concept). Prims and their contents are organized into a layer.
It allows differing departments (modeling, shading, animation,
lighting, fx, rendering) to have their own format, but still be
readable and interchangeable.
In Houdini, regarding writing USD files, remember that USD stores
data, not nodes (like a jpg versus as psd file, or like a
bgeo.sc).
Assets also have the concept of purpose - render or proxy.
hydra is the API that talks to USD
The physics option really has a DOP running in the background, so
practice good complex scene practices when using it.
On the edit lop right click and select use physics.
In Houdini there is a Scene Graph Tree which gives a tree view of
your USD scene.
stage allows you to mute in viewer - again good complex scene
practices
Best practices - look at the multi-shot workflow for the market
scene.
Glossary of common USD terms (there are more than listed here)
- prim (primitives) - unit of USD, have a name, properties, children. Prims are nodes in the tree of objects that make up a stage.
- properties - are either attributes or relationships, attributes being more common, ie, size
- primvar - is a specific type of attribute - a namespace is added to influence how the Hydra api treats the value and is involved in instancing (like geometry attributes)
- metadata - named values attached to properties that change how they work
- layers - a .usd file is a layer (usdc or usda) but a usdz file can contain multiple layers in one file
- stage - the results of loading USD files and composing the layers
- sublayers - import contents over the current tree
- references - import contents by attaching to the existing tree
- variants - used for family of geometry, level of
detail, material assignments (seen in sidefx lops
tutorial 1)
Common nodes in Houdini related to USD/Solaris
- sopcreate - is just a sop network
- layerbreak - then usd file only saves from there if it were to be written, creates a new layer manually
- sopimport - allows you to reference geometry from your sop context (creates an in-memory USD representation for use in Solaris)
- prune - hides/makes invisible a layer
- merge - in Solaris has options for how the layers are merges (sublayer, merge)
- editlop - allows you to use the physics option by RMB and select use physics
- configure nodes - allow you to change the "kind" of the asset using a configure layer, primitive lops
- stagemanager - SideFX recommends using a stagemanager node (seen in sidefx lops tutorial 2)
Also PDG / TOPS - used in line with shotgun
SideFX labs - was Game Dev tools