[various?] Sprites losing transparency.

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Cutmanmike
Posts: 11353
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

[various?] Sprites losing transparency.

Post by Cutmanmike »

http://forum.zdoom.org/viewtopic.php?f= ... a&start=90

Scroll down to phobus' post (How do you get links to posts on this forum anyway?). Though I can't get this to happen on my machine but many people are suffering this odd problem (yet no one has filed a bug report!). Sprites eventually start to lose their transparency, even the doom stock sprites.
phobus wrote:One problem I found though.

Seems that most of the sprites in the game (including one or two doom sprites) have no transparency. When I was playing a lot of the sprites showed black boxes filling the rectangular space round them... which was a bit weird. Ones that definitely showed it (albeit irregularly) were as follows:

The grey tree sprite
The rocket sprite
Most of the hobo's sprites and rotations
All of the bottles sprites
Some of the commando's sprites and most of the 'police' sprites as well
The fire sprites before they settled as burning fires
The bricks sprites whilst in air
The bloodsplats
The jetpack and jump pickup

Now, as some of these aren't even included in your wad, I do wonder if that might be GZDoom rather than you... so I'll have a test in a few other things to see what's up.

EDIT: Ok, a fair few checks have turned this up for me. It's just Night of the Homeless that does it, and it's pretty much every sprite in the game. No idea what's causing it... I did extract all of the files and then put them into a pk3 myself though (the night of the homeless ones). Shouldn't think that'd make any difference to the standard Doom trees
neoworm wrote:It Happened to mě too, its probably some Hardware/Software problem. Maybe some memory leak because sometimes the sprites work well and the black boxes appear only when there are many sprites on screen/in game.
BoldEnglishman wrote:I have also seen these black boxes, and as mentioned before, I don't see how this project would affect stock sprites. Sometimes, the black boxes flash on and off, sometimes they stay on (and stay on until the end of the level). I have never seen this before either, and I don't think it's because there are too many sprites on the screen (this hardly competes with some of the levels like nuts or scythe).
wildweasel wrote:I'm getting the bug too, running an NVidia Geforce 7900 GS - and this is the first time I've seen a glitch quite like this one. I don't think it's hardware. For what it's worth, though, the bug doesn't happen in the ZDoom SVN that I'm running (which is horribly out of date now). On that note, however, I managed to freeze ZDoom by blowing up the parking lot full of cars in Downtown (which has never happened in GZDoom).
And many more, so this can't be a machine issue can it?
User avatar
MG_Man
Posts: 1401
Joined: Sat Jul 28, 2007 1:24 pm
Contact:

Re: [various?] Sprites losing transparency.

Post by MG_Man »

I have a BFGTech nVidia GeForce 7300 GT and I don't have this problem.

But the squares are black, and that probably means you need to mess with hardware acceleration.
Last edited by MG_Man on Sat Dec 29, 2007 12:25 pm, edited 1 time in total.
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: [various?] Sprites losing transparency.

Post by Jimmy »

I just started getting this with Jurassic Rift as well.
User avatar
MG_Man
Posts: 1401
Joined: Sat Jul 28, 2007 1:24 pm
Contact:

Re: [various?] Sprites losing transparency.

Post by MG_Man »

Right, anyone experiencing this issue should try this:

Right click your desktop.
Properties>Settings>Advanced...>Troubleshoot

Turn on Write Combining and put Hardware Acceleration to full. If it already is, try making it lower to see if this fixes it. Try every step on the bar.
User avatar
Enjay
 
 
Posts: 26998
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [various?] Sprites losing transparency.

Post by Enjay »

The issue was caused when Bagheadspidey added sprites for a thrown bottle projectile. If these sprites are reduced to normal paletted PNG images, the problem goes away.
User avatar
bagheadspidey
Posts: 1490
Joined: Sat Oct 20, 2007 10:31 pm
Contact:

Re: [various?] Sprites losing transparency.

Post by bagheadspidey »

Those bottles look fine in the software renderer. Are you saying if I convert them to indexed, the black box some of you are seeing should go away?

I'm not sure the issue is whether they are indexed. It probably has more to do with the use of an alpha channel. I'll upload some stuff to test with.
ThrownBottle.indexed.noalpha.zip
(8.86 KiB) Downloaded 26 times
ThrownBottle.indexed.alpha.zip
(10.16 KiB) Downloaded 28 times
ThrownBottle.full.noalpha.zip
(6.55 KiB) Downloaded 26 times
Last edited by bagheadspidey on Sat Dec 29, 2007 5:50 pm, edited 1 time in total.
User avatar
Enjay
 
 
Posts: 26998
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [various?] Sprites losing transparency.

