Chapter 20 | Virtual CRASH 4 | Volumetric and Environment Lighting

Virtual Tutor: Go to help > lights > create light to learn more about the volumetric lighting tool.

As of the April 1, 2018 update, Virtual CRASH 4 users can adjust environmental lighting to create nighttime sky effects and to emulate the effect of sun positioning. Users can also include volumetric lighting effects into animations and diagrams. The primary reason to include lighting in our scene is to improve the overall illumination of a scene, increase realism through realistic lighting and shadowing, and of course, model a light source such as a vehicle’s headlights and taillights. With the volumetric lighting tool, you can now provide the viewer with visual indications that (1) an object in the 3D environment is providing a source of illumination, and (2) an object in the scene is being illuminated. 

Go to the following link to see example use cases:

Please note, the intent of the volumetric lighting tool is not to provide a predictive model of what is or is not visible by a human observer, nor is it to predict what effect visible light may or may not have on a human observer, but is intended to give the user a method to create visual cues for the audience regarding sources of light and objects under illumination within the 3D environment.  

Adjusting Environment Lighting

To modify the environment lighting, simply go the “environment” menu in the left-side control panel. There you will find options to adjust the ambient lighting color and intensity as well as the sun (primary scene light) color and intensity (see below). 

The effect of the environment lighting setting will be apparent once the scene is rendered in either Skylight or Direct Light mode. By default, the “auto direction” option is enabled. This will attach the primary scene light (sun) to the camera. Thus, the shadow from the primary light will move as the camera moves. In the figure below, the scene is rendered in Direct Light. 

Rendering in Skylight will superimpose a uniform hemispherical light source in the scene, thus producing additional shadows directly beneath the objects in the scene (see below).

Note, by changing the “sun intensity” value to 0% and the “ambient intensity” value to 80%, one can reproduce the Skylight conditions equivalent to those prior to the update. Note the shadow from the primary scene light is no longer present in the figure below.

Nighttime Sky

Setting the “sun intensity” value to 0% and lowering the “ambient intensity” value allows the user to create nighttime conditions (see below). 

Adjusting the Sun Position

In the environment menu, deselecting “auto direction” allows the user to set the azimuth and altitude of the primary scene light (Sun). The azimuth sets the Sun’s horizontal angular position with respect to the global x-axis (see below), with the Sun’s distance from the scene effectively infinitely large. The altitude sets the Sun’s angular position with respect to the horizon. At an altitude of 90 degrees, the Sun is directly overhead. At 0 degrees, the Sun is at the horizon. 

Creating Lights

To create a light, go to Create > Extended Primitives 3D > Light (see below). 

You will then see a lightbulb icon follow your mouse cursor. Simply left-click in your scene to place the light in the scene. You can left-click again to place another light. Continue placing lights as needed. Right-click to stop placing lights in the scene. 

Like any other object in Virtual CRASH, lights have a position-local attribute. You can use this to place lights anywhere in your scene, or you can left-click on the light and drag. 

Currently, the effects lights have in the scene will only be apparent upon rendering in either Direct Light or Skylight mode. As you add lights into your scene, and adjust their properties, you will want to frequently create test renders of your scene (see below). 

Below we see the effect of the light in our scene once the frame is rendered in Direct Light or Skylight.

Below we see shadow effects from the light. 

Customizing lights

The light objects have many attributes which can be customized. These are reviewed below. 


Left-click on your light object. In the left-side control panel, you will find the “decay” menu. Here you can specify the light intensity decay. By default, light intensity decays inversely to square of the distance from the light source (see below). The user can increase the rate at which light intensity decays as a function of distance by using options in the “decay” menu. By default, no additional decay factors are used (“type” is “none”).

Users can create faster light decay by setting “type:inverse” or “type:inverse square”. Using “type:inverse” will cause the intensity as a function of distance to be multiplied by an additional factor of 1/R outside of the “start” distance. Using “type:inverse square” will multiply the intensity function by an additional factor of 1/R2 outside of the “start” distance (see below). In the figure below, the start distance is set to the same distance as the circle’s radius for reference. 

Note, the “show” option will provide a visual indication of a light’s “start” distance whether the light is actively selected or not. If “show” is not enabled, the “start” distance indicator will only be visible when the light is selected. 

Far Attenuation

The user can force light to attenuate as a function of distance using options the “far attenuation” menu. Light intensity will be forced to fall to 0 beginning from the “start” distance and ending at the “end” distance. Virtual CRASH will give you a visual indication of the start and end distance radii with the white and black circles respectively (see below).

In the figure below, the attenuation start distance is set to the same radius as the circle for reference.  

Light Types, Intensity, and Color

In the “misc” menu, the user can change the state of a light to either on or off by toggling the on/off button directly, or by using the square button dropdown menu, much like the traffic signal device. This is useful for timing sequences of lights, such as siren lights, turn signals, muzzle flashes, etc.  

