Foundry Virtual Tabletop has a powerful engine for Lighting and Fog of War which interacts with placed Walls and Ambient Light sources to define the visibility and exploration progress of a Scene in a way that allows players to explore an environment through their character's perspective, seeing only what their Token would see in a certain position.
Creating and Editing Light Sources
To work with Ambient Light sources, activate the Lighting Layer using the Canvas controls palette (the icon looks like a lightbulb). When enabled you can viewing, create, and modify Ambient Light sources. Ambient Light sources can be easily created on any scene by selecting the Create Light tool from the control palette and using a drag-and-drop workflow to paint the light location.
Lights that are created will be blocked by any type of Wall which blocks perception (such as Walls, Terrain Walls, and Ethereal Walls.) The outer edges of the Ambient Light source will shape to conform to any vision restrictions, updating for the GM in real time so they can see where the light will be drawn. A centre ring approximates where the default division between Bright and Dim light will be for that light source.
After a light has been placed, it can be moved at any time by accessing the Lighting Layer to show light sources and then clicking and dragging the light to a new location. An Ambient Light source may be edited via the Light Source Configuration Menu, which can be opened at any time by double clicking on the Light Source you wish to edit. This menu provides the following options:
- Light Type
- This setting controls whether the Light Source is Local, Global or Universal. Local Lights adhere to vision restrictions and are blocked by walls, Global Lights provide vision of a location without adhering to vision restrictions (but are still blocked by walls), and Universal Lights are always visible regardless of vision or walls.
- X-Position (Pixels)
- The current x-coordinate of the Light Source in a Scene. It can be changed to reposition the light.
- Y-Position (Pixels)
- The current y-coordinate of the Light Source in a Scene. It can be changed to reposition the light.
- Dim Radius (Grid Units)
- A radius of dim light emitted by this Light Source.
- Bright Radius (Grid Units)
- A radius of bright light emitted by this Light Source.
- Emission Angle (Degrees)
- An angle of Light between zero and 360 degrees (the default) which represents the allowed radius of light for this Light Source.
- Light Rotation Angle (Degrees)
- The current direction the light is facing in degrees. Rotation of zero (the default) corresponds to a southward facing. This can also be adjusted by holding shift(or ctrl/cmd) and using scrollwheel while hovering over a directional light source.
- Darkness Threshold
- When the Scene's Darkness Level transitions from 0(bright) to 1(dark), the value of this setting determines when the light will be switched on.
- Light Color
- Set the color of light that the Light Source in Hex (#000000).
- Color Intensity
- Adjusts how vivid the color of the light is from 0(faded) to 1(vibrant).
- Animation Type
- Animate this ambient light in one of three styles: torch, pulse, or chroma.
- Animation Speed
- The speed of the animation effect, from 0(slow) to 1(fast).
- Animation Intensity
- The intensity of the animation effect, from 0(subtle) to 1(intense).
The Torch animation effect provides a semi-randomized flickering quality to the light source, intended to simulate light provided by fire. It works best when used to represent torches, candles, and campfires.
The Pulse animation effect can be used to provide flares of lighting, intended to simulate light from electrical disturbances, neon signs, warning lights, or magical effects.
The Chroma animation effect offers a way to provide a lightsource which shifts between colors. When set, it will choose colors along the same hue if set to a low intensity, or across all spectrums if set to a high intensity. Chroma is intended for situations with color-shifting lights, such as night clubs, neon signs, or magical portals.
Additional Lighting Tools
The Lighting Layer controls also provides access to some tools which change the overall view of the Scene, as well as controls for the Fog of War for that scene.
Transition to Daylight
If your scene presently has a Darkness Level configured, pressing this button will smoothly slide the Darkness Level toward 0 (Bright) transitioning the scene to daylight. This effect is synchronized for all connected Users.
Transition to Darkness
Similar to the Transition to Daylight button, this will smoothly slide the Darkness Level toward 1 (Dark) transitioning the scene to night. This effect is synchronized for all connected Users.
Note: If a global illumination threshhold has been set on the scene, global illumination will be toggled off when that darkness level has been reached.
Reset Fog of War
This button resets the recorded Fog of War exploration for that scene for all players regardless of their level of connection.
This button deletes all lights presently placed on the canvas for this Scene.
To interact with AmbientLights programmatically, consider using the following API concepts: