Black & Additive + Invulnerability = Problem

Bugs that have been resolved.

Moderator: Graf Zahl

User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Black & Additive + Invulnerability = Problem

Post by Tormentor667 »

I am not sure if this has already been discussed before but I consider this more as a bug than a problem modders should take care of, as it doesn't work as intended. Here is a screenshot of the problem:
Image
If you take a closer look, you can see lots of rectangular sprites floating in the air. Regularly, these floating things are dust clouds, which use the additive blending. Without the invulnerability sphere, these look perfect, as black isn't visible anymore. In the invulnerability mode, these sprites get inverted and therefore black gets white and the effect gets totally killed. Is there a way to fix this in the engine rather then the sprite itself?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: Black & Additive + Invulnerability = Problem

Post by Graf Zahl »

If you don't define translucent parts in your texture as such you might get anomalies. I can't fix this in the engine. Black is a perfectly valid color so I can't just make it translucent on a whim as it causes problems elsewhere.
User avatar
Rachael
Developer
Developer
Posts: 3651
Joined: Sat May 13, 2006 10:30

Re: Black & Additive + Invulnerability = Problem

Post by Rachael »

Shouldn't additive translucency become subtractive, anyway, though?

When you invert everything, all you're doing in GZDoom or ZDoom itself is doing it with the textures. However, in consideration, you're also inverting the entire screen. I know you can't fix every single little anomaly/niggle/whatever you're gonna get, but this one should be reasonably easy to fix. I know it's not a question of coding because I could get the code to do that in there pretty darn quick, it's more a question of whether it makes sense.
User avatar
Enjay
Developer
Developer
Posts: 4753
Joined: Tue Aug 30, 2005 23:19
Location: Scotland

Re: Black & Additive + Invulnerability = Problem

Post by Enjay »

This was an issue I raised some time ago.

http://forum.drdteam.org/viewtopic.php? ... 23&p=23856

I have noticed a lot of mods using black as transparency and forgetting about what it would look like in an inverted palette mode. However, in many cases the fix is reasonably simple from a modding POV: instead of using black, use transparency in your sprites.

Unless you use properly translucent sprites too, you will never clean it up perfectly. Ultimately, the invulnerability palette inverts the colours. So, black becomes white (ie, the main problem) but dark colours become light. So, you can't prevent those dark colours becoming light and you have to accept that things will look odd in invulnerability mode but you can fix the worst problem of a big white square around your sprite.

Another fix (or work around) would be to use a non-inverted palette on a custom invulnerability powerup - eg the goldmap from Heretic. However, this will not fix the issue for people who use the enhanced night vision mode in GZdoom because it also uses an inverted palette so I suggest both fixing the sprites and making a custom powerup.
User avatar
Rachael
Developer
Developer
Posts: 3651
Joined: Sat May 13, 2006 10:30

Re: Black & Additive + Invulnerability = Problem

Post by Rachael »

Well with night vision it's different - and I say, yeah, you're at your own fault if you do not fix your sprites for that. You can get away with it by not including light goggles in your mod but there's always going to be somebody who cheats, and hey, we don't need to cater to them, do we? :)

Return to “Closed Bugs”