Post by Enjay »

Well, I reduced them to 256 colour indexed images and then stuck them back in the zip/pk3 and the problem went away. As to exactly what it was about the originals that caused a problem, I don't know, but what I did certainly cured it.
User avatar
bagheadspidey
Posts: 1490
Joined: Sat Oct 20, 2007 10:31 pm
Contact:

Re: [various?] Sprites losing transparency.

Post by bagheadspidey »

Enjay wrote:Well, I reduced them to 256 colour indexed images and then stuck them back in the zip/pk3 and the problem went away. As to exactly what it was about the originals that caused a problem, I don't know, but what I did certainly cured it.
256 color indexed images can have alpha channels, but almost all image editors will strip the alpha channel. Unless you used a tool called "pngquant" to convert them to indexed, they probably lost their alpha channel, which is probably what fixed the issue (im guessing). Feel free to try the samples in that last post if you are curious what caused it; I don't have the problem so I can't test this myself.
User avatar
Enjay
 
 
Posts: 26998
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [various?] Sprites losing transparency.

Post by Enjay »

OK, none of the above attached files exhibit the problem for me. I tried each one and played for a bit, making sure that I'd seen the bottles in game and gave the game plenty of opportunity to show the problem: it didn't. I went back to the original sprites included with your mod and the problem came back.
User avatar
bagheadspidey
Posts: 1490
Joined: Sat Oct 20, 2007 10:31 pm
Contact:

Re: [various?] Sprites losing transparency.

Post by bagheadspidey »

huh, not what I expected but good to know. So, I guess if you want png alpha channels to work for everyone, the png must be converted to indexed, as you said earlier. I wonder if the alpha channels really work, or if they are just ignored by zdoom when dealing with indexed pngs? Judging by your tests, full color pngs seem to work ok also as long as there is no partial transparency. Anyway, I'll convert my images to indexed pngs with alpha from now on, hopefully that will work for everyone.

Edit - it looks like zdoom ignores the alpha channel in indexed pngs, making them look like shit. I think full color, no alpha is the way to go.
User avatar
MG_Man
Posts: 1401
Joined: Sat Jul 28, 2007 1:24 pm
Contact:

Re: [various?] Sprites losing transparency.

Post by MG_Man »

Come on guys, it isn't your sprites, it's the way people's hardware is configured. Otherwise it would be happening to everyone, but it isn't.This does not happen to me in ZDoom or GZDoom in any way, shape, or form. Nor to a friend of mine. Or other people I know.
User avatar
bagheadspidey
Posts: 1490
Joined: Sat Oct 20, 2007 10:31 pm
Contact:

Re: [various?] Sprites losing transparency.

Post by bagheadspidey »

MG_Man wrote:Come on guys, it isn't your sprites, it's the way people's hardware is configured.
I think it's definitely a combination of both. Even so, if enough people have their hardware (mis)configured like this, it's probably best to avoid the problem altogether by not using alpha channels, unless they can be used in a way that works for everyone.

I'm curious, though - do the alpha channels "work" in hardware mode for you, MG_Man? I mean, are the edges of the bottles semi-transparent?

Software mode renders any semi-transparent pixels as fully opaque when dealing with indexed pngs. This does not look good. When dealing with full color pngs, it seems to cut transparency off around 50%, making pixels more than 50% transparent fully transparent, and pixels less than 50% transparent fully opaque.
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Re: [various?] Sprites losing transparency.

Post by Kinsie »

I tested the mod on both zdoom and gzdoom, and never got this problem. Very strange.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [various?] Sprites losing transparency.

Post by Graf Zahl »

Can you please *all* say which revision you are using? There have been some changes to the texture code recently and it might be related. But as long as everyone says 'works for me' or 'doesn't work for me' it's of no help.

Also it might also be useful to know if you use the D3D rendering path or the old DDraw rendering path. For the new revisions it's easy to test. Type 'give berserk' at the console. If the status bar becomes red it's DDraw, otherwise D3D.
MDenham
Posts: 161
Joined: Sun Oct 14, 2007 2:23 am

Re: [various?] Sprites losing transparency.

Post by MDenham »

Cutmanmike wrote:(How do you get links to posts on this forum anyway?).
Near the top left corner of each post is a little page icon. Right-click it and copy the link for a link to that post.
Post Reply

Return to “Closed Bugs [GZDoom]”