Coloured brightmaps - "legal"?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Enjay
There is no dark side in the moon, really...
Developer
Developer
Posts: 4627
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Coloured brightmaps - "legal"?

Post by Enjay » Mon Nov 04, 2013 23:34

Despite the fact that every brightmap I have seen to date is greyscaled, I just noticed by accident that coloured brightmaps can be used to apply coloured brightness to sprites.

The following screenshot was obtained by using the square in the corner as a brightmap.

Image

I'd like to know if this is an acceptable use or if it is something considered unsupported?

The reason I ask is that sometimes there is a lack of precision that detracts from the appearance of a brightmapped sprite. e.g. if a monster has single pixel red eyes, these can be made to glow menacingly with a brightmap consisting of 2 white pixels in the right place on a brightmap. However, sometimes (presumably due to rounding errors or something) the brightness "spills out" slightly onto surrounding pixels making their edges glow slightly. Usually these are in a colour different to the eyes (e.g. zombie skin) and so them being bright can be quite obvious. If it was acceptable to make the dots on the brightmap red, then even if there was a bit of "spillage" of brightness onto surrounding pixels, at least they would be coloured red and so would not look as obvious (and may even look like light from the eyes illuminating the surrounding eye sockets).

If it is "legal" I just wish that I'd discovered it earlier. :?

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Coloured brightmaps - "legal"?

Post by Graf Zahl » Tue Nov 05, 2013 10:17

It's perfectly legal. Restricting to grayscale would be an artificial limitation. So if you got a monster with a strongly green tinted attack you may well use a green brightmap for proper effect.

User avatar
Enjay
There is no dark side in the moon, really...
Developer
Developer
Posts: 4627
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Coloured brightmaps - "legal"?

Post by Enjay » Tue Nov 05, 2013 10:41

Good to know. Thank you very much.

Like I said, I just wish I'd noticed earlier. I don't plan on going back to edit thousands of images. I may do a few important ones though. Thanks again. :)

Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Coloured brightmaps - "legal"?

Post by Gez » Tue Nov 05, 2013 12:26

Now that deserved an update of the wiki article which only mentioned grayscale.

(Generally, grayscale will still be the most appropriate since colored lighting from monster attacks tends to be baked on the sprite itself, for the software renderer's benefit, so a colored brightmap would apply double tinting.)

Locked

Return to “GZDoom”