CLI: parsing parameters error when exporting mesh

I am by FAR not a programmer, but I’m trying to get a few thousand mash from cameras that were recording video. So I’m trying to use the CLI version with a simple workflow 

“C:\Program Files\Capturing Reality\RealityCapture\RealityCapture.exe” -addFolder D:\Desktop\Oneris\Shenzhenobj\f1  -importFlightLog D:\Desktop\Oneris\Shenzhenobj\0Data\CameraPoses_CSNXYZ.csv  -align  -setReconstructionRegion D:\Desktop\Oneris\Shenzhenobj\0Data\reconstructionRegion.rcbox -mvs  -smooth -unwrap -calculateTexture -exportModel “Model 1” D:\Desktop\Oneris\Shenzhenobj\0Mesh\mSf0001\f0001.fbx D:\Desktop\Oneris\Shenzhenobj\0Data\params.xml  -quit

it works up to the params.xml what I have into the xml is the following

</Model>
<ModelExport exportBinary=“1” exportInfoFile=“1” exportVertices=“1” exportVertexColors=“0”
exportVertexNormals=“0” exportTriangles=“1” exportTexturing=“1” meshColor=“4294967295”
tileType=“0” exportTextureAlpha=“0” exportToOneTexture=“0” oneTextureMaxSide=“8192”
oneTextureUsePow2TexSide=“1” exportCoordinateSystemType=“0” settingsAnchor=“0 0 0”
settingsScalex=“1” settingsScaley=“1” settingsScalez=“1” texturesFileType=“png”
formatAndVersionUID=“fbx 000 FBX201400” exportModelByParts=“0” exportRandomPartColor=“0”
exportCameras=“0” exportCamerasAsModelPart=“0” numberAsciiFormatting=“%.16e”>
<Header magic=“5786949” version=“1”/>
</ModelExport>

did I miss anything?

 

Hello,

please try to delete the slash in the last line of the script, after the …params.xml

Hello and thanks for the speedy reply, I still get:

CLI: parsing parameters

Unexpected program state Reading the model export setting file ‘D:\Desktop\Oneris\Shenzhenobj\0Data\params.xml’ feiled.

I noticed now that in the parameters file in the first line you have the redundant end tag </Model>. Please try to delete it as well.

Thank you SO much! it is working now, It doesn’t export the texture, but right now I’m re-doing the xml from another export, maybe that fix it, thanks again!!!

One final question @Zuzana, as I mentioned I have a few thousand datasets to export based on the footage we shot… I thought it would be a matter of write a code with a few thousands of lines asking to render one by one, but what happened to me was that the windos CLI will try to run them one after the other without waiting the first to be over, therefore I got almost 4000 errors saying “the application is already running” anyway I can comand CLI to wait until the previous line is finished?

This is an example of how 2 lines look like

@C:|Program Files|Capturing Reality|RealityCapture|RealityCapture.exe@ -addFolder D:|Desktop|Oneris|Shenzhenobj|f1 -importFlightLog D:|Desktop|Oneris|Shenzhenobj|0Data|CameraPoses_CSNXYZ.csv -align -setReconstructionRegion D:|Desktop|Oneris|Shenzhenobj|0Data|reconstructionRegion.rcbox -mvs -smooth -unwrap -calculateTexture -exportModel @Model 2@ D:|Desktop|Oneris|Shenzhenobj|0Mesh|mSf0001|f0001.fbx D:|Desktop|Oneris|Shenzhenobj|0Data|params.xml -quit

@C:|Program Files|Capturing Reality|RealityCapture|RealityCapture.exe@ -addFolder D:|Desktop|Oneris|Shenzhenobj|f2 -importFlightLog D:|Desktop|Oneris|Shenzhenobj|0Data|CameraPoses_CSNXYZ.csv -align -setReconstructionRegion D:|Desktop|Oneris|Shenzhenobj|0Data|reconstructionRegion.rcbox -mvs -smooth -unwrap -calculateTexture -exportModel @Model 2@ D:|Desktop|Oneris|Shenzhenobj|0Mesh|mSf0002|f0002.fbx D:|Desktop|Oneris|Shenzhenobj|0Data|params.xml -quit

The only way I have found so far is to do everything in a single line replacing the -quit for a -newScene… but I’m curious to know if I’m not gonna end up having the largest cache ever known to human kind, does the app flush the cache when it creates a new scene? I have the setting to clear cache when closing… but im not sure if that includes new scene

Hello Oneris Rico,

you can download some sample scripts used when processing several datasets here:
https://www.dropbox.com/s/i6n2wv3rbua5d8e/Scripts.zip?dl=0

Those are the scripts used for the tutorial on how to preserve the coordinate system of several models using XMPs (can be found and downloaded in the Help - Re-use Alignment).

Process.bat file calls ProcessDataSet.bat for different datasets and executes them one after another. You can modify them to your case.

Either -quit command or -newScene command does not clear the cache on exit by default. If you set to clear cache on exit, then cache files are deleted only after the application exits. You can also use windows “del” command and delete the files from the specified cache folder. 

 

A year later, I read this and while I’m no expert, I want to document an updated solution for PPI users:

Problem : The help docs show that some CLI commands require “params.xml” - but it’s nowhere to find.

Solution - you need a *.rcinfo file instead :

  1.  Export model mesh from RC with the same settings you want to repeat later in command-line. (“Yes” to the info file export on the dialog.)

  2. Refer to newly exported *.rcInfo file instead of params.xml.

Maybe you should trim it out in notepad to include only the <ModelExport>…</ModelExport> tag.
(<not sure what effect it would have leaving all other tags)

Hello Arye,

your workflow is also correct but in the latest version you can get the params.xml file directly from the Export model dialog from the app (or other dialog depending on the command you are using). You just need to set the preferred settings and then use the little icon in the bottom-left corner of the dialog to save the parametric file.