This script was created by Epic Games Slovakia, who doesn't carry any liability in case issues related to the sample occur. 

In this folder you can find a batch file used to mask 2 folders of images, then import all of the images with their masks and create a complete textured model

All you need to do is:

1. Change the path to the source folders in the DivideReconRegion.bat as follows:

	app - path to the installation folder where RealityCapture.exe is stored,
	workingDir - path to all source folders (where this README.txt file is located). No need to change the original path if you preserve the file structure.

2. Place the images of 1 side of the object into a folder called side1, and the images of the other side of the object into a folder named side2. (the images need to be of an object placed on a board with markers 1x12:017, 1x12:024, 1x12:019, 1x12:022 on it placed in a perfect square with all sides measuring 17.8cm. You can find a sample of such board in the folder Markers).

3. Place these 2 folders into the same folder as flipscript2.bat

4. Run flipscript2.bat

DESCRIPTION OF BATCH FILEs
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
flipscript2.bat

This batch file first loads the images from the folder "side1" then detects the markers and georeferences the scene using predefined GCPs (markerPositions.csv), then it imports a reconstruction region for creating a preview mesh (object.rcbox), then creates the preview mesh and imports another reconstruction region to filter out everything meshed below the object (forCut.rcbox) then it exports masks using the filtered preview model, which are stored next to the images in the folder "side1". Then the script repeats this exact process for the images in the folder "side2". Finally the script imports the now masked images from both folders "side1" and "side2" and aligns, meshes and textures them, also exporting the model.

Processing in RealityCapture:

-addFolder 
-setProjectCoordinateSystem 
-detectMarkers 
-importGroundControlPoints 
-align 
-setReconstructionRegion 
-calculatePreviewModel 
-selectLargeTrianglesRel 
-removeSelectedTriangles 
-selectTrianglesInsideReconReg  
-selectLargestModelComponent 
-invertTrianglesSelection 
-importLicense 
-exportDepthAndMask 
-mergeComponents ^
-setReconstructionRegionAuto ^
-calculateNormalModel ^
-calculateTexture ^
-simplify 
-save 
-exportSelectedModel

Other files required for the script to run:

detectSettings.xml - settings for detecting markers
exportSettings.xml - settings for exporting the model
forCut.rcbox - georeferenced reconstruction region for selecting triangles to filter
gcpSettings.xml - settings for importing the GCPs
markerPositions.csv - the GCPs
maskSettings.xml - settings for exporting the masks
object.rcbox - georeferenced reconstruction region for making preview meshes for masks
plane.rclicense - PPI license file for the sample dataset
simplifySettings.xml - settings for simplification

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
flipscriptReconOnCPs.bat

This batch file functions the same as flipscript2.bat, except that the reconstruction regions for creating the models for masking, and for filtering those models, are generated automatically from the Ground Control Points made from the markers, meaning that the script will work for any size of board, and it does not need to be set up in the GUI