
We are pleased to announce Dark Lights for Dark GDK. Dark Lights adds a suite of new light mapping functions and features to Dark GDK, and also includes a versatile lightmapping tool with full source code. Here are some of the features that Dark Lights supports:
- Three types of light: Directional, Point and Spot Lights
- Variable attenuation point lights, both quadratic and linear attenuation are avaible.
- Curved surfaces are smoothed correctly.
- Realistic shadows and variable shadow blurring.
- Transparent objects that modify the colour of the light ray as it passes through it.
- Uses very fast ray casting to achieve quick build times
- Start the light mapping as a thread so you can display its status whilst it works.
- Ambient occlusion for realistic global lighting.
Lights
The light mapper supports three types of lights, point lights which emit light equally in all directions and reduce in bightness over distance, directinonal lights which shine in a particular diretcion over all distances equally, and spot lights that shine in a particular direction like a flash light.
Attenuation
You can set the attenuation for point lights to control how light fades over distance from the light source. You can set the parameters for quadratic, linear, or no attenuation and the radius over which the light has effect.

Transparency
You can add transparent objects that allow light through but modify the colour of the light on its way through. This can be used for stained glass windows that create a pattern on the floor behind when a bright light shines through them. There are three modes of transparency available, black colour key transparency that blocks or allows light through, alpha mapped texture for transparency that varies over the object and colours the light, and semi-transparent with consistant transparency over the object and colours the light.
Curved Surfaces
The light mapper reads the vertex normals of the objects that are being light mapped and colours curved surfaces accordingly. You can also set the quality for curved surfaces to be higher than that for flat surfaces to make sure there are enough pixels to smooth the surface correctly.
Self Shadowing
Objects can cast shadows over each other or be set to only receive light and not cast shadows. You can set the shadow bluring to remove any sharp edges that are created in the transition between light and dark. Soft shadows can be achieved by either bluring or by using multiple point lights instead of a single point light to smooth the transition of shadows.
Speed
The light mapper uses a fast ray casting engine to quickly work out if a point will be in shadow and allows many lights to be used whilst still maintaining quick build times in the order of minutes for complex scenes and seconds for simple scenes.
Threading
The light mapper allows you to start the light map process as a thread so that you can continue to display its status on screen whilst it is in progress. You can end this thread at any time before its completion allow you to cancel it without ending your program.
Ambient Occlusion
A form of global illumination, ambient occlusion creates realistic shading on surfaces by testing how much of a global light each point can see. Those points in corners or holes will see less of the global light and be darkened accordingly.
You may be wondering what use these sorts of functions would be in Dark GDK. After all, even the fastest lightmapping routines would still take too long to be run in-game on complex levels. However there are many applications for this extension. A large number of people when creating games, build their own 'game editors' as well. Using this you could now add sophisticated light mapping functions directly into your tools. You could write your own stand-alone light mapping application with this. Write your own interface and use this extension to handle the actual mapping.
You could of course use it in-game if your game suits it. For example in a simple scene, dynamically generated, you could lightmap the entire level before the player even gets to start it. The threading options available mean you could even be doing this while the player is going through the intro sequence / game menu.














