ZDRay

From ZDoom Wiki
Jump to navigation Jump to search
Graficon.gif Warning: This feature is GZDoom specific, and is not compatible with ZDoom!
To see all of GZDoom's specific features, see GZDoom features.
DoomWiki.org
For more information on this article, visit the ZDRay page on the Doom Wiki.

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 MiniWikipediaLogoIcon.pnglightmaps 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.

History

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

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

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. You either set your lights in Doom Builder to static, or 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.

Several restrictions are in play: Not all ZDoom slopes are supported, and sprites may not get correctly lit. A lightconfig.txt file needs to be created prior to using ZDRay. It can be empty, but you must at least insert 1 line.

Lastly, 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.

External links