To anyone using the flashlight by "the zombie killer" or the lamplight from the "Lasting Light" mod or something similiar, here is one thing I discovered and it helps, when light does not affect middle textures:
It seems to me that the reason is the image format!
I created a texture that shows a plant in PNG format with transparency:
https://fbcdn-sphotos-d-a.akamaihd.net/ ... 7368_n.jpg
pointing the flashlight on it does have no effect:
https://fbcdn-sphotos-h-a.akamaihd.net/ ... 8977_n.jpg
After trying around with 3d floors and linedefs, I had a new idea, I tested it on an original Texture from doom 2 that also has transparent areas and I got this:
https://fbcdn-sphotos-b-a.akamaihd.net/ ... 3538_n.jpg
so to get a dynamic light affecting my tree, I have to convert the image to doom format and it works, the tree is being affected
(something went wrong with the colors, but this is not the point now):
https://fbcdn-sphotos-g-a.akamaihd.net/ ... 9604_n.jpg
How to make dynamic light affect PNG middle textures
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- WARCHILD_89
- Posts: 452
- Joined: Sun Nov 17, 2013 12:27 pm
- Graphics Processor: nVidia with Vulkan support
- Location: MIA between doomed dimensions
Re: How to make dynamic light affect PNG middle textures
Not so much the image format (everything is converted to an internal bitmap-like format anyway) but the image properties. Namely, full alpha channel or not. The Doom graphics format has no alpha channel to speak off: pixels are either fully transparent or fully opaque.
Re: How to make dynamic light affect PNG middle textures
How come the dynamic light only illuminates textures without full alpha? Seems like a bug...
- WARCHILD_89
- Posts: 452
- Joined: Sun Nov 17, 2013 12:27 pm
- Graphics Processor: nVidia with Vulkan support
- Location: MIA between doomed dimensions
Re: How to make dynamic light affect PNG middle textures
I wonder how I can make an image behave like the doom textures, does anybody know what kind of image format to use?
- Marrub
-
- Posts: 1202
- Joined: Tue Feb 26, 2013 2:48 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Arch Linux
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: How to make dynamic light affect PNG middle textures
I think there's a way to remove the full alpha channel (and just have binary opacity) from a PNG to make it act like a doom-format texture, but I don't exactly know how. Color Quantizer on very slow setting might remove it if it isn't needed.WARCHILD_89 wrote:I wonder how I can make an image behave like the doom textures, does anybody know what kind of image format to use?
- WARCHILD_89
- Posts: 452
- Joined: Sun Nov 17, 2013 12:27 pm
- Graphics Processor: nVidia with Vulkan support
- Location: MIA between doomed dimensions
Re: How to make dynamic light affect PNG middle textures
I finally did it. The thing is to safe the png file not with transparency, take a color instead. I took white for example.
Then, convert the png in SLADE 3 to PNG Truecolor, (otherwise the image turns black and white) set the transparency color to white (in my case) and there you go, all the white areas in the image are transparent now!
https://fbcdn-sphotos-a-a.akamaihd.net/ ... 6727_n.jpg
Then, convert the png in SLADE 3 to PNG Truecolor, (otherwise the image turns black and white) set the transparency color to white (in my case) and there you go, all the white areas in the image are transparent now!
https://fbcdn-sphotos-a-a.akamaihd.net/ ... 6727_n.jpg
- Marrub
-
- Posts: 1202
- Joined: Tue Feb 26, 2013 2:48 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Arch Linux
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: How to make dynamic light affect PNG middle textures
Yep, that's a way of doing it. Still seems like a bug though.
Re: How to make dynamic light affect PNG middle textures
Oh, it is. I'm just pointing out the real cause of the discrepancy. There are different paths to render images with full alpha and images without full alpha.Nash wrote:How come the dynamic light only illuminates textures without full alpha? Seems like a bug...