In the “misc” menu, the user can change between point light (“omni”) and spotlight using the “type” dropdown menu (see below). The spot light feature is a great way to precisely control the direction of illumination.  

Below we see the scene rendered with spot light illuminating a sphere.

Using the “intensity” and “color” inputs, the user can control both the initial light intensity and the light color (see below). Note, using the square-shaped dropdown menu next to “intensity”, the intensity of a light can be varied as a function of time using the diagram tool. 

Using the “shadow” option, one can also disable shadow effects (see below).

Note, the “size” and “distance” attributes allow the user to increase the size of the light icon and the visual indication of the light’s extent within the scene. This is simply to make editing within the 3D workspace easier for the user. 

In the “presets” dropdown, one will find a number of preset lights available, such as headlight (“front light”), taillight (“back light”), turn signals (“directional indicator”), siren lights, and street lights (“candelabrum”). These presets are simply to aid the user in quickly rigging vehicles with lights and are not intended to model any specific vehicle lighting system. Once the user has rigged a vehicle with lights, the user can then customize the light settings as needed for the subject vehicle. Rigging vehicles is discussed further below. 

Note, when the spot light is used, an additional menu command becomes available, “source”. The source option allows the user to also give a spot light an omni light effect, which can be attenuated using the “start” and end” options (see below).

Spot lights also include the ability to customize the angular attenuation of the light cone. In the “light cone” menu, users will find “hotspot” and “falloff” settings. While editing in the 3D workspace, the hotspot size is indicated by a black cone and the falloff by a white cone. The intensity as a function of angle away from the spotlight’s forward direction will decrease starting from the hotspot angle and ending at the falloff angle. In the figure below, we show three spot lights with falloff at 45 degrees. On the left, the hotspot has been minimized to 0.5 degrees, on the right, the hotspot is at the same angle as the falloff at 45 degrees, in the middle the hotspot is 30 degrees. 

Using the “shape” dropdown menu, spotlights can also take on a rectangular shape rather than circular. Use the “aspect” input value to modify the ratio of length to width (see below). 

Volumetric Lighting Effect

Users can enhance the realism of their animations and diagrams by using volumetric lighting. This feature allows light to scatter in all directions within a specified volume. This allows on to emulate the effects of fog, smoke, or other particulates that would also be normally illuminated when close to a light source. The volumetric lighting feature is also a great way to create a Sun-like object in the 3D simulation environment. Both omni and spotlights can use volumetric lighting. Simply left-click to select your light object, then in the left-side control panel, go to the “volume” menu. Use “start” and “end” to customize the volume around your light within which you would like volumetric lighting to be applied. Increasing the “density” has the effect of increasing the intensity of light emanating from the specified volume. Increasing the number of “samples” improves the volumetric lighting quality but can slow render time. The color of the light emanating from the specified volume can be made its own color independent of the light source itself. The color of the light volume at the end of the attenuation envelope can also be customized. These features allow open many possibilities for creating incredible special effects within an animation.  

Rigging Vehicles, Lamps, and Other Objects with Lights

It’s very easy to rig vehicles with lights in Virtual CRASH. Simply place a vehicle into the scene. Next, select a light object from Create > Extended Primitives 3D > Light. Next, hover your house over the vehicle. As you move your mouse around the vehicle, from front to side to rear, you’ll notice the light type will automatically change. In the figure below, we see Virtual CRASH automatically selecting the “front light” spotlight preset. 

Left-click to place your light. You can continue left-clicking to place multiple lights as needed. The lights will then be mounted onto the vehicle. Right-click to stop placing lights. You can modify a light’s placement and orientation using your mouse, or by using “position-local” and “rotate-local”. Using position-local, you’ll want to ensure that your driver side and passenger side lights are placed symmetrically with respect to the vehicle’s reference frame. As you move your vehicle around, the lights will stay mounted and move with the vehicle. 

Please note, the position at which Virtual CRASH mounts a light is entirely based on where the mouse cursor is hovering at the moment when the left mouse button is pressed. This position can be modified using your mouse or position-local input values in the left-side control panel. Virtual CRASH will choose from the “front”, “back”, “directional”, “siren”, and “candelabrum” presets depending only on which direction the selected polygon surface is facing when the left mouse button is pressed.  As with ALL light settings, it is user’s responsibility to ensure light positions and orientations are appropriate for the given vehicle. 

In the figure below, two headlights and two taillights have been mounted onto our vehicle. The lights and vehicle have been grouped together to make it easier to see which lights are associated with which vehicle. 

Since both the on or off state of a light and its intensity can be specified as a function of time using the box dropdown menu and the diagram tool, the user can simulate increased intensity of brake lights as specific moments in an animation. Controlling intensity is often easiest using the rectangular pulse option (see below). 

Lights can be mounted onto any object in Virtual CRASH. In the figure below, a lamppost was fashioned by bending a cylinder at the top. A light was mounted to the bottom surface, which was automatically selected as a “cadelabrum” (streetlight) preset.