For newer tutorials for 3ds Max and Maya, go to Digital Arts Guild.


3D Studio MAX 3.1 tutorials
© 2000 Aaron F. Ross. Unauthorized duplication or publication is a violation of international copyright laws.

Tutorial 13: Mapping Coordinates (Still Life part 3)

1. Open your scene file from the last tutorial, #12. You will continue with this file in the following exercise.

2. Maximize the Perspective view. Select the wine bottle, and Isolate it using the Ctrl - right click menu.

3. Open the Material Editor and select an unused sample slot. Create a material which is dark green.

4. Download and unzip the following file:

13_mapping_coords_still_life_part_3_wine_label_02.zip

Place wine_label_02.tga in the Diffuse Map of the new material.

In the Bitmap Parameters, make sure the Alpha Source is Image Alpha, and Premultiplied Alpha is turned off. Click the Show Map in Viewport button.

Click the View Image button; you will see the wine label bitmap I created.

Then click the Display Alpha Channel button in the new window. You will see that this file also has a grayscale channel for the transparency of the image, which is called the alpha channel. Look at the sample slot (change it to a cube) to see that the green material you created is showing through around the edges of the wine label. Close the bitmap viewing window.

5. The Diffuse map is clearly set up wrong for this object. The bottle could use new mapping coordinates. In the Modify panel, click the UVW Map button to add a new modifier. Change it to a Cylindrical mapping type. In the Alignment section, try X, Y, and Z to see which is the correct alignment for this object. (It should be X.) Click the Fit button, and the mapping gizmo will stretch to enclose the entire object.


X align and Fit

6. Now you can and scale move the UVW Map gizmo to change the placement and shape of the map. Use Sub-Object Gizmo in conjunction with the Move and Non-Uniform Scale tools. Scale and position the map as a wine label would appear.

7. Note that the label repeats several times across the surface of the bottle. Go back to the Material Editor and turn off U and V Tiling. See the illustration below.

8. Now the label is only appearing once, but it appears stretched. In the UVW Map modifier, adjust the U Tile parameter by dragging the spinner. Watch the texture as it wraps around the wine bottle. By setting the U Tile value higher, the texture tiles more times around the circumference of the bottle. But since we have Tiling turned off in the material definition, the label does not repeat, it only changes shape.

9. In the Material Editor, use the Go To Parent button to go back up to the top level of the material. In the Maps rollout, drag the new Diffuse map to the Opacity map slot. When prompted for Instance or Copy, select Copy. Change the Opacity Map Amount to about 20%. Then enter the Bitmap Parameters page by clicking the Opacity slot. In the Bitmap Parameters rollout, look for the Mono Channel Output section, and select Alpha.

In the sample slot, turn on the background so you can see the transparency. The green material should be partially transparent, but the label should be totally opaque.

10. If you render the bottle against a black background, you will not see any transparency. So add an Environment bitmap by going to the Rendering menu and selecting Environment. In the Environment dialog, click the button that says Environment Map.

In the Material/Map Browser, double-click Bitmap. Navigate to the default 3DS MAX Maps directory and open the folder named "skies." Use the file cloud2.jpg. Then render the scene. You see that the bottle is transparent, but the label is opaque.

11. Unhide the rest of the scene by clicking Exit Isolation. Select the Key Omni light, and in the Modify panel, turn on its ability to cast shadows.

Zoom out so you can see the entire scene, and render. Pay special attention to the shadows cast by the wine glasses, the bowl, and the tablecloth.

The glasses should not cast such dark shadows, and the bowl and tablecloth shadows are very blocky. We can quickly fix the glass and tablecloth shadows by simply turning them off. In the Modify panel, under General Parameters, find the button labeled Exclude, and click it.

12. In the Exclude/Include dialog, select glass 01, glass 02, and tablecloth, using the Ctrl key. Click the radio button which says Shadow Casting. Then click the button that looks like two arrows pointing to the right. This sends the selected scene objects into the list of objects which are excluded from receiving shadows cast by this light.

Re-render the scene. The dark shadows cast by the glasses are gone, and the tablecloth shadow is not creating strange artifacts.

13. However, the bowl shadow is still very jagged. This is because the default type of shadow casting is actually a form of texture mapping. If we increase the resolution of the Shadow Map, the jaggies will go away. Go to the Modify panel, Shadow Map Parameters rollout, and increase the Size to 1024. See below. Then re-render, noting the change in the sharpness of the shadows.

14. However, perhaps we want softer shadows. Increasing the Sample Range parameter will blur the shadows, producing the effect of diffused light. Experiment with different settings of map Size and Sample Range. A low Size with a high Sample Range will produce very soft shadows.

15. Continue to experiment with the scene until you are happy with the way it looks. Here are a few suggestions you might want to try:

      a. Add more textures, such as a wood bitmap for the table, and some Noise bump maps for the oranges.

b. Increase the Ambient lighting in the Rendering | Environment dialog box.

c. Use a different Environment Map.

d. Use Spherical Environment mapping instead of Screen mapping. Drag the environment map button from the Environment dialog to a free slot in the Material Editor. Change the Mapping type to Spherical Environment, and adjust the tiling. To help with this, turn on the background in the shaded viewports. Go to the Views menu and select Viewport Background. In the dialog box, turn on Use Environment Background and Display Background.

e. Add a third light in the back of the scene for backlight.

f. Turn off specular highlights for the Fill light. Select the Fill light, and go the the Modify panel. In the Affect Surfaces section, turn off Specular. Now your objects have only one hot specular highlight each.

g. Add Reflection Maps to the glasses and bottle. The Reflect/Refract map type can be placed in the Reflection Map slot, just as it can be placed in the Refraction Map slot. Warning: render times may escalate dramatically if you do this! To cut down on render times, you can also place the same bitmap you used for the Environment into the Reflection Map slot. This is a quick and dirty way to get fake reflections which are not based on the actual objects in the scene.

h. Try a different Refraction algorithm for the glasses and bottle: Thin Wall Refraction. It may give more accurate results than the Reflect/Refract map type. Lower the Thickness Offset parameter until the refracted image looks more natural.

i. Change camera position, light color, or anything else you wish.

16. When you are finished, save the .MAX file AND a rendered image.

Render your image at 640 x 480 resolution, in the file format .TGA or .BMP. These are uncompressed file formats. Save as a 24-bit image; 32-bit images have an alpha channel, which we are not using for our rendered images in this case, and would just take up more disk space.


Return to 3D Studio MAX 3 tutorials


CGLearn.com home page