Model Tools

When you have successfully created a model, you can use these tools to colorize your model, create textures, and do some post-processing on your models.

Command Name Required Parameter Optional Parameter Description
selectModel modelName Select a model with the specified name (modelName).
deleteSelectedModel Delete the currently selected model.
duplicateSelectedModel Duplicate the selected model (including textures).
renameSelectedModel newModelName Rename the currently selected model.
correctColors layerName Run color correction for all layers or a specified layer (layerName) in the selected component.
unwrap params.xml Calculate unwrap of a model using the current settings or the settings from the params.xml (optional parameter). You can export these settings using the Unwrap tool in the application.
calculateTexture Calculate texture using the current settings.
reprojectTexture sourceModel resultModel params.xml Reproject texture from a textured model (sourceModel) to an unwrapped model (resultModel) using the current settings or the settings from the params.xml file (optional parameter). sourceModel and resultModel are model names from the application. You can export these settings from the Texture Reprojection tool in the application.
calculateVertexColors Calculate coloring using the current settings.
calculatePreviewVertexColors Calculate draft coloring using the current settings.
simplify targetTriangleCount or params.xml Simplify a selected model using the current settings (use it without any parameters) to the selected triangle count (targetTriangleCount) or using the settings from the params.xml file. You can export these settings using the Simplify Tool in the application.
smooth params.xml Smooth a selected model using the current settings or the settings from the params.xml file. You can export these settings from the Smoothing Tool in the application.
closeHoles maxEdgesCount Close model holes using the current settings or using a specified maximal number of edges (maxEdgesCount).
cleanModel Clean the selected model: remove non-manifold edges and vertices, close small holes, etc.
selectTrianglesInsideReconReg Select triangles inside the reconstruction region.
selectTrianglesOutsideReconReg Select triangles outside the reconstruction region.
selectMarginalTriangles Select triangles that are enclosing the volume but are not part of the current reconstruction.
selectLargeTrianglesAbs edgeSizeThreshold Select triangles with an edge length larger than the threshold (edgeSizeThreshold).
selectLargeTrianglesRel edgeSizeThreshold Select triangles with an edge length larger than the threshold (edgeSizeThreshold) multiplied by average edge length.
selectLargestModelComponent Select triangles that belong to the largest connected component of the model.
invertTrianglesSelection Invert a selection of triangles.
deselectModelTriangles Deselect all model triangles.
removeSelectedTriangles Create a new model with selected triangles left out (the same behavior as with the Filter Selection tool).
cutByBox inner|outer fillHoles Filter out the triangles inside or outside of the reconstruction region. The required parameter defines which triangles will be filtered out, and the optional parameter fillHoles determines if the cut holes will be filled (can be set to true or false which correspond to the Yes and No values). If the optional parameter is not chosen, the default value will be used (Yes). This tool creates a new model..
dtmClassify params.xml Classify vertices of the selected model into pre-defined classes using the current settings or the settings from the params.xml file (optional parameter). You can export these settings from the AI Classify tool in the application.
exportModel modelName fileName params.xml Export a model (modelName from the project) as a file (fileName including the path and file extension) using the current settings or the settings from the params.xml (optional parameter). You can export this file from the Export model dialog.
exportSelectedModel fileName params.xml Export the selected model as a file (fileName including the path and file extension) using the current settings or the settings from the params.xml (optional parameter). You can export the file from the Export model dialog.
importModel fileName Import a model from a file (fileName including the path and file extension).
calculateOrthoProjection params.rcortho Calculate an orthographic projection using settings from the params.rcortho file. Instructions on how to obtain the file can be found here.
selectOrthoProjection orthoName Select an orthographic projection with the specified name (orthoName).
editOrthoProjectionSelection "key=value" Edit the settings/parameters of the selected ortho projections based on the value in the Selected ortho photo(s) panel or its key. More information can be found here.
exportOrthoProjection fileName params.xml Export selected orthographic projection (image, DSM or DTM) into a file (fileName including the path and the file extension) using settings from the params.xml file. You can export the parameters file from the Export Ortho Photo, Export Digital Surface Model and Export Digital Terrain Model dialog.
exportReport outputFileName templateFileName Export a report into a file (outputFileName including the path and the .html extension) using a template (templateFileName including the path). The default templates are stored in the installation folder\Reports.
printReport reportString Write out report texts in the Command Prompt. This command can be used when RealityCapture is run with a batch file. It does not work with delegation. Learn more about report customization here.
exportDepthAndMask folderName params.xml Export depth maps and/or masks for selected images. If folderName and params.xml are not specified, results are stored along with the original images using the current settings. You can export the settings file from the application in the Export Depth Maps and Masks dialog.
exportLod fileName params.xml Export the selected model as a linear Level-of-Detail model into a file (fileName including the path and file extension) using the current settings or the settings from the params.xml (optional parameter). You can export this file from the Export LoD dialog. For export to Cesium 3D Tiles (.json) file format use command export3dTiles.
export3dTiles fileName params.xml Export the selected model as a hierarchical Level-of-Detail model into a .json file (fileName including the path and file extension) using the current settings or the settings from the params.xml (optional parameter). You can export this file from the Export LoD dialog after selecting Cesium 3D Tiles (.json) file format.
renderMeshFromCustomPositionYPR fileName params.xml|width height focalLength x y z yaw pitch roll Export a render of the model from a camera position using yaw, pitch, and roll orientation.
Example for a view from above a model at 0,0,0 in local Euclidean space:
Realitycapture.exe -renderMeshFromCustomPositionYPR "C:/images/image.png" 1280 720 100 0 0 150 0 0 0
renderMeshFromCustomPositionLookAt fileName params.xml|width height focalLength x y z atX atY atZ upX upY upZ Export a render of the model from a camera position, which looks at another XYZ coordinate, with an option to add another XYZ coordinate to determine which direction the vertical axis ascends to.
Example for a side view of a model at 0,0,0 in local Euclidean space, using the up option:
Realitycapture.exe -renderMeshFromCustomPositionLookAt "C:/images/image.png" 1280 720 50 0 -100 0 0 0 10 0 0 1
uploadToSketchfab APIToken Upload your model to Sketchfab. The required parameter is the Sketchfab API token and it can be found in the account settings of your Sketchfab account.

