Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, VoroneTZ, dpn), 1,346 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Transparency Problem #289358
09/12/09 10:36
09/12/09 10:36
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline OP
Senior Member
bart_the_13th  Offline OP
Senior Member
B

Joined: Aug 2008
Posts: 482
So, like, I'm applying a TGA partially transparent skin to a model. It works fine if the model is in front of any solid block or model, but when the model is between the camera and the sky( we look to the sky through the transparent part of the model) it gives me a blue background as if the sky is not there...

Here's the example:


The transparent part which is the hair tip, shows the concrete behind.



The hair tip show blue instead the sky. The JPG compression blurs the blue part but in the ingame it much more noticeable...

Do someone can figure what's going on? confused

Re: Transparency Problem [Re: bart_the_13th] #289366
09/12/09 11:33
09/12/09 11:33
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
It's because you're writing to the z-buffer even with the transparent hair, right? You're using transparency in the opaque stage. The sky is actually rendered after the opaque stage, probably so that fewer sky pixels get drawn (although I personally think there should be a flag to enable the sky being rendered first [as it affects some of my own effects], I've never raised this in the "Future" forum).

That's what I think is the most-likely cause, anyway. Render her (or just her hair if they're separate) in the translucent stage (there's a flag for that, but I can't remember what). The problem here will be potential sorting errors with other transparent objects.

Actually I'm just guessing that A7 renders the sky after the opaque stage, but it makes sense to me, and I know a lot of other rendering engines do it in that order.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Transparency Problem [Re: JibbSmart] #290061
09/17/09 04:41
09/17/09 04:41
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline OP
Senior Member
bart_the_13th  Offline OP
Senior Member
B

Joined: Aug 2008
Posts: 482
Tnanks Jibb. Jibb is indeed smart laugh

Already have the work around by setting the sky black. Not a good workaround but it work...

Now that you've mentioned it, other game like most I11usion Soft games use the same render system where the sky is rendered later and it still has similar problem(with their hair)...

Re: Transparency Problem [Re: bart_the_13th] #290083
09/17/09 08:28
09/17/09 08:28
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Thanks mate grin I do RE at a primary school and the kids always get a kick out of my last name, but in primary school I don't get to prove whether or not I actually live up to it!

I recently stumbled across somewhere in the manual where it talks about how the engine works, and it does indeed render the sky in the order I mentioned above.

I have no idea how much work it would be for conitec to implement a flag that switches the sky rendering from after the opaque stage to before it.

Jibb

EDIT:
If you render your model in the transparent stage and write to the z-buffer anyway, sorting errors shouldn't come up since d3d_entsort defaults to "1", which means transparent entities are sorted back to front.

Given how dark your sky is I'm sure your workaround is satisfactory anyway!

Last edited by JulzMighty; 09/17/09 08:35.

Formerly known as JulzMighty.
I made KarBOOM!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1