4.6. Tutorial: Editing the textures

Problem

Sometimes you may wish to touch-up the textures on an automatically generated 3D model. This can involve cleaning up artefacts or removing supporting structures used to hold the object when taking the photographs. In this simple example, we will show how a company logo can be easily superimposed onto part of the model.

Solution

The texture editing tools allow you to paint directly onto the textured model using your preferred 2D image editor. An easy-to-use intuitive interface is provided utilising the clipboard.

Starting Point

Create a textured 3D model from a set of photographs or by importing a model.

Figure 4.6.1. Example textured model
Step 1

In order to affix our company logo we need to choose the desired orientation of the model that we will then start editing from. In this example rotate the model by selecting the ID_MODEL_ROTATE.jpgRotate (or Spin) model button from View Model toolbar and left drag the model until the top is visible.

TIP:

To ensure accurate editing, make sure the model is taking up most of 3D view by zooming in using the ID_MODEL_ZOOM.jpgZoom model button.

Figure 4.6.2. Rotated and zoomed model clearly showing the top of the object
Step 2

Hit the ID_MODEL_COPYVIEW.jpg Copy View button from View Model toolbar to copy the image of the textured model onto the clipboard.

Step 3

Paste the clipboard image as a new image into your preferred 2D image editor application. The image should not be resized.

Pasting an image into PhotoShop

In PhotoShop care is required to ensure the image dimensions are preserved when pasting from the clipboard. You must first copy the image onto the clipboard as described. Only then can you create a new image using the File > New menu item. The width and height fields will be automatically filled-in using the clipboard image dimensions. These should not be changed. Hit OK then select the Edit > Paste menu item.

Step 4

Load an image of the logo into your image editor. Select the logo region and copy and paste into the image of the textured model. You can translate, rotate and zoom the logo as you wish.

Figure 4.6.3. Selecting a region in the logo image
Figure 4.6.4. Initial position of pasted logo
Step 5

Once you are happy with your edits the modifications can be incorporated into the texture map in 3DSOM Pro. To do this the edited image needs to be copied onto the clipboard as a single layer and pasted into 3DSOM Pro.

First make sure the edited image is a single layered image. In PhotoShop select the Layer > Flatten Image menu item. In PaintShop Pro use the Layers > Merge > Merge All menu item.

Now copy the image onto the clipboard and paste into 3DSOM Pro using the ID_MODEL_PASTEVIEW.jpgPaste View button. PhotoShop users should avoid using the clipboard and should use drag and drop instead (see below).

Pasting an edited image from PhotoShop

PhotoShop will not place large images onto the clipboard. Instead you can use "drag and drop". Select the "Move" tool from the toolbar. Then simply drag the edited image from PhotoShop into the View Model Window in 3DSOM Pro. There is no need to hit the paste button.

Note when using "drag and drop" you can drag over the 3DSOM Pro icon in the taskbar to bring up the 3DSOM Pro application and then drop the image onto the View Model Window.

Figure 4.6.5. Final edited image with logo
Step 6

Once the edited image is pasted (or dropped) into 3DSOM Pro the textures will be updated in a second or two. There is no requirement to rebuild the textures and in fact doing so would lose all your texture edits.

Figure 4.6.6. Pasted edit back into 3DSOM Pro
Using oblique views

The texture paste function has a protection mechanism that prevents you accidentally editing the surface textures from very oblique viewpoints (where the resolution would be poor due to foreshortening). If you are trying to edit the surface texture using a very oblique view (e.g. if the desired surface region is hidden when viewed front-on) then you will need to turn off this protection mechanism before pasting back your edits. From the right mouse menu in the 3D view select Texture Editing > Protect oblique triangles menu item to toggle the protection state.

You can rotate the model to see how your edits look from new viewpoints. If you are unhappy with the changes simply use the ID_EDIT_UNDO.jpgUndo model or mask change button from the Main Window toolbar.

Figure 4.6.7. Edited model from new viewpoint

In this example we chose to edit the top of the model. However the same process can be used to edit the textures from an arbitrary viewpoint.