Using Texporter

Step 1: Preparing the Mesh

Although Texporter works with all object types that has mapping coordinates, there are few points that you should be aware of in order to get a clean image.

1-The Object

Texporter works with any geometric object which has mapping coordinates. You can convert procedural objects to meshes if you have trouble with Texporter. Conversion is done by applying a Edit Mesh modifier onto the object and collapsing the stack.

2-Apply Mapping Coordinates

The object should have mapping coordinates applied on it. This may be done by UVW modifier or checking the “Generate mapping coords.” option if the object is a procedural object. If you use “Generate mapping coords” option, generally you will get a regular grid as a result. So I recommend you to use a UVW modifier instead. You can use any mapping channels, all mapping channels are supported by Texporter.

You should choose the best mapping method for your mesh when applying the UVW mapping. If you are using a human head I recommend you to use cylindrical mapping with top-bottom axis. If you are working on a face (mask only) you can use planer mapping. Mapping should provide enough area for the important faces and should prevent overlapping. Overlapping occurs when more than one face is projected on the same area of the map. You can avoid this by choosing the mapping type most similar to the mesh. But if your mesh has concave geometry, you can barely solve the problem. In this case you may consider dividing the mesh into convex pieces. In Texporter 3.2 there is an option which marks overlapping areas.

Now you have prepared your mesh and applied mapping coordinates. You are ready to go to Step 2.

Step 2: Running Texporter

After preparing the mesh as described in Step 1 Preparing mesh run the Texporter. There are few parameters you may want to change. When you are done with the parameters you can simply click the “Pick Object” button and pick the object you have prepared. If you are satisfied with the result then save the template bitmap for painting.

Here are the steps explained in detail:

1- Run Texporter

Texporter is located under “Utilities” section. Go to utilities tab and choose Texporter under “Texture Mapping” section from the combo box.

2- Adjust Parameters

There are few settings on the utility. You should do the settings before picking the object. Parameters are described in detail in the Parameters section.

3- Pick the Object

After setting the parameters click the “Pick Object” button. The button changes color to light green, showing that you are about to pick the object. In any viewport simply click on the object you prepared. The unfolded bitmap will be shown in the bitmap viewer.

4- Export the Texture

If you are satisfied with the bitmap you can save this image for painting by clicking the save icon. Bitmap is prepared with alpha channel, so if you want alpha channel select a format with alpha option (such as 32 bit TGA).

You are ready for the painting phase.

Step 3: Painting the Texture

Now you have a template bitmap representing the unfolded image on your disk. You will use this bitmap to paint your texture in your external paint program. Then save this new texture under a new name to use it in your material.

1- Load the Template bitmap to Your Favorite Paint Program

Run your favorite painting program and load the bitmap you just saved. You can paint over this image or use it as a template. If your paint program supports layering you can paint your final texture as a transparent layer on the template one.

2- Save It

After painting the texture save it to the disk. You will open it from MAX’s material editor.

Return to MAX and go on Step 4

Step 4: Applying the Texture

You have the texture. What you have to do is prepare a material holding this texture and apply it to the object. Key point is this: You shouldn’t change the mapping coordinates after step 2.

1- Prepare the Material

Now load the texture you painted as any map. There are few things to check: In coordinates section of the map settings, be sure that Texture and UV radio buttons are checked, both Offset fields are set to 0.0, both Tiling fields are set to 1.0 and Angle is set to 0.0. Also be sure that the mapping channel of the texture matches the Texporter’s settings.

2- Apply the Material

Apply the material to your mesh if it is not applied already.

You should now have a beautifully painted object.

Parameters

There are several settings under three sections. These settings must be done before picking the object.

1-Image Size:

These two fields hold the result bitmap’s size in pixels. The max size for both fields is 4096. If the image size is large, image viewer may not be able to show it in 1:1 scale. In this case you will see a bad image on the viewer but the saved image will be OK.

2- UVW Channel:

This determines the mapping channel that is to be used in unfolding process. If the chosen mapping channel of the picked object does not contain any mapping info a warning dialog box will appear.

3- Pick Object

When you push this button Texporter wants you to pick an object to unwrap. When unwrapping the current settings will be used. If you change any of the settings, the image will not update itself: you should pick the object again.

4-Display:

The settings under this section is very similar to MAX’s own display settings. So explanations are kept brief :

Polygon Fill:

If checked, the faces will be shown as filled areas using the colors indicated in the "Colorize by" section.

Edges:

If you check this option the face edges will be shown in the resulting image. You can choose to show all edges or only the visible ones.

Backface Cull:

If checked, the result image will not show the faces whose normals are pointing away from the mapping icon. This results a more clear image but prevents you from checking the overlapped surfaces.

Only Selected:

If checked only the selected faces of the object will be unfolded and shown. This gives less complex and more clear output which can be used if you want to paint only some part of the object.

Only ID:

If checked only the faces with the given material ID will be unfolded and shown. Again this gives less complex and more clear output. If you are working on a object with a multi-sub material assigned, this helps you to paint individual textures for each sub material.

Mark  Overlaps:

When applying UVW texture coordinates, you can not always get a perfect mapping; there may be areas which share the same UV coordinate. At these areas the same texture fragment will be used, in other if you paint a texture for an are, the same texture will be shown somewhere else (where the same UV is used). To avoid this you should choose the most proper mapping type.

When you  turn on this option, these overlapping areas will be marked in the given color showing you where overlapping occurs. 

5-Colorize by:

This section determines the colors of the resulting image.

Option

Result

None

Black and White.

XYZ

The color information will hold the edges’ XYZ position in their local coordinate system. Red channel holds the X information with Min X represented as black (Min intensity) and max X with pure Red (max intensity). Similarly Green holds Y and Blue holds Z values.

Face Normals

RGB channels will represent normal vector’s direction of the vertex. RGB channels will match to XYZ components of the normal vector respectively. You can easily locate face’s orientation by looking its color (especially if the object is convex).

W (Mapping depth)

This will generate black for Min W values and white for max W values. W can be considered as vertex’s distance from mapping gizmo.

Selection

This section will produce Red lines for selected faces and white for the others. This option can be used to distinguish a certain part of the object. To select faces first apply “Edit Mesh” modifier to your object and with “face sub-object” selected do your selection.

Material ID

Faces with different material ID will be shown in different colors.

Face Area

The faces with large surface areas will be shown in red while the faces with small areas will be shown in yellow. This may help you to determine the needed detail in particular area.

Vertex Color

If you chose this option, the object should have assigned vertex colors (otherwise you get an error message). If the object has vertex colors, the faces and/or edges will be drawn in those colors. 

You may use MAX's standard "Assign Vertex Colors" utility to get shaded, very realistic vertex colors, and you can unfold this with Texporter, which gives the impression of unfolded clay model :o)

 

< Back