|
Lights
Shockwave 3D supports ambient lights, point lights, round spots, and directional lights. If your scene doesn't include background geometry, the background color set in your 3D modeler will be the background color in the Shockwave 3D scene. 3D artists are taught not to change global ambient lighting from the default black unless absolutely necessary, because ambient lights increase the light evenly on everything in the scene, washing out bump maps, shadows, and other effects based on light contrast. They place specific lights in the scene to achieve effects. The same is true here: even though Shockwave 3D scenes have no bumps or shadows to wash out, techniques for creating indirect lighting, faux radiosity, and shadows depend on proper light placement.
Use point lights to generally illuminate the scene. For an outdoor scene, use a directional light (in 3D Studio Max, select Overshoot) and set the width to infinite. Unlike a point light, which radiates equally in all directions from the light source, directional lights are specialized spots in which light rays emit in parallel and in a single direction from the source. (In a spotlight, the light fans out from the source within the cone).
About light attenuation
Most 3D packages provide for light attenuation, but only certain feature sets export to Shockwave 3D (check your exporter's documentation). For example, in 3D Studio Max, you can use near/far attenuation as well as decay, but only the decay settings export to Shockwave 3D. These settings are available for point lights, directional lights, and spotlights.
The formula for decay attenuation is as follows:
Light_Intensityd = Original_Light_Intensity * 1.0/(c + d*l + d*d*q)
where
c = the attenuation factor for all distances
l = the attenuation factor that drops linearly with distance
q = the attenuation factor that has a quadratic drop-off with distance
d = the distance
In 3D Studio Max the light intensity can go above its original value inside a radius defined by the light's decay start value ( fDecayStart ). For lights with linear fall-off, the formula is as follows:
l=1/fDecayStart
For lights with an inverse-square fall-off, the formula is as follows:
q=1/(fDecayStart*fDecayStart)
Using lights efficiently
When lighting for real-time 3D, less is more. Shockwave 3D supports a maximum of eight lights in the scene, each noticeably degrading performance because each light takes a separate rendering pass. There are two ways to work around this limitation:
 |
Use light maps, which allow you to use Lingo to apply diffuse, specular, and glossy light maps, thereby projecting an effect into the scene while lighting it. |
 |
Use "baked textures"a process in which the 3D artist builds and lights the scene using whatever lighting and rendering is desirable, then positions a camera perpendicular to that surface and renders that area out as a bitmap. The lighting/shadow effect becomes part of (is "baked into") the bitmap. That bitmap is then applied as a texture map to the same geometry in the scene. The original lights are replaced by one or two lights for general illumination. If necessary, apply a self-illumination value to the baked texture to make it appear as if there's more light. |
Projector lightstexture maps assigned to lights to add or enhance textures or shadowswill not export to Shockwave 3D. You can work around this limitation by attaching texture maps to dummy meshes, exporting these, and using Lingo scripting to simulate the projector effects with texture layers and generated texture coordinates. To do this, use Lingo light maps.
Using atmospheric effects
Shockwave 3D doesn't allow you to import atmospheric effects such as fog, combustion, or volumetric lights. Nor does it support bitmap-based filter effects like lens flares. If you need the effect of light beams streaming through a window or a blue spotlight hitting smoke in a nightclub, consider adding a cone with a transparent, self-illuminated material. However, you can apply fog and particle systems in Director, using Lingo with suitable images and alpha maps. Animated light colors won't export, but you can animate light colors with Lingo.
|