ZDRay
From DoomWiki.org
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 lightmaps and shadows to be baked in a WAD file. Unlike dynamic light however, baked lights and shadows generated by ZDRay are static, but they can support an indirect bounce of lighting and support surface based area lights.
History[edit]
The utility combines ZDBSP and a modified DLight lightmap compiler, which was used in Doom64 EX and Strife: Veteran Edition. 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 g3.8pre-49-gd95967f2c or 3.7.9999.0, dated December 30, 2018. It is a development build towards version 3.8.0 and should be compatible with GZDoom version 3.7.0.
2021 updates[edit]
As part of wanting to enhance his game ElderJam, Nash Muhandes and Magnus Norddahl (dpJudas) started working on ZDRay again, enhancing it further to test if integration in GZDoom and Ultimate Doom Builder is possible. A new experimental build was produced, dated October 3, 2021 carrying version number g4.8pre-25-g247deff5b or 4.7.9999.0.
Usage[edit]
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[edit]
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
See also[edit]
External links[edit]
- ZDRay source code, at GitHub
- DLight configuration file specification More detailed usage of lightconfig.txt, at GitHub
- ZDRay at the ZDoom wiki