Sky models in GroIMP fall into two families:
Environment shaders (Sky + analytic shader)
The Sky node wraps a shader implementing computeExitance /
computeBSDF. In Twilight (Sunflow raytracer) the sky radiance function
is sampled continuously per ray. In GPUFlux it is pre-baked at scene-build
time to a 512×512 importance-sampled environment map and serialized to the GPU.
Both renderers give physically correct illumination. The background sky colour
is visible in rendered images. Sun direction is set as a manual direction
vector.
Models: PREETHAM, HOSEK_WILKIE, PRAGUE
Discrete light arrays
The sky is approximated as a fixed set of directional lights (72–73, Turtle geometry). Works in any renderer. Solar position is computed from geographic coordinates (latitude, day-of-year, hour) via the Goudriaan algorithm. Irradiance is driven by real-world DHI/DNI measurements or CIE sky types. No background image is produced.
Usage in XL/RGG scripts:
Sky sky = SkyModelLibrary.createPreetham(); Sky hw = SkyModelLibrary.createHosekWilkie(); CIELighting cie = SkyModelLibrary.createCIE();
- Author:
- MH at YNL 2026
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]All model names combined, environment shaders first.static final StringCIE Standard General Sky types 1–15 (CIE S 110:2003).static final String[]All discrete-light model names, in display order.static final String[]All environment-shader model names, in display order.static final StringHosek-Wilkie (2012) analytic sky model — turbidity + ground albedo.static final StringIsotropic overcast sky — 72 Turtle-geometry directional lights.static final StringPerez all-weather sky — 73 lights, DHI/DNI driven.static final StringPrague Sky Model (2021) — dataset-driven, full spectral.static final StringPreetham (1999) analytic sky model — turbidity parameter. -
Method Summary
Modifier and TypeMethodDescriptionstatic CIELightingCreates a defaultCIELighting(CIE Standard Sky type 7 — partly cloudy).static SkyCreates aSkynode with a defaultHosekWilkieSkyLight(2012) shader.static SkyDomeCreates a defaultSkyDome(isotropic overcast, 300 W/m²).static PerezSunSkyCreates a defaultPerezSunSky(Perez all-weather sky).static SkyCreates aSkynode with aPragueSkyModelLightstub.static Sky
-
Field Details
-
PREETHAM
Preetham (1999) analytic sky model — turbidity parameter.- See Also:
-
HOSEK_WILKIE
Hosek-Wilkie (2012) analytic sky model — turbidity + ground albedo.- See Also:
-
PRAGUE
Prague Sky Model (2021) — dataset-driven, full spectral. Requires external dataset.- See Also:
-
OVERCAST
Isotropic overcast sky — 72 Turtle-geometry directional lights.- See Also:
-
PEREZ
Perez all-weather sky — 73 lights, DHI/DNI driven.- See Also:
-
CIE
CIE Standard General Sky types 1–15 (CIE S 110:2003).- See Also:
-
ENV_SHADER_NAMES
All environment-shader model names, in display order. -
DISCRETE_LIGHT_NAMES
All discrete-light model names, in display order. -
ALL_NAMES
All model names combined, environment shaders first.
-
-
Method Details
-
createPreetham
-
createHosekWilkie
Creates aSkynode with a defaultHosekWilkieSkyLight(2012) shader. Turbidity 3, ground albedo 0.1. -
createPrague
Creates aSkynode with aPragueSkyModelLightstub. Set the dataset path via((PragueSkyModelLight) sky.getShader()).setDatasetPath(path). -
createOvercast
Creates a defaultSkyDome(isotropic overcast, 300 W/m²). -
createPerez
Creates a defaultPerezSunSky(Perez all-weather sky). -
createCIE
Creates a defaultCIELighting(CIE Standard Sky type 7 — partly cloudy).
-