Houdini 18.0 Nodes TOP nodes

Geometry Import TOP node

Loads points or primitives from a SOP or geometry file into work item attributes or a temporary file.

On this page

This node lets you:

Note

What this node can do varies greatly based on its parameter settings.

The main parameters on this node are Geometry Source (where to load the geometry from), Store Geometry As (where to write the geometry to disk), and Class (what to operate on).

By default, this node loads the geometry whenever the node generates, including when you ask the network to generate static work items. If you intend to load files generated earlier in the network, turn on Load Geometry During Cook.

Tip

For tips on how to use the Geometry Import TOP node, please watch PDG GeoImport Surface Operator.

TOP Attributes

The Geometry Import TOP creates attributes on work items based on the attributes specified in the Copy Attributes parameter, and it also creates several other attributes based on the Copy From Class of geometry being imported.

sopname

string

When loading geometry from a SOP node, this attribute is set to the name of the node.

soppath

string

When loading geometry from a SOP node, this attribute is set to the full path to the SOP.

*attribs

string array

A string array of attribute names is created for each of the element types: pointattribs, vertexattribs, primitiveattribs, and detailattribs. If the geometry is being loaded as a detail then all four attributes will be created, otherwise only the attribute for the specified Copy From Class will be created.

When creating work items using All Groups or Specified Group, a <groupname>attribs attribute is created containing the list of attributes on elements of the group.

groupname

string

When loading geometry elements from a particular group, this attribute is set to the name of the group.

groupsize

integer

When creating work items from All Groups or Specified Group, this attribute is set to the size of the group.

*offset

integer

When loading points, vertices, or primitives, the node creates a pointoffset, vertexoffset, or primitiveoffset attribute that identifies the element in the source geometry.

point*

float array

When loading primitives with the Include Points from Primitives parameter turned on, a float array attribute is created for each point in the primitive.

primitive

string

When loading primitives with the Include Points from Primitives parameter turned on, a string parameter with the full list of prim coordinates is created.

pointcount

integer

When loading primitives, this attribute is set to the number of points in the primitive.

numpoints

integer

When loading the geometry as a full detail, this is the number of points in the geometry.

numvertices

integer

When loading the geometry as a full detail, this is the number of vertices in the geometry.

numprimitives

integer

When loading the geometry as a full detail, this is the number of primitives in the geometry.

minbounds

float array

When the Copy From Class parameter is set to Bounds, this attribute contains the minimum x, y, and z values of the geometry bounds.

maxbounds

float array

When the Copy From Class parameter is set to Bounds, this attribute contains the maximum x, y, and z values of the geometry bounds.

piececount

integer

When the Create Work Item For parameter is set to Piece Attribute Values, this attribute contains the total number of values in the piece attribute.

piecesize

integer

When the Create Work Item For parameter is set to Piece Attribute Values, this attribute contains the number of elements of the specified Copy From Class in the piece.

piecevalue

integer/string

When the Create Work Item For parameter is set to Piece Attribute Values, this attribute contains the value of the piece attribute.

The value of the this attribute depends on whether the piece attribute specified in the Piece Attribute parameter is an integer or string.

piecename

string

When the Create Work Item For parameter is set to Piece Attribute Values, this attribute contains the name of the piece attribute specified in the Piece Attribute parameter.

Parameters

Work Item Generation

Whether this node generates static or dynamic work items. You should generally leave this set to "Automatic" unless you know the node’s work items can be computed statically, or that they need to be generated dynamically.

Dynamic

This node always creates dynamic work items: it waits until the upstream work items are known, and generates new work items from the upstream work items.

Static

This node always creates static work items: it creates the number of work items it thinks it needs based on the parameters (and any upstream static items) before the network runs.

Automatic

If the input is static (a static processor, or a partitioner with only static inputs, or a mapper), this node generates static work items, otherwise it generates dynamic work items.

Source

Geometry Source

Determines where to load the geometry from.

SOP Node

Lets you specify the path to a SOP node in the current HIP file. This TOP node then cooks the SOP node and stores its output geometry.

Note

