Sun Shafts
God rays from the sun or from bright pixels, blocked by the scene geometry.
| Studio category | Scene |
|---|---|
| Pipeline stage | Scene (scene-linear HDR, before the tonemapper) |
| Default position | 11 in its stage, shares a pass with the SceneLight group |
| Works in | Live views only (viewports, PIE, games, Movie Render Queue): needs scene depth or the level |
| C++ / Blueprint | FGradeLayer::Effects.SunShafts (FGradeSunShafts) |
Manual: Sun Shafts. Every numeric parameter can be set at runtime with Set Layer Parameter using the path shown (see Animation).
Parameters
Screen-space light shafts (god rays) occluded by scene depth (scene effect).
| Parameter | Blueprint path | Values | Default | Description |
|---|---|---|---|---|
| Enabled | Effects.SunShafts.Enabled | on/off | off | Turns this on or off (the other values are kept while it is off). |
| Source | EGradeShaftSource | Sun | ||
| Intensity | Effects.SunShafts.Intensity | 0..100 | 40 | |
| Threshold | Effects.SunShafts.Threshold | -4..8 | 2 | Brightness where pixels emit rays (EV above mid grey). |
| Length | Effects.SunShafts.Length | 0..1 | 0.5 | Ray length as a fraction of the screen, 0..1. |
| Decay | Effects.SunShafts.Decay | 0..1 | 0.92 | Falloff along the ray, 0..1 (1 = no falloff). |
| Tint | Effects.SunShafts.Tint.R/G/B/A | colour | (1, 0.85, 0.65) | |
| Use Scene Sun | Effects.SunShafts.UseSceneSun | on/off | on | Use the brightest directional light for the sun (else Atmosphere's / this SunDirection). |
| Sun Direction | Effects.SunShafts.SunDirection.X/Y/Z | vector (X, Y, Z) | (-0.5, 0.3, 0.4) | Direction TOWARDS the sun in world space. |
| Sky Only | Effects.SunShafts.SkyOnly | on/off | on | Only the sky emits (depth at the far plane). |
Enumerations
Shaft Source (EGradeShaftSource)
| Value | Meaning |
|---|---|
| Sun | Rays from the sky / bright pixels towards the sun position on screen. |
| Bright Pixels | Rays from every bright pixel towards the screen centre (no sun needed). |
Generated from the GRADE C++ headers. Back to the reference index.