Custom decals: semi-transparency not working

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Custom decals: semi-transparency not working

Re: Custom decals: semi-transparency not working

by Graf Zahl » Sat Feb 25, 2017 12:01 pm

Another one that should be done properly after QZDoom gets merged back.

Re: Custom decals: semi-transparency not working

by Graf Zahl » Thu Dec 17, 2009 5:17 pm

I think this is better placed in Feature Suggestions rather than bugs. After all, this works as intended, it's just that this is a sub-optimal solution...

Re: Custom decals: semi-transparency not working

by TheDarkArchon » Mon Nov 02, 2009 8:13 pm

Ursula Pittgold wrote:In 1957, decals are all rainbow-y. :(

- Nash
I believe colour film was starting to get popular around that time, rainbow colour everything was in at that time. (cue rimshot)

Re: Custom decals: semi-transparency not working

by Guest » Sun Nov 01, 2009 7:04 am

In 1957, decals are all rainbow-y. :(

- Nash

Re: Custom decals: semi-transparency not working

by Graf Zahl » Tue Oct 20, 2009 11:35 am

I know. What I meant was to make the decision what type of texture to create depend on the situation.

All situations in which alpha shaded textures are used are flagged by the renderstyle flag STYLEF_RedIsAlpha. That is the only information I use in GZDoom to create an alpha shaded texture and the alPh chunk is simply ignored. Of course this would mean some changes to the way software renderer textures are created because the texture can exist in 2 states (normal and shaded.)

I'm just thinking that this report is ample proof that the alPh chunk is not a user friendly method when they want to do their own decal textures.

Re: Custom decals: semi-transparency not working

by randi » Tue Oct 20, 2009 11:04 am

If the PNG spec would allow for images with an alpha channel but no color information, I would just use that. But since it doesn't, I had to create the alPh chunk to flag grayscale images as alpha channels that shouldn't be remapped to the palette.

Re: Custom decals: semi-transparency not working

by Xaser » Mon Oct 19, 2009 9:28 pm

I remember having some trouble with something like this a while back, and questioned exactly why the software renderer required the use of the alPh chunk. Randy had a bit more to say about it here, and as far as I can tell, perhaps the same applies here?

Re: Custom decals: semi-transparency not working

by Graf Zahl » Mon Oct 19, 2009 2:45 pm

The software renderer requires that such graphics need to be marked with an alPh chunk. That can be done with the setpng tool.

GZDoom doesn't use this chunk at all and treats alpha shaded graphics just as a different colormap so it's working there (but as you noticed this method can't handle images with per-pixel translucency.)

Maybe the software renderer should consider a different method here that doesn't require specific modification of the image.

Custom decals: semi-transparency not working

by Guest » Mon Oct 19, 2009 2:35 pm

I have been trying to make custom decals and have replaced the 'CHIP' and ' BSPLAT's but I cannot get them to be displayed properly in the game. I know how it should work in theory but it doesn't work in practice. I have tried several way to improve it but the results are completely confusing and make no sense.

My latest attempt can be found in this testwad.
Can anyone please have look and tell me what is wrong an how to fix it.

Currently the decals are displayed in the game in only 2 colors.
For the bullet CHIPs the black is displayed as black, while it should be transparent
and the white looks transparent while it should be black. Furthermore there is no 'in between'; pixels are either black or transparent, but never semi-transparent.
The same goes for the blood splatters (only with the color red instead of black).
One funny thing with the blood splatters is that they are displayed in red (wrong pixels though) in my project, but black when used with the original zdoom. Perhaps because my project uses a different palette?


Saving them with different image programs doesn't work. Running the pictures from a zip instead of a wad doesn't work. Inverting the palette doesn't work.

I asked Enjay for help and he is just as confused as I am.
He e-mailed me:
The graphics seem to work in GZdoom.
The graphics show the problems that you detailed in ZDoom.
Nothing that I did with different palette values, bits per pixel values etc fixed the problem.
Saving them as TGAs did not solve the problem.
Saving them as paletted PNGs with built in transparency made them look a bit better but they broke in GZdoom.
Saving them as Doom format graphics did seem to resolve a lot of the problems but they would need a lot of "cleanup" to be perfect as there were quite a few stray pixels - probably more down to my method of doing it rather than anything else.
Has anyone ever made custom decals with semi-transparency that worked? If so how?

thanks

Top