Painting the Garage with VertexPaint
Painting Vertex Color
Rendering to Texture
Animating Vertex Paint Layer Opacity
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.
Set
up the lesson:
- Continue
from the previous procedure.
Create
separate radiosity layers:
-
With
the garage walls still selected, hold down the Ctrl key, then on the Modify panel
select the two VertexPaint modifiers in the stack and delete them
using the Remove Modifier From Stack button below the modifier window.
You can use the Layer Manager to quickly hide
and unhide parts of your scene. You'll hide all the lights but one,
then create a radiosity pass for that and bake it into a vertex
paint layer.
-
On the
toolbar, click the Layer Manager button.
- On
the Layer Manager dialog, click Hide for all the objects except FlourescentFlicker and Misc.
Now the only objects visible in the scene are
the garage elements and the one fluorescent tube.
- On
the Rendering menu, choose Render. Then on the Advanced Lighting
Tab, click Reset. Then click Start.
The radiosity solution is calculated for the
light coming from the single fluorescent tube.
Of course, the next step is to create the vertex
color layer.
- On
the Utilities Panel, click More > Assign Vertex Colors. Make sure
the selection set namedVertsPT_set is selected, then
click Assign To Selected.
The lighting coming from the one fluorescent
tube is applied to this vertex color layer.
- Click
the Edit button to jump to the Modify panel.
In the Modifier stack, highlight the Vertex
Paint layer and right-click, then rename it VertexPaint Flicker.
- 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.
You could do the same for the skylights.
We've provided a finished file that has all
the work done for you.
- Save
your file if you wish, then open tut_vertexpaint_anim_start.max to
continue.
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.
- In
the new file you just opened, look at the modifier stack for the VertPT_set objects.
There are six vertex paint layers in this file.
- In
the modifier stack, highlight VertPT_Flicker,
then click the Edit button to display the vertex paintbox if it
isn't already visible.
-
Turn
on the Auto Key button.
- Move
the time slider to frame 10.
- On
the floating vertex paintbox, move the opacity slider down slightly,
then back to 100.
This sets a key at frame 10, and frame 0.
- Move
to frame 12 and slide the opacity slider down to 0.
- Move
to frame 14 and slide the opacity slider up slightly, then back
down to 0.
- Advance
to frame 16 and slide the opacity slider up to 100.
- Play
the animation in the viewport. The light flickers once.
- Open
the Material Editor and find the Flourescent_light material.
In the Advanced Lighting Override Material rollout, click the Base
Material name.
The Base material parameters appear.
- Move
to frame 10 and click the Self-Illumination color swatch. Move the
whiteness slider toward grey, then back to white.
The color swatch is outlined in red, to show
it is animated.
- Move
to frame 12. Change the Self-illumination color to Black using the
Whiteness slider.
Move to frame 14, and keyframe the color as
Black again.
- Move
to frame 16 and keyframe the Self-Illumination back to white.
-
Turn
off Auto Key and close the Material Editor.
- In
the track bar, drag a selection rectangle around the keys. Hold
down Shift and drag
the keys to make copies so the flickering repeats.
If you play the animation now, its a little
slow. You can improve the performance by collapsing the layers.
Preserve
the flickering layer:
You'll use the Preserve Layer command to keep
the animated layer while condensing the remaining ones.
- On
the Parameters rollout, with the VertPt_Flicker layer
still selected, turn on Preserve Layer.
- Now
highlight the Layer at the top of the stack.
-
On the
floating vertex paintbox, click Condense To Single Layer.
The five other layers are collapsed into a single
layer, while the flicker layer is preserved.
- In
the Modifier stack drag the Flicker layer so it is at the top of the
stack, then play the animation in the viewport.
Summary
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.