You can use the Evaluation Time parameter to cook the SOP node at a different point in the timeline.

Upstream Output File(s)

Gets the file path from the incoming work item’s output attribute and reads the file in as geometry. You can filter the files with the File Tag parameter. If multiple files are found with the same tag, then the Multiple Inputs parameter determines which files to import.

For example, this is useful when you want to use a File Pattern TOP node to generate work items representing geometry files and then load them into this node.

Upstream Geometry Attribute

Gets the geometry data from an attribute on the incoming work item. For example, this is useful when you have geometry data loaded by a previous Geometry Import TOP node.

Custom File Path

Loads the geometry data from the file located in the File Path file directory.

SOP Path

The network path of the SOP node to cook. For example, /obj/geo1/output1.

This parameter is only available when Geometry Source is set to SOP Node.

Evaluation Time

Determines the time (in seconds) at which to cook the SOP.

This parameter is only available when Geometry Source is set to SOP Node.

Work Item Frame

The SOP is evaluated at the frame value specified on the upstream work item.

Custom Time

The SOP is evaluated at the Custom Time value.

Houdini Time

The SOP is evaluated at the Houdini playbar time.

Custom Time

Configures the time value at which the target SOP node is evaluated.

This parameter is only available when Evaluation Time is set to Custom Time.

Evaluate with Work Item Attributes

Turn on when your SOP network uses @attribute expressions to pull values from work items (for example, like with wedging). If you use @attribute expressions, the node needs to cook the SOP separately for each work item. If you do not use @attribute expressions, the node only needs to cook the SOP once.

This parameter is only available when Geometry Source is set to SOP Node.

File Tag

Loads from only file paths tagged with this file tag. For example, file/geo.

This parameter is only available when Geometry Source is set to Upstream Output File.

Attribute Name

Specifies the name of the attribute on the upstream work item that contains the geometry data. This refers to a geometry attribute.

This parameter is only available when Geometry Source is set to Upstream Geometry Data.

File Path

The file path for the geometry file to import.

This parameter is only available when Geometry Source is set to Custom File Path.

Load Geometry During Cook

When on, loads the geometry when each work item cooks instead of when work items are generated. This is useful if you want to load geometry that is produced when an upstream work item cooks, or if the geometry files being loaded are large.

This parameter is not available when Geometry Source is set to SOP Node.

Upstream Geometry Merge Options

These parameters configure how multiple upstream files are merged.

They are only available when Geometry Source is set to Upstream Output File.

Merge Operation

Determines what to do if an upstream work item has multiple sources of geometry. If the Geometry Source parameter is set to Upstream Output Files you can use these options to merge the geometry files. If Geometry Source is set to Upstream Geometry Attribute and the input work item is a Partition the node will merge the geometry attribute on each work item in the partition.

Import First Geometry

The first valid geometry source is imported and any others are ignored.

Import and Merge All Files

If Geometry Source is set to Upstream Output Files all matching files are merged and imported as a single piece of geometry. If Geometry Source is set to Upstream Geometry Attribute and the input work item is a Partition, the geometry from each item in the partition is merged and imported.

Create Merge Attribute

Creates an attribute on the geometry of each imported file. The attribute value is set to the index of the file within the list of inputs.

For example, if three files are imported, then the geometry from the first file would have its attribute value set to 0, the second file set to 1, and the third file set to 2.

This parameter is only available when Multiple Inputs is set to Import and Merge All Files.

None

No attribute is created.

Point

A point attribute is created on the imported geometry.

Primitive

A primitive attribute is created on the imported geometry.

Merge Attribute Type

Determines whether the node should create the merge attribute as an integer or string.

Integer

The attribute values are set to the file index.

String

The attribute values are set to the file path that the geometry was loaded from.

Merge Attribute Name

Specifies the name of the attribute to create.

This parameter is only available when Create Merge Attribute is set to Point or Primitive.

Storage

Store Geometry As

Where to keep the loaded geometry data.

None

Extracts information from the geometry and stores it as work item attributes, but does not store the actual geometry data on disk.

External File

Writes the loaded geometry data to a file on disk.

Geometry Attribute

