On this page | |
Since | 17.5 |
This node lets you:
-
Extract points, vertices, or primitives from a SOP or geometry file, turn them into work items, and convert their SOP attributes into work item attributes.
For example, you could use this node to extract points or curves from a file and then use them to generate parallel simulations.
-
Extract points, primitives, or bounding boxes from a SOP or geometry file and save them out to separate files on disk.
-
Load whole geometry from a SOP or geometry file and store it in work items in Houdini’s native format.
Currently, the only other node that can operate on this kind of stored geometry is the Invoke TOP, but work items in other nodes are still able to pass along the geometry data.
-
Cook a SOP network and save the output geometry to disk.
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.
Tip
The $HH/help/files/pdg_examples/top_invoke
and $HH/help/files/pdg_examples/top_sop
examples show how you can use this node to load data from a SOP network.
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.
|
string |
When loading geometry from a SOP node, this attribute is set to the name of the node. |
|
string |
When loading geometry from a SOP node, this attribute is set to the full path to the SOP. |
|
string array |
A string array of attribute names is created for each of the element types:
When creating work items using All Groups or Specified Group, a
|
|
string |
When loading geometry elements from a particular group, this attribute is set to the name of the group. |
|
integer |
When creating work items from All Groups or Specified Group, this attribute is set to the size of the group. |
|
integer |
When loading points, vertices, or primitives, the node creates a |
|
integer |
When loading pieces, points, vertices, or primitives, the node creates a
|
|
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. |
|
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. |
|
integer |
When loading primitives, this attribute is set to the number of points in the primitive. |
|
integer |
When loading the geometry as a full detail, this is the number of points in the geometry. |
|
integer |
When loading the geometry as a full detail, this is the number of vertices in the geometry. |
|
integer |
When loading the geometry as a full detail, this is the number of primitives in the geometry. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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 ¶
Generate When
Determines when this node will generate work items. You should generally leave this set to “Automatic” unless you know the node requires a specific generation mode, or that the work items need to be generated dynamically.
All Upstream Items are Generated
This node will generate work items once all of the input nodes have generated their work items.
All Upstream Items are Cooked
This node will generate work items once all of the input nodes have cooked their work items.
Each Upstream Item is Cooked
This node will generate work items each time a work item in an input node is cooked.
Automatic
The generation mode is selected based on the generation mode of the input nodes. If any of the input nodes are generating work items when their inputs cook, this node will be set to Each Upstream Item is Cooked. Otherwise, it will be set to All Upstream Items are Generated.
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.
Network Evaluation Time
The SOP is evaluated at the Houdini playbar time that was set when the TOP network began to cook.
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.
Reload File Nodes
When Evaluate with Work Item Attributes is enabled, this parameter indicates whether or not file nodes should be forced to reload for each evaluating work item.
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(s)
Specifies the names of the attributes on the upstream work item that contains the geometry data. This refers to a geometry attribute. The Attribute Pattern Syntax can be used to specify multiple geometry attribute names, which are used when the Merge Operation parameter is configured to merge input geometry.
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.
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. Likewise, if Geometry Source is set to Upstream Geometry Attribute and the Attribute Name(s) parameter is set to a pattern, you can choose to merge that geometry.
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.
Expand Partitions
When on, if the upstream work items are in a partition, then the geometry will be merged from each of the work items inside the partition. Otherwise, only the attributes and files on the partition itself will be merged.
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.
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.
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.
Flatten Indices
When Set Item Index To is Element Index, this parameter determines whether or not work item indices created from element numbers should be flattened. If this parameter is enabled, the indices in the node are guaranteed to be unique across all work items. Otherwise, it’s possible for work items to have the same index if the node is configured to import multiple copies of the same input geometry.
For example, this parameter is useful when using a Wedge to import the same SOP network with different attribute variations.
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.
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.
TOP Scheduler Override
This parameter overrides the TOP scheduler for this node.
Schedule When
When enabled, this parameter can be used to specify an expression that determines which work items from the node should be scheduled. If the expression returns zero for a given work item, that work item will immediately be marked as cooked instead of being queued with a scheduler. If the expression returns a non-zero value, the work item is scheduled normally.
Work Item Label
Determines how the node should label its work items. This parameter allows you to assign non-unique label strings to your work items which are then used to identify the work items in the attribute panel, task bar, and scheduler job names.
Use Default Label
The work items in this node will use the default label from the TOP network, or have no label if the default is unset.
Inherit From Upstream Item
The work items inherit their labels from their parent work items.
Custom Expression
The work item label is set to the Label Expression custom expression which is evaluated for each item.
Node Defines Label
The work item label is defined in the node’s internal logic.
Label Expression
When on, this parameter specifies a custom label for work items created by this node. The parameter can be an expression that includes references to work item attributes or built-in properties. For example, $OS: @pdg_frame
will set the label of each work item based on its frame value.
Work Item Priority
This parameter determines how the current scheduler prioritizes the work items in this node.
Inherit From Upstream Item
The work items inherit their priority from their parent items. If a work item has no parent, its priority is set to 0.
Custom Expression
The work item priority is set to the value of Priority Expression.
Node Defines Priority
The work item priority is set based on the node’s own internal priority calculations.
This option is only available on the Python Processor TOP, ROP Fetch TOP, and ROP Output TOP nodes. These nodes define their own prioritization schemes that are implemented in their node logic.
Priority Expression
This parameter specifies an expression for work item priority. The expression is evaluated for each work item in the node.
This parameter is only available when Work Item Priority is set to Custom Expression.
Examples ¶
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.
PieceAttribute Example for Geometry Import TOP node
This example demonstrates how to import geometry using piece attributes or adhoc groups.
See also |