Houdini 18.0 Solaris

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 may settings for how to convert geometry.

  • 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.

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.

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 Edit SOP). The importer automatically converts this setting into USD visibility metadata.

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 USD Import 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 equivlanet 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.

  • The USD Configure SOP creates attributes on SOP geometry that represent importer settings (that can be overridden by turning on parameters on this node). It can stores the setting for how to convert Other primitives in a usdconfigureotherprims SOP attribute at the global (detail) level.

    You can specify this setting per-primitive if you create a usdconfigureotherprims SOP 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.

    You can use this to represent hierarchies of USD prims in SOPs as points with path, usdprimtype, and usdkind attributes (the USD Import SOP does this for round-tripping).

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

USD

Tutorials

Karma