Interactive and immersive environments such as those required
in interactive games require that the scene artists employ variety of techniques
to make the modeling and texturing as realistic as possible, while making sure
it is “lightweight” enough to update efficiently in the display system.
Minimizing polygon counts in models are discussed elsewhere, but these tutorials
focus on how to “bake” textures, shading and lighting effects directly into the
geometry of your scene.
Games professionals will want to familiarize themselves with the options 3ds Max gives them to manipulate vertex color and interactive shading.
Games professionals will want to familiarize themselves with the options 3ds Max gives them to manipulate vertex color and interactive shading.
In this tutorial, you will load in a scene of a garage, a
typical games environment. You will take the lighting information in the form of
a radiosity solution and learn to “bake” the radiosity into Vertex Paint
modifier layers. You'll also get a chance to explore painting on multiple layers
and animating the layer opacity to create the illusion of flickering fluorescent
tubes in the scene.
You can take the lighting information from your file and add
it to the vertex color information. In this exercise, you will open a scene of a
garage, a typical game environment. The skylights and fluorescent tubes in the
garage have advanced lighting override materials applied to them. You will
calculate a radiosity solution and then “bake” it in the vertex color channels
using the Assign Vertex Colors Utility.
This file has been prepared so that it has advanced lighting
override materials placed on the fluorescent tubes, the overhead skylights, the
hanging lamp, and the rear red skylight in the back of the garage. First, you
will adjust the luminance scale on these materials.
Adjust the Advanced Lighting Materials:
Calculate the radiosity solution:
-
Make sure Display Radiosity In Viewport is turned on, and that Initial Quality is set to 70 % Then click Start.The Radiosity solution is created, and the viewport displays the shadowing created using the advanced lighting.
-
The radiosity solution calculates then displays in the viewport. The red light color is now splashed prominently on the back walls.
Next, you will take the radiosity lighting information and add
it to the vertex color information by using the Assign Vertex Color Utility.
This will create a vertex paint layer that you can then manipulate.
Display the vertex color in the viewport:
At the top of the paintbox is a row of
buttons which allow you to control the viewport display as you work.
Tip: It’s important you understand these
modes. For example you can find yourself painting on something you can’t see,
because you aren’t displaying it in the viewport.
Blur the shadows:
-
Use Arc Rotate to look at the skylights and fluorescent fixtures. Look up at the ceiling from the center of the room. You may notice the lighting information around the skylight is a bit coarse.
-
On the toolbar, turn on Window selection, then drag a selection rectangle around one of the skylight areas.
-
On the Parameters rollout, click the Soft Selection button, then in the Soft Selection dialog, turn on Use Soft Selection.
-
Paint additional layers:
You can add as many layers as you want. Each
layer is applied as another VertexPaint modifier in the stack. These layers can
be adjusted or animated individually.
-
-
Change the Mode. Click the drop-down arrow and choose Color Dodge, then set the opacity back to 100.
-
Click the Adjust Color button. In the Adjust Color dialog, drag the hue slider to change the color. Click Apply.
-
Drag the Saturation slider to the left to make the effect more subtle. Click Apply, and then click OK to close the Adjust Color dialog.
In this lesson you will separate the lighting information from
the individual objects onto independent layers. We'll show you how its done,
then you will load a file that has the work completed.
You'll create the illusion of a flickering fluorescent tube by
animating the opacity value of the vertex paint layer, and then keyframing the
material self illumination color.
Create separate radiosity layers:
-
-
On the Rendering menu, choose Render. Then on the Advanced Lighting Tab, click Reset. Then click Start.
-
Repeat the procedure for the another light layer. On the Layer Manager, unhide the layer named Fluorescent Lights, and hide the layer named Fluorescent Flicker. Repeat the above steps to reset radiosity, create a new radiosity solution, and assign it to a vertex color layer.
Animate the layer opacity:
Now you can create the illusion of a
flickering fluorescent tube. The technique you use is simple. You select the
layer with the lighting information, then in Auto Key mode, keyframe the opacity
of the layer. You'll then complete the illusion by keyframing the
self-illumination color of the material.
Preserve the flickering layer:
You'll use the Preserve Layer command to keep
the animated layer while condensing the remaining ones.
In this tutorial you have explored the use of the VertexPaint
modifier. You have learned to bake radiosity into vertex color using the Assign
Vertex Color Utility, and how to add paint layers in the modify panel. You have
learned to animate the opacity of the layers to create a flickering lighting
effect that can be exported to a game engine.
Rendering to Texture
The Render To Texture tool in 3ds Max lets you render, or
“bake,” various scene elements into your textures, including lighting and
shadows. You can use these special textures in real-time 3D applications such as
games to reduce the burden on the renderer, thus improving the frame rate.
All the files necessary for this tutorial are provided on the
program disc in the \tutorials\vertex_color
directory. Before starting the tutorials, copy the \tutorials folder from the disc to your local
program installation.
Bake the texture:
Examine the results:
-
Take a look at the modifier stack display, and then look at the biplane in the Perspective viewport.A second modifier, named Automatic Flatten UVs, has been added to the Fuselage. This is an Unwrap UVW modifier, but it was created and applied automatically by the Render To Texture function.
-
Double-click the texture in the list to add it in the Material Editor. Close the Material/Map Browser dialog.
Render other elements:
-
Delete the DiffuseMap list entry, set the LightingMap's Target Map Slot to Diffuse Color, and then click the Render button.Render To Texture generates a new material and applies it to the Fuselage, so it is now visible in the viewport. The LightingMap element includes all shading and shadows, but no diffuse coloring.Note: Only one texture element at a time can be set to any given target map type. Also, if you add a texture element that was previously assigned a target map type, the software automatically assigns the most recent target map type that it used, if no other active texture element is already using that target map type. If another active texture element is using that target map type, the target map slot for the newly assigned texture element is blank.
Render To Texture is a versatile tool that can save you time
in generating texture maps for real-time applications. In this tutorial you
learned how to bake different types of textures, and how to work with the Shell
material that Render To Texture generates. Try generating other texture
elements, and then exporting them to your real-time 3D engine.
No comments:
Post a Comment