Lights#
Several light and sky models are contained inside the Ignis rendering framework. Most number and color parameters can be connected to a shading network or texture via PExpr.
A light is specified in the lights block with a name and a type. The type has to be one of the lights listed at this section below.
{
// ...
"lights": [
// ...
{"name":"NAME", "type":"TYPE", /* DEPENDS ON TYPE */},
// ...
]
// ...
}
Note
The interface with PExpr is still experimental and will be further improved in the future.
Point Light (point)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
position |
vector |
|
Position of the point light. |
|
intensity |
color |
|
Intensity of the point light given in radiometric [W/sr] or photometric [lm/sr] units. Can not be specified with power. |
|
power |
color |
None |
Power of the point light given in radiometric [W] or photometric [lm] units. Can not be specified with intensity. |
Spot Light (spot)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
cutoff |
number |
|
Cutoff angle in degree. Greater angles will be completely black. |
|
falloff |
number |
|
Falloff angle in degree. Greater angles will smoothly falloff towards the cutoff angle. Falloff angle should be less or equal to the cutoff angle. |
|
position |
vector |
|
Position of the light. |
|
direction |
vector |
|
Direction of the light towards the scene. |
|
elevation azimuth |
number |
|
Instead of direction the elevation (in degrees above the horizon) and azimuth (in degrees west of south) of a celestial object can be used. |
|
year month day hour minute seconds latitude longitude timezone |
number |
|
Instead of direction the time and location can be used. This will give the approximated direction from the sun. Latitude is given in degrees north. Longitude is given in degrees west. The timezone is given as an offset to the UTC. |
|
intensity |
color |
|
Intensity of the light given in radiometric [W/sr] or photometric [lm/sr] units. Can not be specified with power. |
|
power |
color |
None |
Power of the point light given in radiometric [W] or photometric [lm] units. Can not be specified with intensity. The actual emitted intensity scales with the falloff and cutoff angle. |
Directional Light (directional)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
direction |
vector |
|
Direction of the light towards the scene. |
|
elevation azimuth |
number |
|
Instead of direction the elevation (in degrees above the horizon) and azimuth (in degrees west of south) of a celestial object can be used. |
|
year month day hour minute seconds latitude longitude timezone |
number |
|
Instead of direction the time and location can be used. This will give the approximated direction from the sun. Latitude is given in degrees north. Longitude is given in degrees west. The timezone is given as an offset to the UTC. |
|
irradiance |
color |
|
Output of the directional light in radiometric [W/m^2] or photometric [lm/m^2] units. |
Area Light (area)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
entity |
entity |
None |
A valid entity. |
|
radiance |
color |
|
Output of the area light in radiometric [W/sr/m^2] or photometric [lm/sr/m^2] units. Can not be specified with power. This means if the entity is scaled up, the emitted energy increases! |
|
power |
color |
None |
Output of the area light in radiometric [W] or photometric [lm] units. Can not be specified with intensity. This means if the entity is scaled up, the emitted energy remains the same! |
Sun Light (sun)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
direction |
vector |
|
Direction of the incoming sun towards the scene. |
|
elevation azimuth |
number |
|
Instead of direction the elevation (in degrees above the horizon) and azimuth (in degrees west of south) of a celestial object can be used. |
|
year month day hour minute seconds latitude longitude timezone |
number |
|
Instead of direction the time and location can be used. This will give the approximated direction from the sun. Latitude is given in degrees north. Longitude is given in degrees west. The timezone is given as an offset to the UTC. |
|
radiance |
number |
None |
Output of the sun in radiometric [W/sr^-1/m^2] or photometric [lm/sr^-1/m^2] units. Can not be specified with irradiance. |
|
irradiance |
number |
|
Output of the sun in radiometric [W/m^2] or photometric [lm/m^2] units. Can not be specified with radiance. |
|
angle |
number |
|
Solid angle of the sun given in degrees seen from the earth. |
Sky Light (sky)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
ground |
color |
|
Ground color of the sky model. |
|
turbidity |
number |
|
Turbidity factor of the sky model. |
|
direction |
vector |
|
Direction of the incoming sun towards the scene. |
|
elevation azimuth |
number |
|
Instead of direction the elevation (in degrees above the horizon) and azimuth (in degrees west of south) of a celestial object can be used. |
|
year month day hour minute seconds latitude longitude timezone |
number |
|
Instead of direction the time and location can be used. This will give the approximated direction from the sun. Latitude is given in degrees north. Longitude is given in degrees west. The timezone is given as an offset to the UTC. |
|
scale |
color |
|
Scale factor multiplied to the radiance. |
This sky model is based on the paper “An Analytic Model for Full Spectral Sky-Dome Radiance” and the 2013 IEEE CG&A paper “Adding a Solar Radiance Function to the Hosek Skylight Model” both by Lukas Hosek and Alexander Wilkie, both Charles University in Prague, Czech Republic at that time.
CIE Uniform Sky Model (cie_uniform)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
zenith |
color |
|
Zenith color of the sky model. |
|
ground |
color |
|
Ground color of the sky model. |
|
ground_brightness |
number |
|
CIE Cloudy Sky Model (cie_cloudy)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
zenith |
color |
|
Zenith color of the sky model. |
|
ground |
color |
|
Ground color of the sky model. |
|
ground_brightness |
number |
|
Brightness of the ground. |
CIE Clear Sky Model (cie_clear)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
zenith |
color |
|
Zenith tint of the sky model. |
|
ground |
color |
|
Ground tint of the sky model. |
|
ground_brightness |
number |
|
Brightness of the ground. |
|
turbidity |
number |
|
Turbidity factor of sky model. This parameter can not be an expression (yet). |
|
direction |
vector |
|
Direction of the incoming sun towards the scene. |
|
elevation azimuth |
number |
|
Instead of direction the elevation (in degrees above the horizon) and azimuth (in degrees west of south) of a celestial object can be used. |
|
year month day hour minute seconds latitude longitude timezone |
number |
|
Instead of direction the time and location can be used. This will give the approximated direction from the sun. Latitude is given in degrees north. Longitude is given in degrees west. The timezone is given as an offset to the UTC. |
|
scale |
color |
|
Scale factor multiplied to the radiance. |
CIE Intermediate Sky Model (cie_intermediate)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
zenith |
color |
|
Zenith tint of the sky model. |
|
ground |
color |
|
Ground tint of the sky model. |
|
ground_brightness |
number |
|
Brightness of the ground. |
|
turbidity |
number |
|
Turbidity factor of sky model. This parameter can not be an expression (yet). |
|
direction |
vector |
|
Direction of the incoming sun towards the scene. |
|
elevation azimuth |
number |
|
Instead of direction the elevation (in degrees above the horizon) and azimuth (in degrees west of south) of a celestial object can be used. |
|
year month day hour minute seconds latitude longitude timezone |
number |
|
Instead of direction the time and location can be used. This will give the approximated direction from the sun. Latitude is given in degrees north. Longitude is given in degrees west. The timezone is given as an offset to the UTC. |
|
scale |
color |
|
Scale factor multiplied to the radiance. |
Perez Sky Model (perez)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
direction |
vector |
|
Direction of the light towards the scene. |
|
elevation azimuth |
number |
|
Instead of direction the elevation (in degrees above the horizon) and azimuth (in degrees west of south) of a celestial object can be used. |
|
year month day hour minute seconds latitude longitude timezone |
number |
|
Instead of direction the time and location can be used. This will give the approximated direction from the sun. Latitude is given in degrees north. Longitude is given in degrees west. The timezone is given as an offset to the UTC. |
|
color |
color |
|
Tint of the sky model. |
|
ground |
color |
|
Ground tint of the sky model. Multiplied with color. Resembled the “-g” parameter in |
|
clearness brightness |
number |
|
Perez specified parameters to populate a, b, c, d and e. Can not be used with other options specifying Perez parameters. |
|
diffuse_irradiance direct_irradiance |
number |
|
Diffuse horizontal irradiance (W/m^2) and direct normal irradiance (W/m^2). Can not be used with other options specifying Perez parameters. |
Note
Output is in W m^-2 sr^-1 visible radiation, which equals the “-O 0” parameter in gendaylit
from the Radiance framework.
Environment Light (env)#
Parameter |
Type |
Default |
PExpr |
Description |
---|---|---|---|---|
radiance |
color |
|
Radiance of the sky model. This can also be a texture. |
|
scale |
color |
|
Scale factor multiplied to the radiance. Only really useful in combination with a texture. |
|
cdf |
string |
|
Internal method used for efficient sampling of the environment map. Can be one of “none”, “sat”, “conditional” or “hierachical”. |