I am having difficulty exporting a textured mesh using Divider3D script. The command I want to used should export an obj + textures, however it returns an error saying file not found
:: Here place any commands you would like to do with every reconstruction region (remove pause if you don’t need to work in the GUI
::pause
%RealityCaptureExe% -delegateTo * -exportSelectedModel %RootFolder%Models\Model_%rowNum%%columnNum%%zNum%.obj %RootFolder%\params.xml
When using longer paths it can be helpful to place them inside quotes since spaces and special characters can disrupt them.
Do you have a model in your project with the name mentioned in the export path? The divider script does not automatically create a model, it just separates reconstruction regions, and then a model can be created within each one of those. Since the placement of your command is in the part of a batch file where the reconstruction command can be placed, I was just wondering if a model was created beforehand.
Check if the params.xml file was made for the OBJ format.
:: Call a batch file where variables for ReconstructionRegion .exe file and root folder are stored
call SetVariables.bat
:: Here we check how many rows and columns were used when divided, from the file table.txt
(
set /p totalRows=
set /p totalColumns=
set /p totalFloors=
)<table.txt
:: Below here place any commands you would like to do before cycling through the reconstruction regions (such as selecting a model to work with)
%RealityCaptureExe% -delegateTo *Model1
set /a rowNumber=1
set /a columnNumber=1
set /a floorNumber=1
:iteratingColumns
:: Here we load the reconstruction region
%RealityCaptureExe% -delegateTo * -setReconstructionRegion “%workingDir%reconRegions\box_%rowNumber%%columnNumber%%floorNumber%.rcbox”
:: Here place any commands you would like to do with every reconstruction region (remove pause if you don’t need to work in the GUI
::pause
%RealityCaptureExe% -delegateTo * -exportSelectedModel %RootFolder%\Models\Model_%rowNum%%columnNum%%zNum%.obj %RootFolder%\params.xml
:: Import the next reconstruction region in the row or go to the next column.
if %columnNumber% == %totalColumns% goto nextRow
set /a columnNumber+=1
goto iteratingColumns
pause
:nextRow
if %rowNumber% == %totalRows% goto nextFloor
set /a rowNumber+=1
set /a columnNumber=1
goto iteratingColumns
pause
:nextFloor
if %floorNumber% == %totalFloors% goto end
set /a floorNumber+=1
set /a rowNumber=1
set /a columnNumber=1
goto iteratingColumns
Hi,
there are some issues with your script. %RealityCaptureExe% -delegateTo *Model1 - this doesn’t make sense, as there is no in instance named *Model1.
You need to use some command to select a wanted model in opened instance like -selectModel. Also, if you want to cut the model you will need to use -cutByBox command on selected model with actual reconstruction region
or you can use these commands there: %RealityCaptureExe% -delegateTo * -exportSelectedModel %RootFolder%\Models\Model_%rowNum%*%columnNum%* %zNum%.obj %RootFolder%\params.xml
before -exportSelectedModel