We are using Modo 601 SP5 from Luxology with Python 2.7.3.  To download the Python x64 installer go to python.org and download Python 2.7.3 Windows X86-64 Installer.

Import Script

Download LightcraftImportSFM.py from the Dashboard under Virtual Set Creation.

Save this file to a local directory, as a suggestion to avoid loss of script use C:/Users/Username/Documents/Luxology/Content as your location.

Set Resolution

Open the LightcraftImportSFM.py file with a text editor and look at line 113:

hRes = 3648

The Great Wall images are 3648 x 2736. If a different horizontal resolution is used for source images, this must be changed to match.

Modo Script Execution

In Modo, hit Shift-F5, navigate to the directory where you saved the script, and select the LightcraftImportSFM.py script. It will prompt you for the cameras_v2.txt file; navigate to C:\Photogrammetry\GreatWall\GreatWall.nvm.cmp\00\ and select this file.

If everything is correct, a new camera called match_cam will be created, with keyframes 0-numCams that correspond with the positions of all the cameras. This lets you scroll through all the camera positions by moving the timeline slider.

Change Sensor Height

Modo defaults to a 36mm x 24mm camera back, which corresponds to a 1.5 aspect ratio sensor. The 3648 x 2736 resolution test images have a 1.333 aspect ratio. To adjust this select the match\_cam  > Camera View > Film Back > Height and set this to 27mm.

Import OBJ Mesh

File > Import and select meshAvImgTex.obj in 
C:\Photogrammetry\GreatWall\GreatWall.nvm.cmp\00\data\\\_OUT\. Check Import as Static Mesh, and ignore the prompts to select alternative textures. We are going to retopologize and create our own textures for the model. It will take some time to import.


Load Image Seqeuence

In the Images tab, select (load sequence), and pick image 00001.jpg in C:\Photogrammetry\GreatWall\GreatWall.nvm.cmp\00\data.

Under the Items tab, add a Backdrop Item. In the Backdrop tab set the image to the sequence you loaded, and the Projection Type to Camera. Set the transparency to 50%.

To match up the Backdrop Item with the Mesh, change the Frame size to the dimensions of the originals images (3648 x 2736) Shader Tree > Render > Frame.

Set the current camera view to match_cam. The mesh should overlay the camera image closely. You can click the eye visibility icon in the item list next to the backdrop item to verify the lineup. If you don’t see the overlay, type ‘o’ to bring up viewport settings, enable Overlay under Background Imagery. You may need to re-adjust the transparency in the backdrop item to get it to respond.

To access the timeline outside of the Animate tab, create a new palette for the timeline. Layout > Palettes > New Palette. Click on the small arrow in the top right corner of the palette and go to Utility > Time, now resize the window vertically so that just the timeline bar is visible. Map “Next” and “Previous” frame, for scanning back and forth through the timeline in Sytem > Input Editor. For Ctrl-Left map time.step frame prev and for Ctrl-Right map time.step frame nextScroll the timeline forward and backward. You will see the camera view change, and the associated camera image update.

Example Mesh/Photo Lineup

Download Video

Correcting Orientation

If your model was upside-down, sideways, or crooked you can correct this by rotating all of the elements. To correct your orientation, select the mesh, match_cam, and Backrop Item and hit CTRL+G, to group them together. You can then select your rotation tool, E on the keyboard, and rotate the model until it is level and upright(use the Model Quad tab to help level the model).