ZDRay

ZDRay is a experimental lightmap compilation utility and node builder by Magnus Norddahl (dpJudas). It is based on ZDBSP for the node generation and a lightmap compiler called DLight. It allows and shadows to be baked in a WAD file. Unlike dynamic light however, baked lights generated by ZDRay are static, but they can have multiple bounces and support surface based area lights.

The utility was abandoned when issues arose regarding the lighting of sprites along with supporting all the slope variations that ZDoom allows, which was requested by Graf Zahl. A compiled version of the tool exists, along with a custom GZDoom build that supports ZDRay.

The supplied build of GZDoom carries version number, dated October 30, 2018. It is a development build towards version 3.8.0 and should be compatible with GZDoom version 3.7.0.

Usage
In order to use ZDRay, you make your map in the GZDoom Builder-Bugfix variant of Doom Builder 2, although Ultimate Doom Builder may also work. ZDRay picks up certain UDMF properties from the map itself and sunlight properties from MAPINFO. In order to get baked lights, you will have to place them in your level first. This can be done in two ways:


 * You set your lights in Doom Builder to static
 * You tag surfaces (sectores or lines; UDMF only) to be light emitters

A possible workflow is to place dynamic lights first, and then convert these lights over to UDMF static lights, which you will have to do by hand.

You can then run your level through ZDRay and lights are then baked. The custom GZDoom build will then be able to read the data to draw complex shadows. This is similar to the workflow of creating lightmaps in Quake or Unreal.

Limitations
ZDRay poses several restrictions, some of which are inherent on using an offline lightmap renderer:
 * Baking lightmaps and shadows is a costly CPU-intensive process. If you have a complex map with hundreds of static lights, expect compilation time to be significant. Since ZDRay uses the CPU to calculate the lightmaps, dedicating more CPU cores to the baking process will decrease the compilation time
 * Won't work on all ZDoom slopes
 * Sprites may not get correctly lit
 * Setting up lights needs to be done manually in-editor
 * You need to manually key in unsupported args into the things on the map
 * You must create a lightconfig.txt file. It can be empty but you must at least insert 1 line
 * Shadows are static, meaning that moving lifts or doors will not cast shadows