Reality Capture

From Antoine Vienne | Wiki
Jump to navigation Jump to search

Reality Capture

Process multiple scans

// Create a first .bat with the list of the assets you want to process - One folder by asset, all in the same directory

set list=asset_001 asset_002 asset_003 asset_004 asset_005 asset_006 asset_007

(for %%a in (%list%) do ( 
   set assetName=%%a
   set Images=\\DISK\PATH\%%a
   call \\DISK\PATH\exec_RC.bat
))

// Create a second .bat to run Reality Capture - take a look on Reality Capture documentation

set RealityCaptureExe="C:\Program Files\Capturing Reality\RealityCapture\RealityCapture.exe"
set ScriptFolder=%~dp0
set SimplifySettings=%ScriptFolder%SimplifySettings25.xml
set ModelSettings=%ScriptFolder%ModelSettings.xml
set PtcSettings=%ScriptFolder%PtcSettings.xml
set RegSettings=%ScriptFolder%RegistrationSettings.xml
set projectRoot=%Images%\..\
set outputDir=%projectRoot%\OUT\%assetName%
mkdir %outputDir%
set undistoDir=%outputDir%\undistos
mkdir %undistoDir%
set Model=%outputDir%\%assetName%.obj
set Project=%outputDir%\%assetname%.rcproj
set PTC=%outputDir%\%assetname%.xyzrgb

%RealityCaptureExe% -addFolder %Images% ^
		-selectAllImages ^
		-setPriorLensGroup 2 ^
        -align ^
        -selectMaximalComponent ^
        -setReconstructionRegionAuto ^
        -calculateNormalModel ^
		-simplify %SimplifyTo% %SimplifySettings% ^
        -selectMarginalTriangles ^
        -removeSelectedTriangles ^
		-selectLargeTrianglesRel 12 ^
		-removeSelectedTriangles ^
        -renameSelectedModel %assetName% ^
        -calculateTexture ^
        -save %Project% ^
        -exportModel %assetName% %Model% %ModelSettings% ^
		-exportRegistration %mayaScene% %newRegSettings%^
		-exportSparsePointCloud %PTC% %PtcSettings% ^
		-clearCache ^
        -quit

Texture reprojection - Open project/Import new model/Texture/Export for a list

// Create a first .bat with the list of the assets you want to process

set list=asset_001 asset_002 asset_003 asset_004 asset_005 asset_006 asset_007

(for %%a in (%list%) do (
   set assetName=%%a
   set originalProject=\\DISK\PATH\%%a.rcproj
   set meshPath=\\DISK\PATH\%%a.obj
))

// Create a second .bat to run Reality Capture - take a look on Reality Capture documentation