C_CameraSolver

CaraVR's C_CameraSolver node creates an approximate camera geometry, relative to a nodal point or a sphere, for multi-camera rigs. This defines the location and orientation preview for each camera so that the images can be stitched by C_Stitcher for output.

Inputs and Controls

Connection Type

Connection Name

Function

Input

1

The sequence representing a camera on the rig you want to solve. When you connect the first input, a new input 2, 3, and so on is spawned, allowing you to connect multiple Reads.

Warning:  The Read nodes representing the cameras in the rig must be pre-sychronized, because CaraVR and Nuke do not support auto-synchronization.

Control (UI)

Knob (Scripting) Default Value Description

C_CameraSolver Tab

Local GPU

gpuName

N/A

Displays the GPU used for rendering when Use GPU if available is enabled. Local GPU displays Not available when:

Use CPU is selected as the GPU device in the Preferences.

no suitable GPU was found on your system.

it was not possible to create a context for processing on the selected GPU, such as when there is not enough free memory available on the GPU.

You can select a different GPU device, if available, by navigating to the Preferences and selecting an alternative from the GPU Device dropdown.

Note:  Selecting a different GPU requires you to restart Nuke before the change takes effect.

Use GPU if available

useGPUIfAvailable

enabled

When enabled, rendering occurs on the Local GPU specified, if available, rather than the CPU. The output between the GPU and CPU is identical on NVIDIA GPUs, but using the GPU can significantly improve processing performance.

CaraVR supports AMD GPUs on late 2013 Mac Pro 6,1, mid 2015 Mac Pro 11,5, and and late 2016 MacBook Pro 13,3, running OS X 10.9.3 'Mavericks', or later. While, in some cases the bit-wise equality between GPU and CPU holds, for some operations there are limitations to the accuracy possible with this configuration.

Note:  Enabling this option with no local GPU allows the script to run on the GPU whenever the script is opened on a machine that does have a GPU available.
You should also select this if you wish to render from the command line with the --gpu option.

GPU processing also requires certain NVIDIA and AMD drivers. For more information on the minimum requirements, please refer to the Nuke Release Notes available in Help > Release Notes.

Input

Preset

rigPreset

Custom

Sets the required preset rig information to load:

Custom - allows you to specify any number of cameras for the rig, with custom settings for each available in the Cameras tab.

PTGui - allows you to specify an existing rig created in PTGui.

Preset Rigs - select the required preset rig from the list to create the relevant rig with the correct number of cameras. These are rarely accurate enough to 'just work', but they provide a good basis for a solve in some cases.

Setup Rig

setupRig

N/A

Click to set up, or change to, the currently selected rig Preset.

Cameras

numCameras

1

Displays the number of cameras in the preset rig or currently connected to the node in Custom rigs.

Lens Type

rigLensType

Fisheye

Sets the lens type used for all cameras in the rig: Rectilinear or Fisheye.

If you're using both types of lens, use the controls on the Camera tab to customize the individual cameras.

Note:  This control is only available when Set global camera parameters is enabled.

Set global camera parameters

setCameras

disabled

Enable Set global camera parameters to activate the Lens Type, Sensor Size, and Focal Length controls.

Sensor Size xy

rigSensorSize

36,24

Sets the sensor size used for all cameras in the rig.

If you're using different types of sensor, use the controls on the Camera tab to customize the individual cameras.

Note:  This control is only available when Set global camera parameters is enabled.

Film Back Preset

rigFilmBackPreset

Custom

Sets the camera Sensor Size and Focal Length automatically for the preset selected.

Note:  This control is only available when Set global camera parameters is enabled.

Focal Length

rigFocalLength

17

Sets the focal length used for all cameras in the rig.

If you're using different focal lengths, use the controls on the Camera tab to customize the individual cameras.

Note:  This control is only available when Set global camera parameters is enabled.

Keying

Analysis Keys

 

Key number

1

Displays the total number of analysis keyframes added to the sequence.

Key count

1

Displays the current analysis keyframe.

N/A

N/A

Click to jump to the previous keyframe.

N/A

N/A

Click to jump to the next keyframe.

N/A

N/A

Click to add a keyframe at the current frame in the sequence.

N/A

N/A

Click to delete the keyframe at the current frame in the sequence.

Step

keyStep

500

Sets the interval between keyframes for the Key All button.

Key All

addAllAnalysisKeys

N/A

Click to add keyframes to the sequence at intervals set by the Step control.

Delete All

deleteAllAnalysisKeys

N/A

