Many features of RealityCapture can be used directly via the command line or by running a script. They are passed to the application as parameters of RealityCapture.exe and executed in a sequence. Below you can find some sample scripts that might help you to set up scripts for your own workflows. For the full manual regarding the command-line interface, please check the in-app help, section Command-line Interface. You can find many sample datasets on which you can test these scripts here.
Calculate a 3D textured model
Download [26 MB]
This script consists of the following processing steps:
- load images
- align
- set reconstruction region automatically
- calculate normal detail model
- select marginal triangles
- remove marginal triangles
- rename the selected model
- calculate texture (and unwrap)
- save project
- export model
- quit
Texture reprojection from high poly to the low poly model including the creation of normal and displacement maps
Download [27 MB]
This script consists of the following processing steps:
- load images
- align
- select a component with the most amount of cameras in it
- automatically create a reconstruction region
- reconstruction in normal detail
- rename created model
- texture created model (this will also create unwrap)
- simplify created a model to a specified number of triangles
- rename the simplified model
- create unwrap for the simplified model
- reproject texture onto a simplified model (including creating normal and displacement maps)
- select a simplified model
- export simplified model
- save project
Delegation of commands into an open instance of RealityCapture
For more information on how to control the opened instances of RealityCapture via the command line please check in-app help and search for "Delegation of commands".
Download [26 MB]
These scripts consist of the following processing steps:
- check the running instance of RealityCapture
- load images into an open instance in batches
- align individually-export components and XMP files
- import components
- calculate normal detail model, simplify, calculate texture
- export model
Play custom sound after RealityCapture finishes a process
Create a custom sound that plays when RealityCapture finishes a process.
Download [44 KB]
Creating orthographic projection from a georeferenced scene
For more information on how to control the opened instances of RealityCapture via the command line please check in-app help and search for "Delegation of commands".
Download [637 MB] – CLI scripts including images
These scripts consist of the following processing steps:
- load images
- align
- import measurements of ground control points in the images
- import coordinates of ground control points
- align images
- set automatic reconstruction region
- calculate the model in normal detail
- calculate texture
- calculate ortho projections while loading parameters from a file
- save the project
- export orthographic projection
- quit the application
Detect markers and place reconstruction region on control points
Download [4 KB]
The scripts consist of the following steps:
- open a new scene
- add a folder with images
- detect markers with imported parameters
- define distances
- align
- select a component with the most cameras
- set reconstruction region on detected markers with a custom height
- set ground plane to the reconstruction region
- move the reconstruction region up
- scale the reconstruction region to the absolute value from the center of the reconstruction region
- save the project
- quit the application
Examples of how to select images using regular expressions
Download [3 KB]
This sample will show you how to select images that meet the specific criteria defined by the regular expression. You can use this for example when selecting images from a specific folder, images that end with the number 5, etc.
In the files, you can find also an example of how to set up .rccmd file for image selection that can be used in GUI without the need to run a .bat file.
Iterative simplification in an open project
These scripts can be used to run a simplification in an already open project several times. The simplification command is delegated to an open instance of RealityCapture and executed several times. The number of iterations is defined within the script.
Download [3 KB]
The scripts consist of the following steps:
- Finding an open instance of RealityCapture (a project with a selected model is expected)
- simplify the model by 50%
- simplify previously created model by 50%
- simplify previously created model by 50%
Reconstruction of the object captured from two sides using masks
In this sample, you can find batch files used to mask 2 folders of images, then import all of the images with their masks and create a complete textured model.
Download [248 MB] - CLI scripts including images
The scripts consist of the following steps:
- adding the first set of images
- detecting the markers and georeferencing the scene using ground control points
- calculating preview mesh
- filtering unwanted parts
- generating masks
- the same process repeated for the second set of images
- importing images for both sides of the object with all the generated masks
- aligning all images
- calculating the mesh and creating the texture
- exporting the model
Divide the reconstruction region into columns and rows
These scripts divide the reconstruction region into smaller regions, which are defined by the chosen amount of rows and columns. This means that the reconstruction region is divided into a matrix grid, and each separated region is exported as an individual file.
Download [4 KB]
The scripts consist of the following steps:
- manually setting the number of rows and columns in the Command Prompt
- choosing and defining overlap between divided regions in the Command Prompt
- start processing in RealityCapture by scaling the existing reconstruction region based on the chosen amount of columns and rows
- export the reconstruction region
- move the reconstruction region to the next column or move to the next row if all columns in the row were processed
- repeat moving and exporting of reconstruction regions till the last column and row are finished
Repetitively check for new images in the image folder and align them with already imported images
After running this script, the folder chosen as a folder with images will constantly be checked to detect if the minimum required number of images was added to it. Once the minimum required amount is detected, images will be added to the RealityCapture instance and aligned with all previously added images.
Download [3 KB]
The scripts consist of the following steps:
- manually set the name of the image folder in the Command Prompt
- starting the process of checking newly added images in the image folder
- if the amount hasn't changed, the process repeats
- if the minimum required amount was not met, the process repeats
- if the minimum required amount was met, images are added to RealityCapture and all images are aligned
- process is repeated
Automatically install RealityCapture and change the installation folder
Install RealityCapture without user interface interaction into a preferred folder.
Download [2 KB]
The scripts consist of the following steps:
- set the path to the installation file
- set the path to the folder into which RealityCapture will be installed
- set the path to the folder in which the log file will be stored
Loop through subfolders to create components and merge them
Loop through subfolders with images to create a component for each subfolder separately, and later merge them together. Components are created from images of a chosen format.
Download [2 KB]
The scripts consist of the following steps:
- manually set the extension of the image format
- loop through subfolders and create components
- import all components into a new scene
- align imported components
Preserve coordinates with the XMP files
Create XMP files based on the initial image set, and then re-use those XMP files to align images from the other image set to preserve the cameras' positions. Sample images are attached for download.
Download [437 MB]
The scripts consist of the following steps:
- align the initial image set and export XMP files
- gradually process other image sets with the created XMP files
Error-handling script
A set of batch files that can recognize errors and crashes and act accordingly.
Download [8 KB]
The scripts consist of the following steps:
- open a RealityCapture instance and set the initial error commands
- run RealityCapture based on the commands in one of the batch files
- repeat the process from the action that resulted in an error
- repeat the whole process if RealityCapture crashes
- stop if the error or the crash process happens more than three times
Limit images used for texturing
Use this script to limit the images used for texturing and save some processing time.
Download [4 KB]
The scripts consist of the following steps:
- delegate to an open RealityCapture
- disable all images for texturing and export an image list
- let users choose the step value used to enable images for texturing
- enable images for texturing based on the chosen step value