Skip to main content

Global illumination


Brakeza3D includes a default light in the scene, which can be thought of as the sun.

Essentially, it is a directional light, so you can adjust some of its parameters to achieve the desired base illumination. Being a global light, it has no position. You can manipulate the components of global illumination through the UI or using your LUA scripts.

Illumination menu options

ADS Lighting Model


The ADS (Ambient, Diffuse, Specular) model is a standard lighting technique used in computer graphics to simulate how light interacts with objects in a 3D scene:

ComponentDescription
AmbientBase light that affects all surfaces equally, simulating indirect light
DiffuseDirect light reflection based on surface angle, creates shading
SpecularBright highlights on shiny surfaces, simulates reflections

This separation allows realistic control of ambient light, direct light reflection, and surface highlights in a simple and efficient way.

Light Types


In Brakeza3D, you will find three types of lights:

Light TypeDescriptionPositionShadowsTypical Uses
Global LightSimulates sunlight and global illuminationNoYesOutdoor scenes, daylight
Point LightEmits light in all directions from one pointYesNoBulbs, candles, small sources
SpotlightEmits light in a specific direction with coneYesYesFlashlights, stage lights

All lighting properties can be edited through the GUI, with immediate visual feedback. This enables quick iteration on scene mood and atmosphere.

Shadow Mapping


Brakeza3D provides shadow mapping support for both global directional lights and spotlights, allowing you to add realistic dynamic shadows to your scenes.

This technique works by rendering the scene from the light's point of view to generate a depth map, which is then used to determine which areas should be in shadow during the final render pass.

  • Global illumination: Produces large-scale, consistent shadow casting across the entire scene
  • Spotlights: Enables focused, directional shadows ideal for lamps or flashlights

Shadow mapping example

note

Currently, point lights do not support shadow mapping, as their omnidirectional nature requires a more expensive rendering approach. This ensures optimal performance while maintaining visual quality where shadows are most impactful.

Scripting API


For controlling lights programmatically via LUA scripts, see the Lighting System API reference, which includes:

  • Global illumination methods (setGlobalIlluminationAmbient, setGlobalIlluminationDiffuse, etc.)
  • LightPoint creation and configuration
  • LightSpot creation and configuration