Houdini 20.5 Solaris and Karma

Importing SOP geometry into USD

Details of how Houdini converts SOP geometry to USD, and how you can control the process.

On this page

Overview

  • The SOP Import LOP imports SOP geometry into the USD stage in a LOP network. It has many settings for how to convert geometry.

  • The Scene Import LOP imports /obj-level nodes into a LOP network. You can customize how it converts the objects into USD using Python plugins. For example, you can customize the import of special camera or light objects used by a proprietary renderer.

  • The USD Configure SOP creates attributes in SOP geometry corresponding to settings in the SOP Import LOP. You can set the LOP to use each attribute (if present), and/or set parameters explicitly on the LOP that override the corresponding attributes.

In addition to the parameters on the SOP Import LOP and USD Configure SOP, you can influence how the importer converts geometry using various SOP attributes, documented below.

Hierarchy

At the SOP level, Houdini geometry fundamentally does not have hierarchical relationships (in Houdini, hierarchical relationships between models are defined at the Object level).

In the absence of path-defining attributes:

  • All polygon faces will go into a single polygon mesh called mesh_0.

  • Any SOP primitives with equivalent USD prims (such as Sphere and Volume) will be imported as siblings with automatically generated names (such as sphere_0, volume_0).

Some geometry types, such as packed primitives or Alembic primitives, might have attributes that specify their place in a hierarchy. If these exist, the importer will use them.

You can also add attributes in SOPs specifically to control hierarchical relationships when the geometry is imported into USD. The Path attributes parameter lets you specify a list of SOP primitive attributes that contain path information.

If a prim being imported has an automatically generated name (like mesh_0) because it had no path primitive, or if it has a path primitive but the path is relative (does not start with /), the node automatically prefixes the name/path fragment with the path in Import path prefix. This is a way of keeping “un-pathed” prims organized under a single branch.

For example, if you set this to /world/geo, the following table shows how prims with different name/attribute values will map into the scene graph tree:

Name/attribute value

Import path prefix

Imported at

mesh_0

/world/geo

/world/geo/mesh_0

/moon/crater

/world/geo

/moon/crater

chair/leg

/world/geo

/world/geo/chair/leg

  • Invalid paths or characters in the attribute values are manipulated to turn them into valid paths. This usually involves replacing illegal characters with underscores.

  • If incompatible geometry types have the same path attribute value, the importer will append numbers to give them unique names.

    For example, if you try to put both a sphere and a polygonal mesh at /foo/bar , the importer will create two prims with different names, for example /foo/bar_0 and /foo/bar_1.

Materials

  • The usdmaterialpath attribute can be added, and SOP Import and SOP Create can author material bindings. These nodes can even create missing material prims or block existing material bindings. usdmaterialpath is also created when unpacking USD packed prims to SOP geometry. See Bind Materials for details.

  • GeomSubsets allow for material assignments to faces on a mesh prim. These can be created primitive groups and attributes specified by Subset Groups and Partition Attributes.

Volumes

  • By default, all SOP fields are imported under a single volume_0 prim.

  • You can assign a SOP attribute named usdvolumepath to a volume to specify the USD scene graph path to import the volume’s fields under.

  • If a field has the same name as an existing field under the volume, the importer will start a new volume prim (like volume_1) to hold that and subsequent fields.

    This means if two pyro sims are merged together, the importer will group the two sequences of density, vel, and temperature fields under two separate volume prims.

  • You can assign a SOP attribute named usdvolumesavepath to specify a custom path to save the volume file to when using the USD ROP. This attribute is translated into the HoudiniSavePath metadata on the USD field prim.

SOP packed primitives

  • When you set Packed primitives to import as point instancers, you can assign a SOP primitive string attribute to the packed primitive named usdinstancerpath. The attribute value specifies the USD scene graph path of the instancer to create.

  • SOP packed primitives have an intrinsic LOD visibility setting (for example, setting Display As to “Hidden” in the Packed Properties SOP). The importer automatically converts this setting into USD visibility metadata. The visibility token can be used in the attribute pattern parameters to control how the visibility data is authored (for example, adding ^visibility to the Attributes pattern will skip authoring visibility).

  • When importing nested packed primitives as Native Instances, you will need to make usdmaterialpath a relative path when creating new materials.

Subdivision surfaces

  • Instead of converting all polygons to subdiv with the Treat Polygons as Subdivision Surfaces parameter, you can selectively convert faces to subdivision based on the value of a osd_scheme primitive string SOP attribute.

    Possible values are catmullClark, loop, bilinear, or none.

    (The Unpack USD SOP creates this SOP attribute when unpacking USD into SOPs, to support round-tripping back to USD.)

  • When polygons are converted to subdivision surfaces, the import also uses SOP attributes understood by the Subdivision SOP, such as creaseweight, cornerweight, osd_vtxboundaryinterpolation, osd_fvarlinearinterpolation, osd_trianglesubdiv, and the subdivision_hole primitive group).

Converting attributes

  • If you import any of the following common Houdini attributes, the importer automatically converts them into the corresponding differently-named USD attributes or primvars:

    P

    Becomes the points attribute in USD.

    N

    Becomes the normals attribute in USD.

    v

    Becomes the velocities attribute in USD

    w

    Becomes the angularVelocities attribute in USD (only when authoring a point instancer primitive).

    accel

    Becomes accelerations in USD.

    id

    Becomes ids in USD (on points, or point instancer primitives).

    uv

    May become primvars:st in USD, depending on the Translate UV Attribute to ST parameter setting.

    Cd

    Becomes primvars:displayColor in USD.

    Alpha

    Becomes primvars:displayOpacity in USD.

    width, widths, pscale

    All of these may be converted into the USD widths attribute.

  • Houdini supports array attributes, which do not have a equivalent native representation in USD.

    If you import geometry with an array attribute foo, the importer creates two USD primvars: foo (a list created by concatenating all the arrays) and foo:lengths (a list of array lengths).

    For example, two points with bar array attribute values [1,5] and [2,6,8] would be translated as two primvars: bar=[1,5,2,6,8] and bar:lengths=[2,3].

Other special SOP attributes

  • You can create a usdvisibility primitive string SOP attribute to control the visibility metadata of the corresponding USD prim. The value should be either invisible or inherit.

    If you create instancers, this visibility information is converted to an invisibleIds USD attribute.

  • You can create a usdpurpose primitive string SOP attribute to control the purpose of the corresponding USD prim. The value should be either default, render, proxy, or guide.

  • You can create a usdactive primitive integer SOP attribute to control the activation of the corresponding USD prim. The value should be either 0 (inactive) or 1 (active).

  • The USD Configure SOP creates global (detail) attributes on SOP geometry that represent importer settings (that can be overridden by turning on parameters on this node). The attribute’s name matches the importer parameter’s name, prefixed with usdconfig. For example, the usdconfigattribs detail attribute specifies the string pattern of SOP attributes to import.

    Note

    The usdconfigotherprims attribute can be specified per-primitive by creating the attribute at the primitive or point level.

  • If SOP point has a usdprimtype point string attribute, it will be imported as a USD prim. The importer translates the point’s position and the standard instancing orientation attributes into the new prim’s transform. If the point also has a usdkind string attribute, it will be used as the prim’s kind. The usdapischemas point string array attribute can also be used to specify one or more API schemas to be applied to the prim.

    You can use this to represent hierarchies of USD prims in SOPs as points with path, usdprimtype, usdapischemas, and usdkind attributes.

  • There are several special tokens which can be used in the attribute pattern parameters to control how data is authored for USD properties that do not directly correspond to SOP attributes. For example, adding transform to the Set Default Values pattern will cause primitive transforms to not be time sampled.

    • The bounds token controls how the extent attribute is translated from SOP primitives' bounding boxes.

    • The skelanimation token controls how joint and blendshape animation attributes on SkelAnimation prims are authored when translating agent primitives.

    • The transform token controls how primitive transforms are authored.

    • The visibility token controls how the visibility attribute is authored when translating the _3d_hidden_primitives group and packed primitives' visibility.

Parametric shapes

  • The importer converts Houdini sphere primitives to USD sphere prims.

  • If you import a Houdini tube primitive with end caps on and the positive end has radius 0, the importer will convert it into a USD cone prim.

    If you import a Houdini tube primitive with end caps on and no tapering, the importer will convert it into a USD cylinder prim.

    Any other configuration of a tube primitive will be converted into a subdivision mesh.

Tips and notes

  • USD defaults to right-hand oriented meshes, whereas Houdini is left-handed. If your meshes are right-handed, turn on Reverse Polygon Vertex Ordering when modifying geometry in SOPs.

  • When converting SOP geometry to USD, try to be as efficient as possible. By default, attributes will be time sampled, but you can designate attributes to not be time sampled by adding them to Set Default Values.

    Remember to also set Topology Attributes to “Static”, to get non-time sampled attributes.

    USD (and specifically Hydra) do more work when values are time sampled, even if there is only a single time sample. In small setups it probably won’t make much difference, but in larger scenes it will definitely have an impact.

Solaris and Karma

USD

Geometry

  • SOP Geometry I/O

    Details of how Houdini converts SOP geometry to USD, and how you can control the process.

  • Component Builder

    The Component Builder tool puts down a network snippet for creating a USD model from SOPs, with support for materials, variants, payloads, and layering.

Layout

  • Stage Manager

    How to work with the Solaris stage effectively.

  • Edit node

    Interactively transforms prims in the viewer. Can use physics collisions to position props realistically.

  • Layout node

    Provides tools for populating a scene with instanced USD assets. You can place individual components, paint/scatter components in different ways using customizable brushes, and edit existing instances.

  • Custom Layout Brushes

    How to create layout brush digital assets you can use to customize the behavior of the Layout LOP.

Look Development

  • MaterialX

    Houdini has VOP node equivalents of the MaterialX shader nodes. You can build a shader network using these nodes, or import an existing MaterialX-based shader, and use them with Karma (Houdini’s USD renderer).

  • UDIM paths

    You can encode different tiles of a texture space into different texture files, each with its own resolution. You can then specify a texture filename such as kaiju.exr, and Houdini will replace the token with the specific tile address at load time.

  • Shader translation framework

    Describes the Solaris shading framework, including shader node translation to USD primitives.

Karma User Guide

Karma basics and workflows