Page 1 of 1

What is the actual advantage of using brightmaps?

Posted: Fri Jun 17, 2022 11:42 am
by RKD
I was curious about why some mods/projects have weapon sprites that look too dark at first glance. Then I realized those are combined with brightmaps included in a separate folder and what we see in-game is an overlay of the brightmap "layer" on top of the weapon sprite, as a sort of graphical patch.
I understand how bm are used and it's sort of intuitive to figure out why you'd want to use them in cases where you have a single sprite but want to alternate muzzle flashes or intermitent lights. The thing is that I've also seen the usage of brightmaps in weapons where each single frame is a different sprite.

So my question, more specifically, is: Why bother with two separate sprites (weapon+bm) for a single frame instead of making whatever light effect you desire in the actual weapon sprite? Is it perhaps a way to bypass some limitation that I haven't thought of (like palette colors or something)?

Re: What is the actual advantage of using brightmaps?

Posted: Fri Jun 17, 2022 12:29 pm
by Chris
RKD wrote:So my question, more specifically, is: Why bother with two separate sprites (weapon+bm) for a single frame instead of making whatever light effect you desire in the actual weapon sprite? Is it perhaps a way to bypass some limitation that I haven't thought of (like palette colors or something)?

More detailed lighting, perhaps, to simulate self-lighting. With separate weapon+bm sprites, the bm areas will remain bright in dark areas, while the dark areas of the bm will be light or dark depending on the room/sector. The player weapon sprite may not get as dark in dark rooms compared to monsters and decorations, but they do get slightly dimmer. If they were combined, the lit areas would get dimmed (if it's not set full-bright), or the unlit wouldn't get dimmed (if it is set full-bright).

Re: What is the actual advantage of using brightmaps?

Posted: Fri Jun 17, 2022 12:36 pm
by fakemai
Do you have any examples of what you mean? Brightmaps are used to change how, well, brightness is applied to parts of a sprite, typically for bright light effects where having them at sector light level would look stupid. A great example are the external add-on ones for DoomRL Arsenal, I load them standard with it for a reason. It is not limited to just that though and I could see it used to add greater depth to how the sprites are lit, what would normally be baked into the graphic no matter what sector brightness they were shown in.

Re: What is the actual advantage of using brightmaps?

Posted: Fri Jun 17, 2022 1:08 pm
by RKD
fakemai wrote:Do you have any examples of what you mean?

I've been fiddling around with several mods/standalone games in Slade out of curiosity, so I kinda have them all meshed together in my mind, haha.

In any case, both of you mentioned the thing I wasn't accounting for: having parts of a weapon that should always be lit in specific frames unaffected by ambient lights in a map. It makes a lot more sense in my head now. That settles it. Thanks a lot for the clarifications!