GeoMerge

The GeoMerge node combines prims from different node branches and lets you manage how layers are merged. This node provides various options for merging layers giving control of subsequent exports.

You can then affect all objects attached to the GeoMerge at once. For example, you could add a GeoTransform downstream with the Mask set to /* (forward-slash asterisk) to transform the entire scene in one operation. GeoMerge is functionally equivalent to GeoScene and does not have any node-specific properties.

Note:  Prims downstream from GeoMerge with Mask set to {lastmodified} inherit from the strongest layer, the layer connected to the highest numbered input.

See also GeoScene.

Tip:  GeoMerge's classic 3D system equivalent is the MergeGeo node.

Inputs and Controls

Connection Type

Connection Name

Function

Input

numbered inputs

Combines any new 3D system prims you want to merge together.

 

Control (UI)

Knob (Scripting)

Default Value

Function

GeoMerge

Merge Mode

mode

Merge Layers

Sets how the merge is performed:

Merge Layers - the default behavior for merging, it combines the prims from one pipe with the prims of another pipe.

It adds all layers from the inputs to the layer stack.

See Merge Layers.

Duplicate Prims - Allows you to take a prim input and create a copy with a user-defined name.

This flattens all A inputs and duplicates their root prims. The B input is merged unchanged - only prims that exist on both branches are duplicated.

See Duplicate Prims.

Flatten Layers- Flattens layers from each input and adds the flattened single layer to the layer stack.

See Flatten Layers.

Flatten to Single Layer - Flattens the layers from each input into one single layer.

See Flatten to Single Layer.

Deisolate

deisolate

off

Turn on to remove all the layers from all GeoIsolate nodes in any of the inputs.

Duplicate Prims option settings

Copy Name path_pattern {path}_Copy{index}

The path of the duplicated prim(s). If this is left empty, a suffix of CopyN is added.

You can use the following terms in the path to substitute text:

${name} - name of the prim

${path} - full path of the prim

${count} - total number of inputs

${nodename} - name of this node

 

Duplicate in place in_place off Choose whether to duplicate the whole hiearchy containing the prim or to attempt to only duplicate prims that were modified in the input branch.

Merge Mode Options

Merge Layers

Combines the prims from one pipe with the prims of another pipe.

The default merge behavior is always "A over B" like the 2D Merge. The B input is the main pipe, and the A pipe provides overrides/duplicates. The A inputs are applied in numerical order so higher numbers override lower ones.

From a USD layers perspective, this adds all incoming layers to the layer stack.

Merge Layers: A simple example of merging two stacks.

Merge Layers is recommended as the default behavior for merging in the USD architecture. Different input scenarios provide different results…

Scenario 1: Different stages are piped in from their own node branches

If you have multiple stages piped into the node from their own node branches (as in the diagram above), the layers will be merged so that they exist separately in the result. For example:

  • the geometry of a building in pipe A

  • the geometry of a character in pipe B

Merge Layers is most similar to how merging works in the classic 3D system.

 

Scenario 2: The same stage is merged back to itself

Merging back to the same stage results in one of the pipes overriding the other as both stages have the same path name. You will not see two instances of the same geometry as in a hierarchical scenegraph prims cannot share the same path. Instead, the stage with the strongest opinion is shown.

Example 1:

  • You have geometry from a building in pipe A.

  • You have a transformed version of the same building in pipe B.

  • You try to GeoMerge pipe A and pipe B.

  • Result: pipe with the strongest opinion is shown. In this instance pipe B where we have transformed the building will be shown.

Example 2:

  • You have geometry from a building in pipe A.

  • You deactivate or hide geometry (using GeoPrune or GeoIsolate) in the building for pipe B.

  • You merge pipe A and pipe B using GeoMerge.

  • Result: pipe with the strongest opinion is shown. In this instance pipe B where we have either deactivated or hidden the rest of the geometry in the stage.

Note:  In USD, an ‘opinion’ is a way of determining how the USD stage is composed. For more information see the Pixar USD reference.

Merging Geometry From the Same Stage

For scenario 2 (above), where you want to merge modified geometry that is an offshoot of the same stage you can use the GeoIsolate node and select Deisolate on merge. The Deisolate knob removes any layers created by GeoIsolate nodes allowing you to modify geometry and merge without the rest of the stage being overwritten.

Alternatively, you can fall back on the traditional USD workflow and use a GeoReference node to generate a unique path name for the geometry and so avoid conflicts when merging.

Duplicate Prims

Allows you to take a prim input and create a copy with a user-defined name.

This flattens all the layers on input A and duplicates their root prims. Input B is merged unchanged - only prims that exist on both branches are duplicated.

Duplicate Prims: The B input is merged intact and the A input is flattened using duplicate prims (the ‘ indicates a duplicate).

Flatten Layers

Flattens layers from each input and adds the flattened layers to the layer stack.

Flatten Layers: Incoming layers are flattened and merged to form the result.

Use Flatten layers to merge different stages, flatten the layers, and stack the results.

Flatten to Single Layer

Flattens the layers from each input into one single layer.

Flatten to Single Layer: All layers from the inputs are merged into a single layer.

Use Flatten to Single Layer when you want to merge the stages together into a stage containing a single flattened layer.