And now......page 2

Opacity Maps

As I demonstrated in the glass example on the previous page applying an opacity map to the frosted glass gave it added realism (though it's a bit hard to tell in the tiny pictures). Any map can be used as an opacity map, and experimenting with them can produce some interesting results.

The sphere on the left has a 50% opacity. The sphere in the center has a gradient applied as an opacity map. The sphere on the right has a filter color applied to it.

The opacity map I applied to the frosted glass was a Falloff map with a Light/Shadow setting, making lighted areas more transparent than shadowed areas. By swapping the colors in the falloff parameters I could have reversed the effect and made the lighted areas less transparent. That effect would be appropriate for a lake surface where areas in bright sunlight reflect the sky and surroundings while areas in the shadows allow a glimpse under the surface. On the right-hand sphere I used a gradient map for opacity. Opacity maps, like bump maps, are affected by color. In bump maps the darker colors are recessed and the light colors are raised; in an opacity map dark areas are transparent and light areas are opaque. In the gradient map applied to the sphere the map colors were black, grey, and white from top to bottom. As you can see the middle section of the sphere is half way between totally transparent and totally opaque.

Let me give you another example here. Again I'll use glass.

The windows on the left have no opacity mapping.

 

Consider these two views out a factory window. The plane object in the left-hand window simply has opacity turned down to make it transparent. It ends up looking like there is no glass there at all. The window on the right looks better. It often seems as though old factory windows have been painted over and scraped clean again at random. The opacity map for the right-hand window was created in Photoshop

If you've been paying attention to the lesson it should obvious that I had to invert this map in my map parameters in order to use it as an opacity map as it appears in the rendering.

Now you can use opacity to dirty up your glass.

"Opacity mapping can leave your glasses looking dirty and spotted. What would your dinner guests think?"

 

Modeling With Opacity

Swell, you can make dirty glasses....So What?! I think the true power of opacity maps is in optimizing your modeling and rendering. I'm sure that some of you are familiar with the frustration that comes from meticulously modeling a scene, spending hours on setting up lights and materials to enhance your geometry, and then having to wait days to see the work pay off in a rendered project. Rendering takes a lot of time and processing, and the more faces there are in a scene the longer it will take, even without loading your scene full of raytracing, a gazillion lights, and a couple of particle systems. Keeping a scene simple speeds up rendering time. Opacity maps can help. Let's start with a simple metal grate.

This grate looks pretty good. It would work nicely as a sidewalk grate, or deck plates in a deep space freighter. You could array several of these and make a flight of stairs for an aircraft carrier. Here's the trouble; this grate has 11 upright bars and 25 horizontal bars. This "one" object in MAX is made up of 1332 faces that have to be rendered. If you made a flight of 10 stairs that would be 13,320 faces, and every face in a scene adds to the rendering time. Now let's bring in the opacity map.

This grate looks pretty good too. It appears to have 11 upright bars and 28 horizontal ones. With Raytrace shadows turned on this grate casts a shadow as convincing as the one above. This grate is just one box with an opacity map. The total number of faces making up this grate is 12. Ten stairs would give you a whopping 120 faces. With the mapped grate an entire flight of steps is still 11 times smaller than a single mesh grate. This is the true beauty of opacity mapping. I opened Photoshop, turned on the grid and the snap to grid function, drew some lines, and BINGO, opacity map.

Using an image downloaded from http://www.3dcafe.com I was able to make the "alien cocoon" material below. Opening the image in Photoshop I first converted it to greyscale to use as a bump map. Then I copied the greyscale image and processed it to high contrast to use as an opacity map. The bump and opacity maps were applied to a green material and a quick green slimy type alien cocoon was achieved. I think you will find that Photoshop (or Painter if you prefer) are indispensable tools when making maps and materials for MAX.

Now a word of warning....If you are going to use opacity maps in this way to simplify your modeling you must use Raytrace shadows on your lights. If you don't know how to turn on Raytrace shadows here's the quick rundown. With your light selected click on the modify panel and turn "cast shadows" on; then scroll down to the Shadow Parameters rollout and switch your shadows from "Shadow Maps" to "Raytrace ". Just as with Raytrace reflections or refractions Raytrace shadows take longer to render than mapped shadows. It is necessary to use Raytrace shadows though if you intend for any of your opacity mapped grates, cocoons, fences, etc. to cast shadows. Bet you want to know why don't ya?

Shadow maps are able to render so quickly because they simply approximate the shape of an object projected as a shadow. This doesn't work well for transparent objects since the shadows cast are as solid as the shadows cast by opaque objects.
* If you want transparent objects to cast believable shadows you MUST use Raytrace shadows!

 

Okay, you have probably noticed by now that these lessons are getting longer as we go. Part 4 is no exception to the rule. So, before you continue on to page 3 take another break. When you come back there is one last aspect of transparency that should be covered. Page 3 is about masks.

Back to page 1

Continue to page 3