ModelBuilder
The ModelBuilder node (NukeX and Nuke Studio only) provides an easy way to create 3D models for 2D shots. You can build a model by creating shapes and then editing them, and align models over your 2D footage by dragging vertices to their corresponding 2D location.
To be able to align models, ModelBuilder needs a tracked camera and an input image for visual reference. You can also use other 3D geometry and point clouds as a reference if you already have these for your scene.
If you don’t connect a camera, image sequence, or reference geometry, you can still create and edit 3D models, you just can’t do anything in Align mode.
Creating and editing models using ModelBuilder requires a NukeX license, but the resulting geometry can also be used in Nuke.
Inputs and Controls
Connection Type |
Connection Name |
Function |
Input |
geo |
3D geometry to use as a reference when positioning new shapes. For example, you can use the PointCloudGenerator node to create a 3D point cloud for your shot, and connect that to this input. When creating new shapes, you can then select vertices on the point cloud to automatically align the shapes with the point cloud. This gives you an approximate initial position for your shapes. |
cam |
The camera track of the scene in which you intend to use the ModelBuilder. |
|
src |
The source footage from which the camera information was obtained. |
|
tex |
An optional 2D texture that you can display as a background in the UV preview window and on the model in the 3D Viewer. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
ModelBuilder Tab |
|||
display |
display |
wireframe |
Adjusts the display characteristics of the 3D shapes. These settings don’t affect the render output of the scene; these are for display purposes only in the 3D Viewer. • off - hides the 3D shape. • wireframe - displays only the outlines of the shape’s geometry. • solid - displays all geometry with a solid color. • solid+wireframe - displays the geometry as solid color with the shape’s geometry outlines. • textured - displays only the surface texture. • textured+wireframe - displays the wireframe plus the surface texture. |
selectable |
selectable |
enabled |
When enabled, you can make selections as normal in the Viewer. When disabled, points cannot be selected or changed. |
render |
render_mode |
textured |
Sets how the object will render. This control is independent from the display selection, but has the same settings. |
cast shadow |
cast_shadow |
enabled |
When enabled, the shape(s) can cast shadows. |
receive shadow |
receive_shadow |
enabled |
When enabled, and the geometry has a material shader attached to it, the shape(s) can receive shadows. |
Scene |
N/A |
N/A |
Shows the hierarchy of shapes and groups of shapes in the scene. To rename shapes or groups, click on them and enter a new name. To toggle the visibility of shapes or groups, click |
+ |
sceneAdd |
N/A |
Adds a new group to the scene. You can use groups to organize and set the visibility for shapes in the scene. |
- |
sceneDelete |
N/A |
Deletes the selected shapes and groups from the scene. |
Duplicate |
sceneCopy |
N/A |
Duplicates the selected shapes and groups in the scene. |
Distance |
shapeDistance |
10 |
Sets the default distance at which shapes are created. New shapes are positioned at this distance from the camera. There are no specific units for the Distance value. Low values position the shape close to the camera, and higher values mean further away. |
Textures | |||
Projected |
textureType |
current frame |
Sets the texture method to use: • current frame - Project the current frame onto the shape. • locked frame - Project the frame specified in the field on the right onto the shape. This can help you line up the shape against your source footage. • frame difference - Subtract the frame specified in the field on the right from the current frame and project the resulting frame onto the shape. This can help you line up the shape against your source footage. Note: This control only has an effect when display is set to textured or textured+wireframe. |
textureFrame |
N/A |
When Projected is set to locked frame, ModelBuilder always projects the texture from this frame onto the model. When Projected is set to frame difference, ModelBuilder subtracts this value from the current frame and projects the resulting frame on to the model. |
|
Preview | previewTexture | tex input |
Sets whether to display the image connected to the tex input in the UV preview window and on the 3D model: • off - Do not display the image in the UV preview or on the 3D model. • tex input - Display the image as a background in the UV preview and set it as the texture for the currently selected object in the 3D Viewer. This allows you to line up your UVs over features in the tex image and see how well the UVs work on the actual model. |
Export | |||
[bake menu] |
bakeMenu |
Selected geometry |
Sets what ModelBuilder creates when you click the Bake button: • Selected geometry - ModelBuilder creates a geometry node for the selected items in the scene. You can use this to bake out parts of the scene to set up projections by baking Projection. • Projection - ModelBuilder creates a projection at the current texture frame. This creates a Project3D node with a FrameHold node set to lock the input image and camera to the texture frame. You can then use the ApplyMaterial node to apply the projection to geometry created by baking Selected geometry. Note: The options in this menu are implemented in Python, and you can also use Python to add your own entries to the menu. For more information, see Exporting Shapes to Separate Geometry Nodes. |
Bake |
bake |
N/A |
Bakes out a feature of your model. You can choose the feature using the bake menu. This allows you to separate out parts of the scene for easier processing. |
Show Source Image |
srcDisplay |
enabled |
When enabled, the src image is displayed in the 3D Viewer whenever the Viewer is locked to the input camera. When disabled, the src image is not displayed in the 3D Viewer. |
Pass Through Geo |
passThroughGeo |
enabled |
When enabled, the geometry from the geo input appears both in the Viewer and renders. This can be useful when you want to use the geo input as a reference for building your model. For example, when creating new shapes, you can select points or vertices on the geometry to automatically align the shapes with the geometry. When disabled, ModelBuilder doesn’t output the geometry from the geo input. |
Shape Defaults Tab |
|||
Point |
|||
Create |
createPoint |
N/A |
Creates a new point in the scene. You can use points to define locators on different parts of the scene. This is the same as selecting Point from the shape creation menu in the ModelBuilder toolbar on the left hand side of the Viewer. |
Card |
|||
Create |
createCard |
N/A |
Creates a new card in the scene. This is the same as selecting Card from the shape creation menu in the ModelBuilder toolbar on the left hand side of the Viewer. |
Rows |
newCardRows |
4 |
Sets the default number of rows for new cards. |
Columns |
newCardCols |
4 |
Sets the default number of columns for new cards. |
Cube |
|||
Create |
createCube |
N/A |
Creates a new cube in the scene. This is the same as selecting Cube from the shape creation menu in the ModelBuilder toolbar on the left hand side of the Viewer. |
Rows |
newCubeRows |
1 |
Sets the default number of rows for new cubes. |
Columns |
newCubeCols |
1 |
Sets the default number of columns for new cubes. |
Slices |
newCubeSlices |
1 |
Sets the default number of slices for new cubes. |
Sphere |
|||
Create |
createSphere |
N/A |
Creates a new sphere in the scene. This is the same as selecting Sphere from the shape creation menu in the ModelBuilder toolbar on the left hand side of the Viewer. |
Rows |
newSphereRows |
20 |
Sets the default number of rows for new spheres. |
Columns |
newSphereCols |
20 |
Sets the default number of columns for new spheres. |
Cone |
|||
Create |
createCone |
N/A |
Creates a new cone in the scene. This is the same as selecting Cone from the shape creation menu in the ModelBuilder toolbar on the left hand side of the Viewer. |
Slices |
newConeSlices |
20 |
Sets the default number of slices for new cones. |
Cylinder |
|||
Create |
createCylinder |
N/A |
Creates a new cylinder in the scene. This is the same as selecting Cylinder from the shape creation menu in the ModelBuilder toolbar on the left hand side of the Viewer. |
Rows |
newCylinderRows |
2 |
Sets the default number of rows for new cylinders. |
Columns |
newCylinderCols |
20 |
Sets the default number of columns for new cylinders. |