Lights Reference
Illuminate your 3D scenes
Overview
Lighting is a crucial element of 3D visualization that can dramatically enhance the appearance and realism of your scene. confBuild supports all standard Three.js light types.
Available Light Types
point- Light emitting from a single point in all directionsspot- Cone-shaped light in a specific directiondirectional- Parallel light rays like the sunambient- Uniform light affecting all objects equallyhemisphere- Sky-to-ground gradient lightrectarea- Light from a rectangular surface
Common Parameters
Parameters shared across light types.
lighttype
Type of light source
All
color
Light color (hex)
All
intensity
Brightness (0-1)
All
distance
Maximum range (0=infinite)
Point, Spot
decay
Intensity falloff rate
Point, Spot
angle
Cone angle (radians)
Spot
penumbra
Edge softness (0-1)
Spot
groundColor
Ground color
Hemisphere
width, height
Light source size
RectArea
x, y, z
Position
All
rx, ry, rz
Rotation (degrees)
Directional, Spot, RectArea
Point Light
A light that emits from a single point in all directions, similar to a light bulb.
Example
light
point
#FFFFFF
0.7
500
0
100
0
Best Used For
- Light bulbs and lamps
- Candles and small light sources
- Omnidirectional illumination
Spot Light
A light that shines in a specific direction, creating a cone effect.
Key Parameters
- angle: Cone width in radians (0.3 is about 17 degrees)
- penumbra: Edge softness from 0 (hard) to 1 (soft)
- rx, ry, rz: Rotation to aim the spotlight
Example
light
spot
#FFD700
0.8
0.3
0.2
-45
Best Used For
- Spotlights and flashlights
- Focused lighting effects
- Highlighting specific objects
Directional Light
A light with parallel rays, like sunlight.
Example
light
directional
#FFFFFF
0.8
-45
30
0
Note: Position affects shadow calculation but not light intensity. Place far from your scene for proper shadows.
Best Used For
- Sunlight and moonlight
- Overall scene lighting
- Consistent shadow casting
Ambient Light
A light that illuminates all objects equally with no direction and no shadows.
Example
light
ambient
#404040
0.3
Note: Position has no effect on ambient lights.
Best Used For
- Base illumination
- Filling in shadows
- Indoor scene ambience
Hemisphere Light
A light that fades from one color to another from sky to ground.
Example
light
hemisphere
#B1E1FF
#444444
0.6
Best Used For
- Outdoor scenes
- Natural lighting
- Soft global illumination
Rectangular Area Light
A light that emits from a rectangular surface uniformly.
Example
light
rectarea
#FFFFFF
200
100
1
Note: RectArea lights are more performance-intensive than other types.
Best Used For
- Windows and skylights
- Light panels and softboxes
- TV/monitor glow
- Architectural lighting
Light Combinations
Combine multiple lights for realistic effects.
Basic Indoor Setup
- Ambient light (#404040, intensity 0.3) - Base illumination
- Directional light (#FFFFFF, intensity 0.7) - Main light
- Point light (#FFA500, intensity 0.5) - Accent light
Outdoor Daylight
- Hemisphere light (#B1E1FF, #444444, intensity 0.6) - Sky/ground
- Directional light (#FFFFFF, intensity 0.8) - Sunlight
Best Practices
Tips for effective lighting.
Recommendations
- Start with low-intensity ambient or hemisphere light as base
- Add directional or spot lights for highlights and shadows
- Use warm colors for indoor, cooler for outdoor daylight
- Limit the number of lights for better performance
- Use RectArea lights sparingly due to performance impact
Performance Considerations
- Point and spot lights with shadows are most intensive
- RectArea lights significantly impact performance
- Ambient and directional have lowest impact
- Use appropriate distance values to limit effect range