This is mostly bug fixes, and some of those date back to original Relighting code. These include refactoring how patch files are read, correcting colors, and correcting miscellaneous shadow-related issues. Generally the top third of decorative sprites are read for color, and this produces purer colors for torches. I've also added a library that reads PNG files (including decompressing the image itself); for this version it reads and analyzes brightmap files to exclude textures as light sources.
0.6.2
10/13 - fixed truncated double in shadow code
10/14 - added sprite color to decorative light routine
10/14 - exclude self as light source in shadow code
10/17 - added hd_png class to identify PNG images
10/20 - added converted Python zlib.decompress() for PNG pixel data (https://pyokagan.name/blog/2019-10-18-zlibinflate/)
10/22 - added brightmap exclusion criteria
10/22 - removed placement and colorizing exclusions
10/22 - corrected casting sprites in shadow
10/23 - corrected shade() function to keep same hue
10/23 - excluded light source textures from colorization
10/26 - corrected patch color reading function
10/27 - simplified menu options, exposed shadows, bias lighting options
The options menu has been greatly simplified. One thing I've done is added sliders for bias lighting so you can adjust how dark or bright levels are. I've chosen defaults that are somewhat brighter and allow colors to stand out.
This has been tested with Ultimate Doom, Doom II, Sigil, and a handful of other maps and mods. It has only been tested with bmplustextures; I will write a regex engine for the next version to be able to more easily read text files. Anyway very likely there are bugs even though I have greatly improved the code and performance in this version.
This newer version looks great, however it seems trying to run texture mods like paralax doom seem to cause crashes, runs perfectly fine with out them, errors of "Array access out of bounds. Size = 3 current = 256, this only happens with texture packs, 6.1 ran perfectly with them, so not sure why it's acting up.
I.imgur.com
This version should ignore PNG files that are not sprites (a bug) or brightmaps. What texture packs are you getting errors with? I'll check it out.
I was running the Doom Paralax mod the 512 resolution one and PBR pack, makes textures look shiny, but I'll try your method noted below.
It appears to also crash when using Brightmaps textures pack, not entirely sure why but I thought letting you know.
See issue below. This version ignores PBR etc. textures but may try to read a sprite PNG depending on the GLDEFS file of another mod. This is not related to bmplustextures, which matches IWAD/WAD textures.
Alright cool I'll wait for the update I really do like the new lighting you get from objects now, seems to cast it more naturally, especially with lights on the walls and lamp posts.
Note that you can try commenting out 'add_decorativelights();' in hd_relite_Events.zs. There is a bug where the sprite namespace isn't checked before loading an LMP file. That will be fixed for the next version.
Shadows with Voxel Doom look all ****** up for me: Pasteboard.co
You'll need to run the rl_assets Python utility that comes with the mod or just turn off shadows on the Options menu. This utility creates blurry shadows that work with any mod using sprites for animation frames, including Voxel Doom and other model-based mods. It substitutes the new sprites for those in the DECORATE lumps. It's easy and looks amazing.