Global Lights

Global Lights are scene objects that cast light onto Meshes, giving them realistic reflections and shadows.

General lighting from the scene itself

In many scenes, the general “atmospheric” lighting set in the scene node’s environment and ambient color settings may be enough. Before creating specific lights, investigate and adjust the scene properties.

Specific lighting from lights as scene objects

In some scenes, you may want to create specific light objects within your scene to help with less common lighting needs. For example:

  • Your configurator helps people buy a lighted roadside sign for a shopping mall, gas station, or hotel. You want to show how this sign will appear in daylight (reflecting the sun) and at night (glowing from the inside).

  • Your configurator helps people buy a car. You want to show the details within a deep wheel well, but those details are dim and hard to see with only the general scene lighting. You also want to have realistic running lights and tail lights illuminated in the scene to improve the appearance of the car.

Global Light Properties

Types of Global Lights

Type Appearance During Design Description

Directional light

 

A broad light-emitting plane, extending infinitely, with all the rays of light parallel. A close approximation to sunlight. All meshes below it are lit equally, regardless of their distance from the center of the light.

Hemispheric light

 

Unlike the directional light, all the rays of light come from the center of the light. But all meshes are again light equally, regardless of distance. If your scene gets its light from the environment, then adding this light source is somewhat redundant.

Point light

 

Like a bare lightbulb dangling from a wire, this light emits light in all angles. Unlike hemispheric lights, point light illumination decays over distance.

Spotlight

 

Like a flashlight (or electric torch), the spotlight emits a directional cone of light. The breadth of this cone can be adjusted. The light effect decays over distance.

Light objects are invisible to your users. In the scene designer, you see lights represented as simple meshes to help you you work in the scene. When the scene is run, lights are invisible to your users. Only their lighting effects on other meshes can be seen.

Property Description

Name

The name of the light, useful in Snap code.

Visible

Set this to false to hide the light, or true to show it.

You can also click the visibility icon next to the light in the explorer. It is a shortcut to this property.

Intensity

The strength of the light from this source. Higher numbers makes the light travel farther and color objects more strongly.

Position

The location of the center of the light.

Direction

The angle from which the light leaves the position.

Color

The RGB color emitted by the light.

Shadows

 

Generate Shadows

By default, lights do not cast shadows. If a shadow effect from any global light increases understanding of your product, turn that on here. Note that you will also need to flag meshes with the “cast shadows” and “recieve shadows” properties for the effect to be noticeable.

Process Transparency

To include transparent or translucent materials in the shadow calculations, set to true. Activating this feature can slow the frame rate of the scene.

Resolution

The shadows cast by this light can appear jaggy if the mesh casting the shadow and the one receiving it are close. Increase as necessary. Higher values can result in slower scenes.

Filter

Smooth the edges of the shadows. Higher values can result in slower scenes.

Shadow Quality

Increase the realism of the shadow as necessary. Higher values can result in slower scenes.

 

Global lights are not included when nesting scenes.

If you’re creating a child scene intended for use within a parent scene (such as a child “wheel” scene, which will be included four times in a parent “car” scene), use global lights in the child scene so it looks good when run on its own for testing. These global lights in the child scene will not be inherited into the parent scene. In this way, you can manage all the lighting from one scene. In most use cases, the parent scene’s global lights are better suited for lighting the entire combined mesh.

However, some child scenes may need special lighting. If you want a light in a child scene to be inherited, then create one of the mesh lights, instead of a global light. For example, if the wheel has attractive shiny spokes which should always be well-lit even when the wheel is used as a child scene, then create a point light in the child scene.

Was this article helpful?