5.8. Tutorial: Texturing a CAD model

Problem

Sometimes you may already have a wireframe CAD model of an object available (e.g. from the design process or using a laser scanner). However you may wish to use 3DSOM Pro's advanced suite of tools to build a more realistic textured model using real photographs of the object.

Solution

3DSOM Pro supports the import of CAD geometry in 3DS format. The geometry can be aligned with a large set of photographs of the object in one simple process using the alignment tool. The user can then automatically generate a single texture map (with automatic UV "unwrapping"). The textures can be optimised using the 3DSOM Pro texture editing tools and the model can be exported for plugin-free streaming over the web or output as a textured 3DS mesh.

Starting Point

Convert your CAD geometry into a 3DS (or STL) file. Export one or more closed triangular mesh models in 3DS format.

This mesh was created in 3D Studio Max using the "Lathe" tool with ends capped to create a closed quad mesh. Before exporting the quads are tessellated using the "Tessellate" modifier using the "Face-Center" option operating on each quad.

The resulting triangular closed mesh can be safely loaded into 3DSOM Pro

Figure 5.8.1. CAD model of a Russian Doll

Take a set of photographs of the object in the usual way (with calibration mat, backdrop and stand). You will probably want to take an additional shot of the underneath of the object.

Step 1

Launch 3DSOM Pro and hit ID_FILE_NEW.jpgNew project... button. Select your photographs of the object but not any additional underneath shots.

Step 2

Mask the photographs in the usual way. First click the ID_MAKE_MASKS.jpgMask all images... button then if necessary adjust the thresholds and manually edit the masks using the advanced tools (see Fine tuning the auto-masking and Manual masking with the shrink-wrap tool).

Step 3

Now import the 3DS file using the File > Import... menu item.

TIP:

3DSOM Pro can only import a single 3DS mesh. If your CAD geometry consists of more than one mesh then you must create a single mesh by attaching the meshes or joining them using a boolean operation.

Step 4

The photographs can now be aligned to the 3D mesh. Select all the images using the Images > Select All menu item. Then launch the alignment wizard using the Images > Align Images... menu item

Select the "Merge Group" option and click the Next > button.

Step 5

At this point 3DSOM Pro needs to work out the relationship between the imported CAD mesh units and the 3DSOM Pro internal units. You can hit the Guess button at this point to ensure the model is correctly scaled. This step is no longer required if the size of the mat has been entered using the "Mat Scale" setting in the 3DSOM Pro Settings Window and the 3DS or STL CAD file is in mm units.

TIP:

Don't forget to hit the Guess button or use the to "Mat Scale" setting so 3DSOM Pro can correctly scale the model to the photographs.

Figure 5.8.2. Alignment after hitting Guess button
Step 6

3DSOM Pro will make a rough initial estimate of the alignment. You can cycle through the possibilities by repeatedly clicking Guess button. You will probably need to manually adjust the initial estimate a little (see Merging multiple scans). Note you should avoid using the Guess button if you entered the the mat units as 3DSOM Pro may inaccurately rescale the model.

When you are happy click the Next > button.

Step 7

To automatically align all the images at once simply hit the Start button. You can view the alignment for each image and stop the process when you are happy.

Figure 5.8.3. Result of automatic alignment
Step 8

To accept the alignment hit the Next > button and then the Finish button.

Step 9

You can now decimate the mesh or for dense meshes fit a subdivision surface (see Compressing the geometry with subdivision surfaces). Once you are happy with the geometry, you can build the texture map (see Adding the surface texture) before exporting (see Exporting the finished model).

TIP:

You can also add additional images to texture the underneath of the object (see Adding texture underneath an object) before exporting the model.

Figure 5.8.4. Final subdivision surface and exported textured model