Community Tutorial: RealityCapture Automated CLI pipeline for Large Datasets

This BETA bundle of scripts aims to create an automatic pipeline that can generate high poly and low poly model parts from the large master textured model and then seamlessly import them to Unreal Engine 5 with the UE5 Photogrammetry Importer Editor Utility Widget.

We presented this workflow during Unreal Fest 2022 in New Orleans. Below, you can find the link to the presentation. This way, I want to thank Ryan Whitehead from Metatexel so much for creating this workflow with me and enormous thanks for his stress testing of RealityCapture on massive projects.

NOTE: RealityCapture Automated CLI pipeline for Large Datasets is currently in BETA.

https://dev.epicgames.com/community/learning/tutorials/9nO5/unreal-engine-capturing-reality-realitycapture-automated-cli-pipeline-for-large-datasets

2 Likes

Tomas, please could you post a batch for meshing, UV unwrap, Texturing and Exporting model per reconstruction region as FBX.

Alexandiir, are you looking for something like this: RealityCapture tutorial: Divider Script - YouTube?

1 Like

It looks so, thank you!

I have made all script workflowm and after import to UE 5.1.1 I have artifacts on my model. I think it is some normal issue. Maybe flipped normals. Please check screenshots

This is lowres model from RC, expored with Automated CLI script
Marmoset, one material with turned onn reflections to see Lit mode, to show it works good here.

Same model in UE 5.1.1, imported with PG_Importer.
r.RayTracing.NormalBias 20
and
r.RayTracing.NormalBias 100
changes nothing




Is it the same when you import it manually?
Also, RealityCapture to Unreal Engine 5 | Tutorial

Manually loaded same *lowres models. Looks fine


Have you followed whole this tutorial? UE5 Photogrammetry Importer | Community tutorial
Not sure what could be wrong here, but as manual import works, some of the settings probably will be different.

Will check this video once again. Thank you

I edited script to add Reconstruction and Texturing process for every Reconstruction region generated by divideReconstructionRegion_table.bat

All works fine, except seam between parts of model in UE. Here is part of reconstructing:

::Execute processes per region.
%RealityCapture% -delegateTo RC1 -set "appAutoSaveCliHandling=delete" -calculateNormalModel -selectMarginalTriangles -removeSelectedTriangles -calculateTexture -cutByBox "outer" "false" -renameSelectedModel "box%boxNum%_highPoly_raw" -smooth "%SmoothingParams%" -renameSelectedModel "box%boxNum%_highPoly" -unwrap "%TexturingFixedTexSize100%" -reprojectTexture "box%boxNum%_highPoly_raw" "box%boxNum%_highPoly" "%ReprojectionParams%" -simplify "%Simplify50per%" -renameSelectedModel "box%boxNum%_simplified" -smooth "%SmoothingParams%" -renameSelectedModel "box%boxNum%_lowPoly" -unwrap "%Texturing1x8k%" -reprojectTexture "box%boxNum%_highPoly" "box%boxNum%_lowPoly" "%ReprojectionParams%" -exportModel "box%boxNum%_lowPoly" "%RootFolder%\Models\Model_box%boxNum%_lowPoly.fbx" "%ModelExportParamsFBXU1V1Material%" -selectModel "box%boxNum%_highPoly" -exportModel "box%boxNum%_highPoly" "%RootFolder%\Models\Model_box%boxNum%_highPoly.fbx" "%ModelExportParamsFBXU1V1Material%" -selectModel "box%boxNum%_highPoly_raw" -deleteSelectedModel -selectModel "box%boxNum%_simplified" -deleteSelectedModel -save

So I added just this part to main script

-calculateNormalModel -selectMarginalTriangles -removeSelectedTriangles -calculateTexture

Here is seams:




There could be seams, as your parts are computed separately and therefore the models could slightly differ.

I’ve been working on the MergeReimportedComponents.bat script and it would be great to see some of those older scripts updated around this bundle. Particularly, integrating the new SetVariables and StartRealityCapture scripts would make those older scripts much more robust. Currently, in the MergeReimportedComponents script, there is no error log and the script doesn’t handle file paths with spaces or non-existent folders… There are lots of ways it can break. The new scripts from this pipeline are a great start but tools for bulk alignment are also needed.

1 Like

I just went through the tutorial and noticed two things:

  1. The script fails if your pathnames have spaces in them – all of the pathname variables in the script need to be in quotes.
  2. There’s a warning that re-saving the project will switch it from licensed to PPI mode and then I was prompted to pay for PPI licenses when I ran the final script. If I re-create the expected folder paths would be able to export the models without PPI?

Hi, do you have just PPI version?