Post-Processing
Light Beams
Light Beams creates volumetric god ray effects, simulating light streaming through atmosphere. Bright areas emit rays that radiate from a configurable light source position.
Example Configuration
light-beams.json
{
"effect": {
"postProcesses": [
{
"id": "pp_beams",
"type": "light-beams",
"enabled": true,
"settings": {
"lightX": 0.5,
"lightY": 0.5,
"exposure": 0.3,
"decay": 0.96,
"density": 1,
"intensity": 1
}
}
]
}
}Settings
| Property | Type | Range | Default | Description |
|---|---|---|---|---|
lightX | number | 0-1 | 0.5 | Light source X position |
lightY | number | 0-1 | 0.5 | Light source Y position |
exposure | number | 0-1 | 0.3 | Ray brightness |
decay | number | 0.9-1 | 0.96 | Ray falloff rate |
density | number | 0.5-2 | 1 | Ray density/spread |
weight | number | 0-1 | 0.5 | Sample weight |
samples | number | 10-100 | 50 | Quality (more = smoother) |
threshold | number | 0-1 | 0.5 | Brightness threshold for rays |
intensity | number | 0-2 | 1 | Overall effect intensity |
animated | boolean | - | false | Enable particle animation |
particleAmount | number | 0-1 | 0.3 | Particle density |
particleSpeed | number | 0-2 | 0.5 | Particle movement speed |
particleSize | number | 0.5-3 | 1 | Base particle size |
Suggested Presets
| Style | Settings |
|---|---|
| Sunburst | lightX: 0.5, lightY: 0.2, exposure: 0.4, intensity: 1.2 |
| Window Light | lightX: 0.8, lightY: 0.3, exposure: 0.3, decay: 0.94 |
| Dramatic | exposure: 0.5, intensity: 1.5, threshold: 0.3, samples: 80 |
| Dusty Rays | animated: true, particleAmount: 0.5, particleSpeed: 0.3 |
API Usage
render-request.json
POST /api/v1/render
{
"state": {
"canvas": {
"aspectRatio": "16:9",
"backgroundColor": "#1a1a1a"
},
"layers": [...],
"selectedLayerId": null,
"effect": {
"effectId": "none",
"enabled": true,
"postProcesses": [
{
"id": "pp_1",
"type": "light-beams",
"enabled": true,
"settings": {
"lightX": 0.3,
"lightY": 0.2,
"exposure": 0.4,
"threshold": 0.4,
"intensity": 1.2,
"samples": 60
}
}
]
}
},
"format": "png",
"width": 1920,
"height": 1080
}Tips
- Position light source where bright areas exist in the image
- Higher samples = smoother rays but more processing
- Lower threshold creates rays from dimmer areas
- Enable particles for atmospheric dust/fog effect
- Works great with high contrast images