Referencing with GeoReference
In Nuke's USD-based 3D system, importing the same file twice does not duplicate the objects inside because USD only allows objects with unique paths to exist in the scene. This is where the GeoReference node can help you because it allows you to change the path of an object when you bring it into Nuke.
GeoReference doesn't duplicate objects, it creates a light-weight reference to an object often referred to as an instance in other applications, such as Katana. You can use the File Path control to reference a file on disk or the Prim Path control to reference an object already in the scene graph:
• File Path references an object from an external file and you can give the object a different path so that you can import instances of the same object several times. If you use GeoImport, the path to the object can't be changed, so you would overwrite the object each time you import it.
• Prim Path creates an instance of an existing object in the scene and gives it a new path. This is an easy way to create instances of objects in the 3D system. Bear in mind that GeoReference also applies the transforms on the referenced object to the instance, so it appears in the scene in the same place as the original object.
Note: See Instancing Geometry to learn more about how to copy objects already in the scene graph via instancing.
Reference an Object Using a File Path
Referencing an object using a file path creates an instance from a specified USD file and gives it a new path, effectively duplicating the object. The object does not have to exist in the scene because you specify a file from which the object is referenced.
To reference an object using the File Path:
- Add a GeoReference node by clicking 3D > Create > GeoReference in the left-hand toolbar,
- Select the Reference Type you want to add:
- Enter the File Path to the USD file on disk that contains the object you want to reference.
- Enter the Prim Path to the object you want to reference. You can enter the path manually or, if you're not sure what the path is, you can load the file using a GeoImport node and then locate the source object in the Scene Graph tab. Drag the location to the Prim Path control to add it automatically.
OR
Press Tab in the Node Graph to display the node selector, type GeoReference, and then press Enter.
A GeoReference node is added to the Node Graph and its Properties are displayed.
• Reference - load the object immediately.
• Payload - payloads can be delayed to stop heavy geometry loading until you're ready.
The new reference object is added to the bottom of the scene graph by default using the {nodename} variable in the Path control. In this case, {nodename} is GeoReference1. Create Missing Parents sets the type of prim to create if there are missing ancestors in the path.
For more information on paths and masks, see Using Paths and Masks.
Reference an Object Using a Prim Path
Referencing an object using only a prim path creates an instance from an existing object and gives it a new path, effectively duplicating the object.
To reference an object using only the Prim Path:
- Add a GeoReference node downstream of an existing prim by clicking 3D > Create > GeoReference in the left-hand toolbar,
- Select the Reference Type you want to add:
- Enter the Prim Path to the object you want to reference. You can enter the path manually or, if you're not sure what the path is, you can locate the source object in the Scene Graph tab and drag the location to the Prim Path control to add it automatically.
OR
Press Tab in the Node Graph to display the node selector, type GeoReference, and then press Enter.
A GeoReference node is added to the Node Graph and its Properties are displayed. In this simple example, the GeoReference node is immediately downstream of the original GeoImport containing the prim we're going to reference. In reality the GeoReference node can be anywhere downstream of the prim it's referencing.
• Reference - load the object immediately.
• Payload - payloads can be delayed to stop heavy geometry loading until you're ready.
The new reference object is added to the bottom of the scene graph by default using the {nodename} variable in the Path control. In this case, {nodename} is GeoReference1. Create Missing Parents sets the type of prim to create if there are missing ancestors in the path.
For more information on paths and masks, see Using Paths and Masks.
Referencing an existing prim copies its transforms as well, so the referenced prim is rendered in exactly the same position as the source object.