Model Tools Examples

These are some examples of the model tools, import and export usage.

Simplify, smooth, texture and export a model

This piece of code will calculate a model in a normal detail, simplify it to 100k triangles, smooth, texture and then export the result.

RealityCapture.exe .... -calculateNormalModel -simplify 100000 -smooth -calculateTexture -exportModel "Model 3" %MyPath%\Object.obj %MyPath%\objParams.xml -save %Mypath%\NewProject.rcproj -quit

NOTE: You can obtain the parameters file from the Export Model dialog.

The project now contains three models: the first one is a normal model, the second one is simplified, and the third one is simplified, smoothed and textured at the same time. By default, the last created model is selected for the next processing.
You can now select a model by its name using the command -selectModel and then export this model using the command -exportSelectedModel. This piece of code will calculate a model in a normal detail, simplify it to 100k triangles, smooth, texture but export the second model:

RealityCapture.exe .... -calculateNormalModel -simplify 100000 -smooth -calculateTexture -selectModel “Model 2” -exportSelectedModel %MyPath%\Object.obj %MyPath%\objParams.xml -save %Mypath%\NewProject.rcproj -quit

Import models to a component

Now suppose you have a folder called Models and you want to import all of them to an aligned project (saving it as a new project).

RealityCapture.exe -load %MyPath%\AlignedProject.rcproj -save %MyPath%\NewProject.rcproj -quit
for %%s in (%MyPath%\Models\*.obj) do (
RealityCapture.exe -load %MyPath%\NewProject.rcproj -selectMaximalComponent -importModel "%%s" -save %MyPath%\NewProject.rcproj -quit
)

The For cycle will iterate through all files with the .obj extension and add them to the project.

Calculate an orthographic projection

When you create and export an orthographic projection by the command, you have to attach the files which contain all necessary parameters.

RealityCapture.exe .... -calculateNormalModel -calculateOrthoProjection %MyPath%\params.rcortho -exportOrthoProjection %MyPath%\ortho.tiff exportOrthoParams.xml -save %MyPath%\MyProject.rcproj -quit

You can obtain the params.rcortho file when you export an orthographic projection from the GUI and set Export projection parameters file to True. To learn more about export and import parameter files, visit this page.

Project and Image Commands

Manage the current project, the application itself and add images via CLI

Commands Outside Command Prompt

Using CLI with an .rccmd file

Delegation of Commands

On delegating commands into an opened instance of RealityCapture

Alignment Commands

Commands for alignment and component handling

Reconstruction Commands

Model calculation via the command line

Continue

Application settings and behaviour

Error Handling Commands

Commands for handling potential errors

See also: