On this page | |
Since | 17.0 |
Overview ¶
The imported geometry is translated to a native USD representation which may consist of many different native USD primitive types (you can control the hierarchical structure of the imported USD using attributes on the source SOP geometry).
See how SOP import works for detailed information on how the importer converts SOP information into USD.
You can import SOP geometry by sublayering (composing it over the current contents of the scene tree) or referencing (attaching it at a certain branch of the scene tree). (See sublayering and referencing.)
The layer containing the imported geometry has source metadata in format that tells Houdini’s USD plugins to get the geometry from a SOP node instead of a file on disk.
This node can put the imported geometry in the active layer, so it can be modified by LOP nodes connected to this node’s output.
In addition to the geometry itself, you can import Houdini attributes on the geometry as USD primvars.
Note
This node works by converting SOP geometry into a hierarchy of USD geometry prims, and then importing that USD data into the scene graph tree (by sublayering or referencing).
Knowing this will help you interpret some of the parameters, such as “which prim to reference in”. They are speaking in terms of how to deal with the already-converted USD geometry prims.
How to ¶
To... | Do this |
---|---|
Separate polygon meshes by connectivity |
|
Enabling parameters ¶
Many parameters on this node are preceded by a checkbox to enable the parameter. These check boxes control which options will actually be authored by this node and passed to the SOP conversion process.
If a parameter is not enabled, the node try to get the value from a detail attribute corresponding that option. You can create these attributes on the geometry with the USD Configure SOP. If it doesn’t find an attribute, it uses the default.
Enabling an option on this node overrides the corresponding attribute on the geometry, if it exists.
Tips ¶
-
You can import packed primitives from SOPs as USD native instances, or as a point instancer.
-
This node can generate material bindings using the
usdmaterialpath
string attribute. It can even produce a Material primitive to be bound to.See Bind Materials for details.
-
Aside from
usdmaterialpath
, this node can create USD primvars for shading or geometry subsets from theshop_materialpath
SOP attribute.To retrieve both the geometry and generate USD materials for an object authored in Houdini, you can use a SOP Create node, or a combination of a SOP Import to import the geometry, a Material Library LOP to bring in the materials, and a Material Assign LOP to bind the two together.
You could also use a Scene Import LOP to import geometry and materials with a single node, but it provides fewer control over the import process.
-
Houdini’s shape SOPs (such as box and torus) either create polygonal meshes, or have the option to create polygons instead of mathematical primitives. Even though USD has mathematical primitives for Cube and Torus, if the original SOP output a polygonal mesh, it will be imported into USD as a polygonal mesh.
Parameters ¶
SOP Path
Node path to the SOP node you want to import from.
Load As Reference
When this is on, the geometry will be imported as a payload. When this is off, the geometry will be imported by sublayering its hierarchy over the existing scene tree (see sublayers and references).
Sublayer Style
(When Load as reference is off.) By default, geometry imported from SOPs is treated like geometry imported from a file on disk: you can only edit it by applying stronger opinions on top. Changing this parameter, allows this node to put the geometry in the active layer, so it can be modified by LOP nodes connected to this node’s output.
The node does this by copying the contents generated from the SOP geometry into an anonymous in-memory USD layer. This is slower, but provides more options for how many USD layers you need to write to disk, and what goes in each layer. This is similar to the operation of a Load Layer for Editing LOP.
The Copy SOP Layer Into New Active Layer
style creates a new active layer into which the SOP layer contents are copied. The Merge SOP Layer Into Existing Active Layer
style copies the SOP layer contents into the input node’s active layer, resulting in no new layers on the stage.
Adjust Transforms for Input Hierarchy
(When Load as reference is off.) When this is on (the default), the node automatically compensates for transform problems created if you round-trip geometry from LOPs to SOPs (as packed USD primitives) and then back to LOPs again. If you know you are not round-tripping LOPs → SOP packed USD primitives → LOPs, you can turn this off to make importing faster.
Packed Primitives in SOPs only have a single transform, representing the full local-to-world transformation of the packed geometry. If you export a USD geometry primitive to SOPs as a packed USD primitive, Houdini flattens the full transformation hierarchy under the USD prim into a single transformation matrix.
This creates a problem if you then “round-trip” the SOP packed primitive back into LOPs, as the descendants will have their own transforms, which are also now incorporated into the root prim’s transform imported from SOPs. This results in an incorrect double-application of the transforms.
When this parameter is on (the default), the node examines every transformation imported from SOPs, in the context of the prim’s location in the scene graph hierarchy. If the prim (or its ancestors) already exist on the input stage, the node inverts the transformations of the ancestor prims, and applies them as additional local transformations on the prim. This ensures that the final world space location of the prim in LOPS will be the same as it was in SOPs.
If Copy Contents Into Editable Layer is on, the node applies these additional transforms directly to the imported primitives, otherwise the node creates a new active layer and puts the transforms in the new layer as overrides.
Bind Materials
Binds materials to the imported USD primitives based on the usdmaterialpath
SOP attribute.
The usdmaterialpath
value can specify either the path to a material primitive, or the path to another primitive to copy the material binding from.
If the Partition Attributes include a materialBind
SOP attribute, material bindings can also be created for the resulting geometry subsets.
Reference Type
(When Load as reference is on.) Control whether the SOP geometry is added to the reference primitive as a Payload or Reference composition arc. Also indicates whether this new composition arc should be made stronger or weaker than existing composition arcs on this primitive.
Weaker Payload
Create a Payload composition arc that provides weaker opinions than existing payloads.
Stronger Payload
Create a Payload composition arc that provides stronger opinions than existing payloads.
Weaker Reference
Create a Reference composition arc that provides weaker opinions than existing references.
Stronger Reference
Create a Reference composition arc that provides stronger opinions than existing references.
Reference Primitive
(When Load as reference is on.) This node treats the converted geometry like an external USD geometry file. This controls which root-level prim to import from the USD prim hierarchy generated by converting the SOP geometry. You should leave this set to “Reference Automatically Chosen Primitive”.
Reference Automatically Chosen Primitive
If the referenced file has a default primitive set, use that. If there is no default prim, use the first Xform prim at the root. If there is no Xform prim at the root, use the first root prim of any type.
Reference Default Primitive
If the referenced file has a default primitive set, use that. If not, display a warning on this node.
Reference Specific Primitive
Reference in the scene graph path in the Reference primitive path parameter.
Reference Primitive Path
The scene graph path of the prim in the referenced layer that that is composed onto the stage. Contents of the referenced layer outside of this referenced primitive path will not appear on the composed stage. This parameter is only used if the Reference primitive parameter is set to “Reference specific primitive”.
(If you set this field automaticPrim
or defaultPrim
, it mimics the behavior of setting Reference primitive to “Reference automatically chosen primitive” or “Reference default primitive”.)
Primitive Path
In create mode, this parameter specifies a single primitive path. This is the scene graph path where the referenced branch will be attached. If this prim doesn’t exist, the node will create it. In edit mode, this parameter is a primitive pattern that will be matched against the existing primitives on the stage connected to this node’s first input. You can use local variables to control the reference primitive path.
Make Instanceable
Mark the new or modified prims as instanceable (as in “native instancing”). This saves memory if you reference the same branch into multiple places, but makes the descendants of the referenced prim not editable. If this option is off, the prims are not explicitly marked as not instanceable. Instead, the current instanceable value on each prim is left unchanged.
Parent Primitive Kind
If the prim at Primitive path doesn’t exist, this node will create it. If it has to create the prim, it will give any intermediate prims it has to create this kind.
Parent Primitive Type
If the prim at Primitive path doesn’t exist, this node will create it. If it has to create the prim, it will give any intermediate prims it has to create this type.
Import Group
Turn this on and specify a group name (or a space-separated list of group syntax) to import. If you turn this on but leave the field blank, it imports all geometry.
Import Group Type
When enabled, specifies the whether the Import Group is a point or primitive group.
Import Path Prefix
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 this path. This is a way of keeping “un-pathed” prims organized under a single branch. (See how to create geometry hierarchy.)
(The default is /$OS
which puts “un-pathed” prims under a root prim with the name of this node.)
Layer Save Path
When turned on, sets the Save Path metadata for the layer containing the geometry to this file path. When you write out USD using a USD render node, the geometry is saved out to a .usd
layer file using this file path (after output processing).
Primitive Definition ¶
Parameters in this group guide the translation process in terms of how USD primitives are generated from the source SOP geometry.
Packed USD Primitives
What to do with packed USD primitives in the imported SOP geometry.
Ignore
Ignore packed USD primitives in the source SOP geometry.
Overlay Transforms
Import the transformation of the packed USD primitive as an override (Over
) prim. This makes it easy to transform the packed USD prims without unpacking them.
Overlay Transforms and Attributes
In addition to Overlay Transforms, point or primitive SOP attributes on the packed USD primitive are imported as primvars with constant
interpolation.
Other Primitives
What to do with regular non-packed primitives (points, curves, polygons, spheres, and so on).
Define
Create the USD prims for the imported geometry if they don’t already exist. This is the standard way to import geometry.
Overlay
Create the USD prims as overrides. They will only be visible as changes to any prims that exist at a lower level with the same paths. This may be useful where you only want to import and modify certain attributes from SOPs onto existing USD geometry.
Overlay Transforms
Like “Overlay”, but only imports transform data.
Define Only Leaf Primitives
Author intermediate primitives (for example, any Xform
prims created for the Import path prefix) as overrides instead of definitions. This means if they don’t match up with underlying prims in lower layers, the leaf prims won’t be added to the scene. This is useful if you only want to import the geometry if its ancestors already exist in the scene tree.
(Note that all of the data is still imported, it just may not be visible in the scene graph tree or the viewport.)
Packed Primitives
What to do with SOP-native packed primitives.
Create Xforms
Creates an Xform
prim from the packed primitive’s transform and attributes, and the packed primitive’s geometry is imported underneath.
Create Native Instances
Import the geometry in packed primitives as instanceable references. This imports each piece as a prototype under a Prototypes
prim under the Import Path Prefix prim.
Create Point Instancer
Import the geometry in packed primitives as point instanced geometry. This imports each unique piece as a prototype under the point instancer prim.
You can assign a SOP primitive attribute to the packed primitive named usdinstancerpath
to specify the USD scene graph path of the instancer.
Unpack
Only imports the packed primitive’s geometry. Unlike the Create Xforms mode, this does not create any additional hierarchy, and is equivalent to unpacking the packed primitive prior to being imported. This can be useful for importing multiple pieces of geometry without merging their attributes.
Agents
What to do with agent primitives. In all modes, a prim is created from the agent primitive’s transform and attributes, and the agent’s geometry and animation are imported underneath.
Create Instanced SkelRoots
Imports the agent’s skeleton and geometry as instanceable references to a SkelRoot
prim enclosing the skeleton and skinned primitives.
This imports each unique agent definition as a prototype under an agentdefinitions
prim under the Import Path Prefix prim.
Create SkelRoots
Creates a SkelRoot
prim enclosing the agent’s skeleton and skinned geometry, which is imported underneath.
This will be less efficient than Create Instanced SkelRoots for a large crowd, but can be useful for e.g. importing a single character where instancing is unnecessary.
Create Instanced Skeletons
Imports the agent’s skeleton as an instanceable reference to a Skeleton
prim.
This imports each unique agent definition as a prototype under an agentdefinitions
prim under the Import Path Prefix prim.
Create Skeletons
Imports the agent’s skeleton as a Skeleton
prim under the agent’s Xform
prim.
This will be less efficient than Create Instanced Skeletons for a large crowd, but can be useful for e.g. importing a single character where instancing is unnecessary.
Create SkelAnimations
Only imports the agent’s joint animation, creating a SkelAnimation
prim.
This can be used to efficiently import a sequence of frames, since the agent’s skeleton and rest geometry are typically unchanged between frames.
NURBS Curves
What to do with NURBS curve primitives.
Convert to Basis Curves
Import the curves as a BasisCurves
primitive.
This only supports cubic curves, but is useful for rendering through Hydra.
Create NURBS Curves
Import the curves as a NurbsCurves
primitive.
This provides complete round-tripping of NURBS curves, but has limited support for rendering through Hydra.
NURBS Surfaces
What to do with NURBS surface primitives.
Convert to Meshes
Import the surface as a Mesh
primitive, which can be useful for rendering through Hydra.
Create NURBS Patches
Import the surface as a NurbsPatch
primitive.
This can be useful for round-tripping of NURBS surfaces, but has limited support for rendering through Hydra.
Kind Authoring
How to assign kinds to imported prims.
All Geometry is One Component
Set root primitives in the imported tree to Component. Do not set kinds on descendants.
Nested Groups and Components
Set leaf primitives in the imported tree to Component. Set branch primitives to Group.
Nested Assembly, Groups, and Components
Set root prims in the imported tree to Assembly. Set intermediate branch prims to Group. Set leaf prims to Component.
None
Do not set kinds on the imported prims.
Path Attributes
A (comma or space-separated) list of names of SOP primitive string attributes to use to use as prim paths to put the SOP geometry into. The default is path,name
. See geometry hierarchy above.
If the list has more than one attribute, the importer checks each attribute for the first non-empty value.
If the string value a full path, that path is used as the USD scene graph path for that primitive. If the string is a relative path (or just a name), the string is appended to the Import Path Prefix string to generate a full scene graph path.
If none of the listed attributes exist on a given SOP primitive, or all values are an empty string, the importer generates a name automatically (for example, sphere_0
).
Prefix Absolute Paths
Whether absolute path values from Path Attributes should be prefixed/parented or not. By default this is off and only relative path values are prefixed.
Import HeightFields as Mesh
If the source SOP geometry contains a height field volume, it will be imported as polygonal mesh. Other layers will be imported as vertex primvar if the values are varying, or constant primvar if the values are constant.
Geometry Handling ¶
These parameters provide options to alter the interpretation of the SOP geometry data.
Treat Polygons as Subdivision Surfaces
For polygon meshes that are not already tagged with a subdivision scheme, author a subdivisionScheme
attribute set to catmullClark
. This will convert them to subdivision surfaces.
Subdivision Group
If Treat Polygons as Subdivision Surfaces is on, only convert polygons in this primitive group into subdivision surfaces.
Reverse Polygon Vertex Ordering
USD supports an orientation
attribute on mesh primitives that indicates whether polygons have a left-handed or right-handed ordering, while SOP geometry is always left-handed ordering. When this option is on, the importer always reorders vertices (and associated primvars) to be right-handed.
This is useful when round tripping right-handed oriented polygons from USD into SOPs and back into USD. The data is always converted to a left handed ordering when importing it into SOPs. If you imported the polygons back into USD without this option, they would be left-handed, unlike the original.
Set Missing Widths
USD has a fallback value of 1.0 for the width of Curves and Points, which is often far wider/thicker than desired. If the SOP geometry does not explicitly author width/pscale data, this control can be used instead to explicitly author a USD value.
Import Data ¶
These parameters affect the conversion of SOP geometry attributes into USD attributes and primvars, and the choice between default and time sampled value authoring.
Topology Attributes
Controls whether USD topology attributes should be authored as time sampled or default values.
The following attributes are treated as topology attributes:
Primitive Type |
Attributes |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Animated
If you know that topology is changing in the source geometry over time, choose this option to record topology attributes as time samples in the USD scene graph. Having animated topology can be very expensive during playback, so only use this option when necessary.
Static
Write topology attributes as default values. This can make playback much faster, but limits how the topology can change over time.
None
Do not author topology attributes.
This is useful when USD data is sent to SOPs for processing, then brought back into LOPs. Using this option tells the importer that the geometry topology has not changed in this process, so only the changing point positions or other primvars will be imported.
Attributes
A space-separated list of attribute names/patterns specifying the SOP attributes to import into USD as primvars.
In addition to matching attribute names directly, there are some values with special meanings:
bounds
Authors the USD extent
attribute using the calculated bounding box of the associated SOP geometry.
visibility
Authors the USD visibility attribute based on the value of the usdvisibility
geometry attribute.
See importing attributes for information on how the importer converts certain well-known Houdini attributes to their USD equivalents.
Indexed Attributes
A space-separated list of attribute names/patterns specifying the SOP attributes to import into USD as indexed primvars.
If a SOP attribute matches this pattern, the importer authors the primvar as an indexed array of values (that is, an array of values called primvars:‹name›
, and an array of indices into those values called primvars:‹name›:indices
).
Preparing an indexed primvar can be expensive for attributes that are not integers or strings. You should only use indexed primvars where it is likely to result in significant savings in storage size due to a small number of unique values being used across a large number of components.
Import as Single Element Array
A space-separated list of attribute names/patterns specifying the SOP attributes to import into USD as primvars with Constant
interpolation (an array with a single value for the whole primitive), regardless of whether the SOP geometry attribute is a point, primitive, or vertex attribute. If multiple values could be chosen for a particular USD primitive, the importer chooses the first value it encounters.
Importing as a single element array (versus Import as Single Value) can be useful since it allows the primvar’s interpolation to be overridden without changing the primvar’s type.
Import as Single Value
A space-separated list of attribute names/patterns specifying the SOP attributes to import into USD as primvars with Constant
interpolation and a single value for the whole primitive, regardless of whether the SOP geometry attribute is a point, primitive, or vertex attribute. If multiple values could be chosen for a particular USD primitive, the importer chooses the first value it encounters.
This is the default behavior for how detail attributes are imported.
This is similar to Import as Single Element Array, but the primvar’s type is a scalar value instead of an array with a single element (for example, vector3f
instead of vector3f[]
).
Boolean Attributes
A space-separated list of attribute names/patterns specifying which integer SOP attributes should be converted to primvars of type bool
.
Set Default Values
A space-separated list of attribute names/patterns specifying the SOP attributes to always author as default values for USD primvars (never time samples). This is the list of exclusions when Author Time Samples is set to If Not Specifically Excluded.
Partition Attributes
A space-separated list of attribute names/patterns specifying which SOP primitive string attributes represent subsets of the geometry. For mesh and curve primitives, the importer puts elements with the same value for this attribute into their own geometry subsets.
The importer will try to set the subset name to the attribute value, but may need to change the name to make it a legal USD primitive name. The importer stores the raw attribute value on the geometry subset prim as Custom Data with the key partitionValue
.
Prefix Subsets with Attribute Name
When creating subsets from Partition Attributes, the subsets are named by combining the attribute name with the partition attribute’s value (a string or integer). This avoids name collisions when multiple partition attributes contain the same values, but can be undesirable if precise control of the subset names is required. For string attributes, if this option is turned off, the attribute values are directly used as the subset names.
Subset Groups
A space-separated list of group names/patterns specifying SOP primitive groups. SOP polygon and curve primitives in each group are imported as a geometry subset, named for the group.
USD Custom Attributes
A space-separated list of attribute names/patterns specifying the SOP attributes to import into USD as attributes (rather than primvars).
Translate UV Attribute to ST
When turned on, converts the SOP vertex attribute uv
into a USD primvar called primvars:st
. Whether you need to turn this on depends on the renderer you are using and how your shaders are authored. If you are rendering with Karma, leave this off.
(As of this writing there is no strict standard for texture coordinate naming in USD, but the use of st
is a common convention, whereas in SOP geometry, using uv
is the common convention.)
See also |