We are tying to script a specific action list with this software but are running into some issues.
The goal of the action list is to merge 2 scans of a object (a brick - top up / bottom up) into a single mesh and extract a textures from the result based on 6 bakeplanes. We are not even sure we can extract a texture in such a manner with this software?
This is the action list we are trying to automate. We use the List of CLI commands as reference but some of the commands fail without an obvious cause.
- open project
- import first batch
- detect markers
- align images
- import boundingbox A (predefined bounding box floating above the turntable to cut it off entirely)
- generate draft mesh
- export masks to folder [FAILED IN CLI]
- export registration
- open project
- import second batch
- detect markers
- align images
- import boundingbox A (predefined bounding box floating above the turntable to cut it off entirely)
- generate draft mesh
- export masks to folder [FAILED IN CLI]
- export registration
- open project
- import both components [FAILS ON SECOND IMPORT, POSSIBLY BECAUSE IDENTICAL MARKERS? WORKS IN GUI]
- align components
- create construction box from control points
- set ground plane by reconstruction box [NOT POSSIBLE IN CLI?]
- build normal detail mesh
- build texture
- export high poly
- decimate to low poly
- build texture for low poly
- export low poly mesh
- import bakeplane (x6)
- transfer basecolour to bakeplane from high poly source [CAN THIS BE DONE? EXPORT NEEDS AN ALPHA CHANNEL]
- transfer normal info to bakeplane from high poly source [CAN THIS BE DONE IN TANGENT SPACE?]
- export bakeplane textures (6x)
We managed to script it until step 20 (excluding the failed steps), source below:
### Processing the bot folder
-addFolder E:\_Nanopixel\VDS\GHMN080A0BT\6\bot\jpg\ ^
-detectMarkers E:\_Nanopixel\VDS\GHMN080A0BT\6\_DATA\DetectMarkers.xml ^
-align ^
-selectMaximalComponent ^
-importGroundControlPoints E:\_Nanopixel\VDS\GHMN080A0BT\6\_DATA\GroundControl.csv E:\_Nanopixel\VDS\GHMN080A0BT\6\_DATA\ImportGroundControl.xml ^
-update ^
-setReconstructionRegion E:\_Nanopixel\VDS\GHMN080A0BT\6\_DATA\ReconstructionRegion_A.rcbox ^
-calculatePreviewModel ^
-selectAllImages ^
# -exportDepthAndMask ^
-exportRegistration E:\_Nanopixel\VDS\GHMN080A0BT\6\bot\jpg\Bot_Registration.rcalign ^
-save E:\_Nanopixel\VDS\GHMN080A0BT\6\bot\jpg\Bot_Scan.rcproj ^
-newScene ^
### Processing the top folder
-addFolder E:\_Nanopixel\VDS\GHMN080A0BT\6\top\jpg\ ^
-detectMarkers E:\_Nanopixel\VDS\GHMN080A0BT\6\_DATA\DetectMarkers.xml ^
-align ^
-selectMaximalComponent ^
-importGroundControlPoints E:\_Nanopixel\VDS\GHMN080A0BT\6\_DATA\GroundControl.csv E:\_Nanopixel\VDS\GHMN080A0BT\6\_DATA\ImportGroundControl.xml ^
-update ^
-setReconstructionRegion E:\_Nanopixel\VDS\GHMN080A0BT\6\_DATA\ReconstructionRegion_A.rcbox ^
-calculatePreviewModel ^
-selectAllImages ^
# -exportDepthAndMask ^
-exportRegistration E:\_Nanopixel\VDS\GHMN080A0BT\6\top\jpg\Top_Registration.rcalign ^
-save E:\_Nanopixel\VDS\GHMN080A0BT\6\top\jpg\Top_Scan.rcproj ^
-newScene ^
REM combine scans
-importComponent E:\_Nanopixel\VDS\GHMN080A0BT\6\bot\jpg\Bot_Registration.rcalign ^
-importComponent E:\_Nanopixel\VDS\GHMN080A0BT\6\top\jpg\Top_Registration.rcalign ^
# -exportModel "Model 1" E:\_Nanopixel\VDS\GHMN080A0BT\6\bot\jpg\mesh.obj E:\_Nanopixel\VDS\GHMN080A0BT\6\_DATA\ModelExport.xml
Can anyone help us with creating a script to automate this actionlist? And tell why it fails on some steps?
Kinds regards