Click to delete all keyframes from the sequence.

Import

importAllKeys

N/A

Click to import existing keyframes automatically from existing nodes in the current script.

Note:  Importing keyframes deletes any existing keyframes.

Analysis

Orientation

orientationType

Optimize per Camera

Sets the orientation for the rig or individual cameras, depending on selection:

Known Orientation - fixes the existing camera rotation and position in the solve.

Known Rotation - fixes the existing camera rotation in the solve, but calculates the position of each camera individually.

Known Position - fixes the existing camera position in the solve, but calculates the rotation of each camera individually.

Optimize per Camera - calculates the camera rotation and position of each camera individually.

Focal Length

focalLengthType

Optimize Single

Sets the focal length for the cameras in the rig:

KnownFocal Length - fixes the existing focal length in the solve.

Optimize per Camera - calculates the focal length for each camera in the rig.

Optimize Single - calculates a single optimized focal length for all cameras in the rig.

Lens Distortion

lensDistortionType

No Lens Distortion

Sets the lens distortion for the cameras in the rig:

No Lens Distortion - treats the cameras as having no distortion.

Known Distortion - fixes the lens distortion in the solve.

Optimize per Camera - calculates the lens distortion for each camera in the rig.

Optimize Single - calculates a single optimized lens distortion for all cameras in the rig.

Camera Layout

layoutType

Spherical Layout

Sets the layout for the cameras you intend to use:

Nodal Layout - all cameras are located at the scene origin and can't be adjusted. For example, a single DSLR shooting 360 stills would use this nodal layout setting.

Spherical Layout - the cameras in the rig are placed on a sphere whose diameter, defined by the Rig Size control on the Cameras tab, defaults to 30 cm.

Horizontal / Vertical / Planar Layout - the cameras in the rig are placed on a single line or plane depending on selection.

Free Layout - no constraints are enforced on camera positions.

Note:  The Horizontal, Vertical, Planar, and Free layouts are experimental. Please contact support.foundry.com if you have any feedback you'd like to share with Foundry.

Tip:  Setting the Rig Size control to the actual size of the rig in use allows you to enter real world measurements for other Cameras controls, such as Focal Length.

Spherical layouts can be more accurate than nodal layouts, allowing you to alter the Convergence between cameras to check for image alignment at different depths in the scene.

Match

matchCameras

N/A

Click to compare keyframes on overlapping cameras for shared features. CaraVR only looks for matches in cameras that overlap by default.

Note:  Match calculates the feature matches for all cameras in the rig at the same time, so there is no need to calculate them separately for left and right images in a stereo setup.

Solve

solveCameras

N/A

Click to calculate the geometry for the selected rig to define the location and orientation of each camera, relative to the other cameras in the rig, and arrange the matched images in the correct order.

Note:  The Solve calculates the geometry for all cameras in the rig at the same time, so there is no need to calculate them separately for left and right images in a stereo setup.

Refine

refineCameras

N/A

Click to attempt to refine the camera solve using the current solve and feature matches.

You might do this if you have rejected some of the automatic feature matches or if you have added some custom matches using the Add Match Viewer tools.

Reject

rejectMatches

N/A

Click to delete all current feature matches that fall outside the Error Threshold setting.

Reset

resetCameras

N/A

Click to reset the cameras in the rig to their default configuration.

Solve Error

solverRMSError

0

Displays the root mean square (RMS) error for a solve. This is a good indicator of solve quality.

Error Threshold

maxRMSEThreshold

10

Sets the solve error level permitted, below which feature matches are rejected.

Reducing the allowed error level dynamically rejects features that fall out side the new level, allowing you to easily reject them and refine the solve.

Output

Format

outputFormat

dependent on Compositing environment Project Settings

Sets the output resolution passed down the node tree.

Typically, you would set the format globally in the Project Settings, but this control overrides the global setting.

Cam Projection

cameraViewsProjectionType

Default (pass-through)

Sets the projection mode for the cameras output by C_CameraSolver:

Default (pass-through) - individual camera views are passed through in their native format.

Latlong - individual camera views are projected into latlong space, allowing you to make manual corrections before stitching.

Converge

convergenceDepth

10

Sets the depth at which the cameras overlap, allowing you to bring particular areas in the scene into focus.

The approximate diameter of the sphere on which the cameras sit uses the Rig Size control on the Cameras tab. This normalizes the 3D representation of the rig into close to real world units, depending on the quality of the solve. The Converge control then defines the depth at which the preview stitch is converged, the "hero" depth of the scene.

Note:  Convergence doesn't affect nodal rigs because all the cameras share the same origin.

Cameras

Cameras

camerasLink

N/A

Displays camera information for views connected to C_CameraSolver's inputs.

As you match, solve, and refine the rig, the cameras in the table update with focal length and positional data.

You can toggle cameras on and off to determine which cameras from the rig are displayed in the stitch preview.

Export

Export Menu

exportMenu

Cameras

Sets the export nodes to add to the Node Graph:

Cameras - creates Camera nodes, attached to an Axis and Scene, for each camera in the rig.

Transforms (split) - creates a single C_SphericalTransform containing rotation data for each camera in the rig.

Transforms (separate) - creates separate rotation data for each view using a OneView and C_SphericalTransform node for each camera in the rig.

Manual 2D Stitch - creates a RigWorkflow2D group containing a C_SphericalTransform for each view, passed into a JoinViews and C_Blender node to re-assemble the views into a coherent whole.

Manual 3D Stitch - creates a RigWorkflow3D group containing a C_SphericalTransform and Camera for each view, projected onto a Sphere and rendered through C_RayRender.

Ingest (joined) - creates ShuffleView nodes for all inputs, allowing you to assign inputs to views manually and then joins the views together.

Ingest (separate) - creates ShuffleView and OneView nodes for all inputs, allowing you to assign inputs to views manually.

This export is similar to Ingest (joined), but the views are separated out into individual streams.

Contact Sheet - creates a ContactSheet containing all solved views for review purposes.

Camera Ingest - automatically creates Camera nodes for each view, including an Axis node containing any global rotation, and links the images and cameras to a C_CameraIngest node.

This export option sets the Cameras > Focal Length control to Default (pass through), allowing you to pass through focal lengths unchanged to ingest extreme fisheye cameras without issues.

Create

exportButton

N/A

Click to create the export specified in the export dropdown.

Cameras Tab

Input Views

Left Views

inputLeftViews

left

When Stereo is enabled, allows you to select which views to solve for the left eye.

Right Views

inputRightViews

N/A

When Stereo is enabled, allows you to select which views to solve for the right eye.

Stereo

stereoViewsInputSplitting

disabled

When enabled, select which views to solve for the left and right eye using the dropdowns.

When disabled, solve all views.

Rig

Cameras

numCameras

1

Displays the number of cameras in the rig.

Rig Size

rigSize

0.30000001

Sets the diameter of the rig when Camera Layout is set to Spherical Layout.

This normalizes the 3D representation of the rig into close to real world units, depending on the quality of the solve.

The Converge control then defines the depth at which the preview stitch is converged, the "hero" depth of the scene.

The Rig Size and Converge controls use the same units so if you set the Rig Size in meters, the Converge control also uses meters.

Camera

Lens Type

lensType

N/A

Sets the lens type used for the selected cameras in the Cameras table: Rectilinear or Fisheye.

Note:  This control is only available when you have a camera selected in the Cameras table.

Sensor Size xy

sensorSize

N/A

Sets the sensor size used for the selected cameras in the Cameras table.

Note:  This control is only available when you have a camera selected in the Cameras table.

Focal Length

focalLength

N/A

Sets the focal length (mm) for the selected cameras in the Cameras table.

Position

position

N/A

Sets the camera position in the rig for the selected cameras in the Cameras table, scaled to match the Rig Size setting.

Rotation

rotation

N/A

Sets the camera rotation for the selected cameras in the Cameras table for a ZXY rotation order.

Centre Shift

centreShift

0, 0

Sets the center point shift for the lens of the selected cameras in the Cameras table.

Distortion

distortion

0, 0, 0

Sets the distortion for the lens of the selected cameras in the Cameras table.

Mask

Shape

alphaShape

Rectangular

Sets the shape of the mask used to blend images from adjacent cameras:

Rectangular - overwrites the source alpha channel with a rectangular blend mask.

Elliptical - overwrites the source alpha channel with an elliptical blend mask.

Source - uses the source alpha as the blend mask.

Size

alphaSize

N/A

Sets the size of the blend mask on the x and y axis for Rectangular and Elliptical blend masks.

Note:  The Size control has no effect on Source alpha blend masks.

Feather

alphaFeather

N/A

Sets the feathering applied to the edges of the blend mask for Rectangular and Elliptical blend masks.

Note:  The Feather control has no effect on Source alpha blend masks.

Links

Links

links

N/A

Displays list of cameras linked to the selected cameras in the Cameras table.

Output

View

outputView

