Lightsources

DirectionalDirectional light source
PointPoint light source
SpotSpot light source
Lighting GroupDefine a group of light sources

Lighting in Realtime Rendering is a very efficient but rather simple approximation of real life lighting. There are no global effects like one object casting a shadow onto another or light bouncing of one surface and lighting another. It is therefore often called direct lighting opposed to global lighting as used by raytracing software.

Lighting is computed once per vertex, all interior pixels of a triangle interpolate the values calculated at the vertices. The quality of shading of objects therefore is dependent on the quality of the tessellation. In other words, the more refined the geometry is, the smoother the lighting will be.


A triangle can be lit by one or multiple light sources. The final color of a pixel in a triangle is dependent on the shape of the objects surface, the characteristics of the light sources as well as the Material applied to the object. For each light source, a number of terms is calculated:

When there is no light source node in the scene, Ventuz uses an internal default light source. This so called head light is positioned at the exact position of the camera, therefore shiny objects (with a high specular amount) can appear completely white.


Both the light source and the material have a color assigned to all of these terms. In addition, the material of an object can have an Emissive term that simulates light coming from the object itself.

Types of Lightsources

In order to make lighting calculation feasible, the travel of light rays through a scene cannot be simulated. Instead the terms above try to simulate the variation of brightness on a surface. The role of the light source is to specify from what direction the light falls on to the surface.

Lightsources are immaterial and therefore no geometry is rendered for them. To see the orientation and shape of a light source, select the node and activate the bounding box visualization.


The Directional light represents a light source that is so far away that the light rays are completely parallel to each other and the actual position of the light source becomes irrelevant. The most prominent analogy is the sun.

The Point light represent a lamp that is infinitely small in size. It emits rays into all directions, originating from a single point in space. Same as the Directional light, it has no surface area to simplify the calculation. The direction of light for a point light at any given point on a surface is equal to the vector from the point lights position to that point on the surface. A rough analogy might be a light bulb or a candle.

The Spot light differs from the point light in that it only emits light in a cone shaped volume instead of all directions uniformly. The InnerCone specifies the radius of the region that is lit at full intensity which then decreases to the OuterCone radius where the light influence of the spot ends. It also simulates brightness decreasing the farther away something is from the spot (Attenuation) and the more it is offset from the center axis of the spot towards the boundary (FallOff).

The example below shows the same scene lit by a Direction light coming hard from the left, a Point light above the scene and a Spot light coming from the right.


If ApplyAxis is active, the light source will be transformed by the World Matrix as for example influenced by Axis Nodes. Otherwise the light source will only be affected by the View and Projection matrices.

Using Multiple Lightsources

Multiple lightsources can be added to a scene, for example as main and fill lights as often used in a photo shoot. However, they can also be used to light seperate parts of a scene differently. For example, a spot light may be used to light only one object but not affect another object, although it would theoretically be in the cone of the spot. Instead the second object could be rendered using a completely different light setup.

Lightsources are special in that they affect all nodes that are rendered after them, not just their child nodes. They are not deactivated once their subtree has been processed.


Each light source has an Input Property Index which specifies whether the light should be used in addition to pre-existing lights (Next) or should replace the last activated light (Override). To limit the effect of light sources to certain parts of a scene, Lighting Group nodes can be used. If their Inherit property is deactivated, lights defined outside the lighting group will have no effect on the objects rendered within the lighting group. The example below shows a scene with four differently colored light sources. In the top row, each light source illuminates each sphere that comes after it in the rendering order. In the bottom row, Lighting Groups have been used to isolate each sphere together with one light source in a separate group.