Stores the the native Houdini geometry as a geometry attribute on the work item.

Currently, the only nodes that can work with attached geometry are the Invoke TOP node or another Geometry Import TOP node.

External File Path

The file path to which to write the geometry data. This is set as the output file for the work items.

This parameter is only available when Store Geometry As is set to External File.

External File Tag

The file tag to apply to the output file.

This parameter is only available when Store Geometry As is set to External File.

Attribute Name

The name of the attribute to which the geometry is stored.

This parameter is only available when Store Geometry As is set to Geometry Attribute.

Data Extraction

Set Item Index To

Determines what the work item index is set to.

Element Index

For settings that generate new work items for each element (point, vertex, or primitive) in the geometry, sets each work item’s index to the element number.

Upstream Item Index

Sets each work item’s index to the upstream item’s index.

For settings that generate multiple work items for each incoming work item, this creates duplicate index values.

Copy From Class

Determines how to create work items from the loaded geometry. By default, the node copies attributes from the geometry elements or detail attributes from the whole geometry onto the work items.

Tip

For more information on Houdini geometry concepts, see Geometry.

Point

Creates one work item for each point in the loaded geometry.

Vertex

Creates one work item for each vertex in the loaded geometry.

Primitive

Creates one work item for each primitive in the loaded geometry.

Detail

Creates one work item for the entire geometry.

Bounding Box

Creates one work item with just the bounding box data of the entire geometry.

Copy Attributes

When on, the node copies attributes from the loaded geometry elements (points, vertices, primitives, or detail attributes) to the corresponding work items. To specify which attributes to copy, type a space-separated list of patterns in the text field. By default, the node copies all attributes (*).

This parameter is not available when Copy From Class is set to Bounding Box.

Tip

For more information on how to write attribute patterns, see the Attribute Pattern Syntax documentation.

Include Bounding Box

When on, creates minbounds and maxbounds attributes on each work item containing the bounding box of the corresponding geometry element.

This parameter is not available when Copy From Class is set to Bounding Box.

Include Points from Primitives

When on, creates attributes on each work item containing the positions of the primitive’s points.

This parameter is only available when Copy From Class is set to Primitive.

Create Work Item For

Determines how the node should create work items from imported geometry.

This parameter is only available when Copy From Class is set to Point, Vertex, or Primitive.

All Groups

Creates a work item for each group instead of creating a work item for each geometry element.

Specified group

Creates a single work item for the group(s) specified in the Group field.

Elements in Specified Group

Creates a work item for each element in the group(s) specified in the Group field.

If the Group field is blank, creates a work item for every element regardless of group. This is the default behavior for Create Work Item For.

Each Piece Attribute Value

Creates a work item for each value specified in the Piece Attribute field. Piece Attribute can only be the name of a string or integer attribute.

Each Element

Creates a work item for each element in the geometry. The element type is determined by the Copy From Class parameter.

Group

Specifies a space-separated list of group names/patterns.

This parameter is only available when Create Work Item For is set to Specified Group or Elements in Specified Group.

Piece Attribute

Specifies the name of the piece attribute to use.

This parameter is only available when Create Work Item For is set to Piece Attribute Values.

Edit Geometry

Add Attributes

When on, the node copies attributes from the work items to the imported geometry using the pattern in this parameter.

For example, if you're importing point attributes, those work item attributes would be created as point attributes on the geometry.

To specify which attributes to copy, type a space-separated list of patterns in the text field.

Tip

For more information on how to write attribute patterns, see the Attribute Pattern Syntax documentation.

The main way you can use this parameter is in conjunction with a node like the Invoke TOP. This node evaluates a compiled block SOP network against the geometry on the work items. Please note that it can be a little difficult to pass information from PDG work items into that SOP network because the network being invoked can’t use @ variables. However, since Add Attributes lets you copy data from the work items to the geometry that is used by the Invoke TOP node, it still has a way to access the SOP network.

Examples

example_top_geometryimport Example for Geometry Import TOP node

This example demonstrates how to use geometry import to interact with SOP networks by creating a workitem per detail, primitive, point, or vertex.

See also

TOP nodes