All

Sets the output view for the selected cameras in the Cameras table:

All - the selected cameras are used for both views. Use this option for monoscopic stitching or when you want to use the camera for both views in a stereoscopic stitch.

Left - the selected cameras are used for the left view in a stereoscopic stitch.

Right - the selected cameras are used for the right view in a stereoscopic stitch.

C_CameraSolver outputs all cameras, regardless of your View settings. The View control adds metadata to the stream so that C_Stitcher can easily separate out designated cameras when Enable Stereo Stitch is enabled.

In the Cameras table, the view column displays the camera's view: 0 (All), 1 (Left), or 2 (Right).

Cameras

cameras

N/A

Displays camera information for views connected to C_CameraSolver's inputs.

As you match, solve, and refine the rig, the cameras in the table update with focal length and positional data.

You can toggle cameras on and off to determine which cameras from the rig are displayed in the stitch preview.

You can also select cameras to assign to different views in the stitch using the View dropdown.

Set as Default

setRigDefault

N/A

Click to set the currently selected camera as the rig default. Click Reset on the C_CameraSolver tab to revert this setting.

Settings Tab

Matching

Match

matchType

Rectified

Sets the matching method used when you click Match on the C_CameraSolver tab:

Input - analyze matches between the native source inputs.

Rectified - remove any lens distortion and then analyze matches between the source inputs.

Spherical - project the source inputs into latlong space and then analyze matches between the source inputs. Spherical matching is designed for rigs containing cameras with a field of view greater than 180°.

Match in overlap region

matchOverlap

enabled

When enabled, only match features in overlap regions between adjacent cameras.

When disabled, match features across the entire image.

User Matches Weight

userMatchesWeight

1

Controls how much influence user matches exert over the solve.

The default value gives user matches far more weight than the automatic matches created by CaraVR. As you decrease the weight, bias moves toward the automatic matches.

Solving

Rig Template

animatedSolve

Static

Determines whether or not individual cameras are animated in relation to the rig:

Static - the solve assumes cameras are static in relation to the rig, with no adjustments to position or rotation.

Animated - the solve compensates for changes to individual camera positions and rotations at keyframes through out the sequence.

Note:  Setting Rig Template to Animated does not mean that the rig is animated, but that the individual cameras are animated in relation to each other.

Align horizontal camera ring

correctHorizontalRig

enabled

When enabled, automatically correct cameras on spherical rigs so that cameras align horizontally.

Display

Zoom Size

zoomWindowSizePreset

200px

Sets the size of the zoom window in the Viewer.

Magnification

zoom Magnification

x2

Sets the magnification in the zoom window in the Viewer.

Transform

transform order

xform_order

SRT

Sets the operation order for scale (S), rotation (R), and translation (T). The possible operation combinations are SRT, STR, RST, RTS, TSR, TRS.

rotation order

rot_order

ZXY

Sets the order of rotation. The possible axial combinations are ZXY, XYZ, XZY, YXZ, YZX, ZXY, ZYX.

translate

translate

0, 0, 0

Lets you translate the rig along the x, y, and z axes. You can also adjust translate values by clicking and dragging the axis in the 3D Viewer.

rotate

rotate

0, 0, 0

Lets you rotate the rig around the x, y, and z axes. You can adjust rotate values by holding down Ctrl/Cmd and dragging in the 3D Viewer.

uniform scale

uniform_scale

1

Lets you scale the rig simultaneously on the x, y, and z axes.

Local matrix

specify matrix

useMatrix

disabled

Enable this control to specify matrix values for the object you’re transforming as an alternative to setting transform, scale, skew and pivot values above.

matrix

matrix

N/A

The matrix displays values from the object’s transform, rotate, scale, skew, and pivot controls.

Check specify matrix and copy or drag-and-drop matrix values from another object to apply those values, for example, if you wanted to align objects in a scene.

Python Tab (These controls are for Python callbacks and can be used to have Python functions automatically called when various events happen in Nuke.)

before render

beforeRender

none

These functions run prior to starting rendering in execute(). If they throw an exception, the render aborts.

before each frame

beforeFrameRender

none

These functions run prior to starting rendering of each individual frame. If they throw an exception, the render aborts.

after each frame

afterFrameRender

none

These functions run after each frame is finished rendering. They are not called if the render aborts. If they throw an exception, the render aborts.

after render

afterRender

none

These functions run after rendering of all frames is finished. If they throw an error, the render aborts.

render progress

renderProgress

none

These functions run during rendering to determine progress or failure.