3DS Max Full Head Mapping
The real challenge is to get a head mapped all the way
around. Cylindrical mapping helps us
quite a bit, but there is still that problem with how to generate the
textures. On the source
code page there is a plug in
for 3D Studio Max®
that will help you generate a single unfolded texture. It may seem like it isn’t too difficult to
do, but after this explanation you would probably agree that this was one of
the most difficult pieces of code to write.
What we want
to accomplish is the ability to map to orthogonal view pictures into one
texture map.
Getting Started
For the plug-in to work we need to set up some mapping for
the head that was created. Create a
Multi/Sub-Object in the material editor of 3D Studio Max®. Set the number of sub-objects to four by
clicking on the set number. Next create
four sub-materials that have textures.
The first one should have its material ID set to 1. This one will be used for the cylindrical map
that will be applied in the final stage.
The plug-in used the Material IDS to figure out which side of the head
the 2D texture is being applied to. The
IDS are preset in the plug-in as follows:
- Final Cylindrical Map
- Right Side
- Left Side
- Top Side
- Bottom Side
- Front Side
- Back Side
Figure 11
Mapping the Photographs
We must now use the UVW Mapping modifiers to map the
pictures onto the head. For mapping the
first material ID (1), just use cylindrical mapping with a dummy texture for
now. This will be explained in a little
bit. Now map the 2 photographs by adding
UVW Mapping modifiers for each of the faces. In this example, the left, right
and front were planar mapped onto the object.
Creating a Single Texture Map
Make sure you have installed the unwrap.dlu plug-in in your 3D Studio MaxÒ “plugins” directory. We will delve into this tools source code a little later. For now select the Utilities panel (the hammer). Next select the “more..” button. Then scroll down until you find the utility named “Unwrap Object Texture” and then click “OK”. Most of the defaults are fine, except that you do want to select the “Spline Blending” radio button. The differences between no spline blending and spline blending can be seen in Figure 13. The algorithm for selecting the triangles to render is based on using the normal of the triangle and doing a dot product with the direction of the unit cube. This then selects the texture map, which is most likely to contribute the “best” pixels to the triangle. There could have been some sort of simple blending done, but there was a better solution.Figure 13
Normal Based |
Normal Based with Spline
Blending
|
No comments:
Post a Comment