Physical Lights
Physical lights each have their own dedicated interface. An application wishing to be ‘physically correct’ should ONLY use lights of the following types:
Light type |
Description |
Snapshot |
---|---|---|
Physical light |
This is a general purpose physically correect light. It can use any mesh based geometry as an emitting light source.
|
|
Sunlight |
This is a physical sunlight. Unless you’re not on Earth, you’ll want only one of those in your scene graph at a time!
|
|
Skylight |
This is a physical skylight. Only one skylight should be set in a scenegraph at a time.
|
Shadowing Methods for Physical Lights
All physically correct lights have an emitting surface, unlike Real-Time Lights that have only one direction or point from which light is emitted. This implies a lot of differences for the resolution of the lighting and shadowing of these lights.
Consequently, on the CPU, HOOPS Luminate uses Monte-Carlo based sampling techniques for the resolution of the lighting and shadows reaching a point in space to be illuminated. The shadow and lighting quality is mainly controlled using the RED::OPTIONS_RAY_LIGHTS_SAMPLING_RATE
. However, each light has an internal samples counter that will be used whenever the RED::OPTIONS_RAY_LIGHTS_SAMPLING_RATE
is set to zero:
RED::IPhysicalLightShape::SetSamplesCount
RED::ISunLightShape::SetSamplesCount
RED::ISkyLightShape::SetSamplesCount
HOOPS Luminate GPU rendering uses different approaches, because GPUs are not flexible enough to implement rendering solutions similar to those used by HOOPS Luminate on the CPU. Each physical light has a GPU equivalent light used to represent it approximatively:
Physical lights are turned into point lights (with the noticeable exception of rectangular physical lights turned into rectangular area lights)
Sun lights are turned into directional lights
Sky lights are turned into…sky lights, but GPU version. The GPU skylight has a good lighting approximation of the CPU skylight, and uses the soft shadowing technique of HOOPS Luminate to produce approximated soft shadows on the GPU. The result runs at an interactive - not real-time - performance
Portal Setup for Skylights
Portals are significantly helping the rendering of indoor images that contain openings toward the outside. A portal is a mesh in the scene that is declared as a “portal” for the skylight. When declared as a portal for the skylight, the skylight will fire rays through the portal rather than through the hemisphere as it would do without portals. This is illustrated below:
Consequently, if portals are placed through openings of the scene, all the rays fired for the skylight illumination will effectively reach an opening in the model. So all the rays will be meaningful as no rays will be wasted hitting walls.
When portals are set in a scene, all openings must be covered by portals, otherwise openings not covered won’t be sampled and will be considered as occluded regions of the model, which could lead to unwanted effects in the image.
See the tutorial on portal setup here: Using Skylight Portals.
Note that portals of a skylight are approximated on the GPU:
Rectangular portals made of 2 triangles are rendered using rectangular GPU area lights, with an average intensity calculated from the source skylight skymap.
Non rectangular portals are turned into point lights in the model, using the same intensity approximation.
IES profiles support
The physical light can use LM-63-02 format IES profiles. The RED::IPhysicalLightShape::SetIES
method can be used to associate an IES profile to a given physical light.
IES profiles are rendered on the CPU and on the GPU.