The commands below can be used to set and modify the reconstruction region, and run the reconstruction.
Command Name | Required Parameter | Optional Parameter | Description |
---|---|---|---|
resetGround | Set the ground plane back to its original orientation and position. | ||
setGroundPlaneFromReconstructionRegion | Automatically center a model using a reconstruction region into the middle of the grid, adjusting both rotation and transformation. | ||
setReconstructionRegionAuto | Set a reconstruction region automatically. | ||
setReconstructionRegion | box.rcbox | Import a reconstruction region from the box.rcbox file. | |
setReconstructionRegionOnCPs | controlPoint controlPoint controlPoint controlPoint|heightValue |
Set a reconstruction region on existing control points. Three control points define the base of the region and the height of the region is defined by the frouth control point or by entering the height value. See the example below. | |
scaleReconstructionRegion | scaleX scaleY scaleZ |
origin|center absolute|factor | Scale the reconstruction region in each axis (scaleX, scaleY, and scaleZ). Scale parameters can be treated either as absolute values (absolute) or scale factors (factor) from the center of the region (center) or its origin (origin) defined by the first control point when using setReconstructionRegionOnCPs command. Default values are "absolute" and "center". See the examples below. |
moveReconstructionRegion | moveX moveY moveZ |
Move the reconstruction region along the region's axes. The values are in the coordinate system’s units. See the examples below. | |
rotateReconstructionRegion | rotateX rotateY rotateZ |
Rotate reconstruction region around its axes. All values are in degrees. See the examples below. | |
offsetReconstructionRegion | offsetX offsetY offsetZ |
Offset the reconstruction region on its axes by the values of its dimensions. | |
exportReconstructionRegion | box.rcbox | Export a reconstruction region to the box.rcbox file. | |
calculatePreviewModel | Calculate 3D mesh in the preview quality. | ||
calculateNormalModel | Calculate 3D mesh in the normal quality. | ||
calculateHighModel | Calculate 3D mesh in the highest quality. | ||
continueModelCalculation | If model calculation was paused, or if there was a crash, it is possible to continue calculation using this command. |
The examples which follow show how to run model calculations from the command line.
We will begin with a simple script that shows the first two reconstruction-region commands in function.
After basic alignment, it will set a reconstruction region automatically and export it to a file.
If you want to import a custom reconstruction region, you can first export it from the application
by clicking on Reconstruction / Export / Reconstruction Region
and then alter the values and parameters inside the .rcbox file.
The script below will open an aligned project, select the largest component, import a reconstruction region and calculate models in a preview, normal and high detail.
The multiline script should do the same as the one-line script, but it is more legible and separated into logical parts.
You can use command -setReconstructionRegionOnCPs to set a reconstruction region with control points.
It is necessary to have at least three control points set to use this command. These three points will define the base plane of the reconstruction region (first two
control points define the width of the region and the third one defines the length). The height of the reconstruction region can be set either by fourth control point or entering the height value (in the coordinate
system’s units). This value can be negative.
Example:
This example will create a reconstruction region on control points CP1, CP2, and CP3 with the height 50 in the coordinate system’s units.
The order of the control points in the command defines the reconstruction region’s axes. The axes always define a right-handed system which has the origin in the first
defined control point and X axis starts in the origin and goes through the second control point.
Reconstruction region can be scaled on its axes based on the absolute values or multiplying factors using the command -scaleReconstructionRegion. It is also possible to choose from where it will be scaled: origin and center. The default settings for this command are set to scale the reconstruction region from the center of the region and based on the absolute values.
Example:
This example will scale reconstruction region from the center based on the defined factors. Axes X and Y will be multiplied by the factor 1.1 and Z axis will be multiplied by the factor 1.2.
To move the reconstruction region the command -moveReconstructionRegion can be used.
Example:
When used, this example will move reconstruction region by 10 units (defined by the coordinate system) on all axes.
Rotation of the reconstruction region is executed with the command -rotateReconstructionRegion. Defined parameters needed are all in degrees.
Example:
This example will rotate reconstruction region by 45 degrees on all axes, which also will be rotated.
Offset the reconstruction region with the command -offsetReconstructionRegion by the length of its sides. The parameters are relative values that serve as multiplicators.
Example:
This example will offset the reconstruction region on the X axis by one length of its depth, on the Y axis by two lengths of its width, and on the Z axis by half of the height length. These values are applied to the reconstruction region's XYZ axes.
To speed up the model computation process using more computers, you can precompute depth maps with the PrecomputeDepthmaps setting:
This approach is useful when you wish to maximize GPU/CPU utilization and if you have many assets to compute, which are of almost the same size, for example numerous full-body scans. You can build two machines. One with multiple powerful GPUs but normal CPU, and the second with normal GPU but powerful CPU. Then you will need RealityCapture CLI on both machines. Having this setup, you may keep running these two pipelines in parallel:
Move Project.rcproj from C:\MyFolder_on_GPU-PC to C:\MyFolder_on_CPU-PC and cache to C:\MyFolder_on_CPU-PC\Cache.
When there is an unfinished model due to a crash or model calculation was paused, it is possible to continue its calculation using the
command -continueModelCalculation. To be able to use this command after a crash, auto save mode must be activated beforehand.
Command scans for unfinished models in your project, and once it encounters one it continues its calculation. Models are searched in the order from the last
component to the first one, and within them from the last model to the first model.
Example (when paused):
When pausing a calculation, it is possible to choose not to pause it temporarily. This will leave model in a partially computed state. This example will continue the calculation of that model if the loaded project was saved before closing.
Example (after a crash):
As mentioned above, auto save mode must be enabled to be able to use this command. When it is enabled, it is possible to use an optional parameter with the command -load, which is recoverAutosave. This parameter will enable RealityCapture to scan for the unfinished model.
Manage the current project, the application itself and add images via CLI
Using CLI with an .rccmd file
On delegating commands into an opened instance of RealityCapture
Commands for alignment and component handling
Further model processing via the command line
Application settings and behaviour
Commands for handling potential errors