Forums Aritcles
SEARCH:
LOGIN:
Register Register Register Contact Us
Go Back   Game Artist Forums > Game Art > Support
Register FAQForum Rules Members List Calendar Mark Forums Read
Reply
 
LinkBack Thread Tools Display Modes
Old 08-06-2008, 03:10 AM   #1 (permalink)
Founder of Statspaddling
Tiros's Avatar
1st Place 1st Place Winner of Speed Texturing Winner of Speed Modeling 
Tiros's User Activity: 10/10
1,331 - 198
DX Opacity Bug

It's a thing I've been bothered by lots of times, and for quite long.. the DX Opacity bug. What happens is simply that while something's transparent, everything behind it will also be hidden. As shown in the following picture where I simply tried to throw together some quick volumetric grass:




So, what I'm wondering is.. is there some kind of fix/patch to solve this problem? Rather than rendering it.. I know It'd work properly while rendering, but that still won't solve the DX Bug

Cheers & Thanks in advance!
Tiros is offline   Reply With Quote
Old 08-06-2008, 03:32 AM   #2 (permalink)
Programmer
TheoLogic's Avatar
TheoLogic's User Activity: 1/10
180 - 28
ZBuffer problem. Actually, you have to render from the back to the front to avoid this. Sort the buffer to the camera and this will be fixed.
__________________
TheoLogic - Portfolio
TridelGames - TridelGames LLC
TheoLogic is offline   Reply With Quote
The Following User Says Thank You to TheoLogic For This Useful Post:
Old 08-06-2008, 03:59 AM   #3 (permalink)
Game-Artist.net Admin
doylle's Avatar
Winner of Speed Texturing 2nd Place 
doylle's User Activity: 10/10
2,386 - 345
Well, like theologic said, it's a zBuffer problem. I know i said it was a bug, but it's not a real bug that you can fix, it's just a bug because there's no real workaround to get it fixed in max as far as I know.

the problem is this. When a scene is rendered, DX will look at the ZDepth of every face for each pixel. For every object it'll check the zDepth first, and determine if an object closer to the camera has already been rendered, or if that object is in fact the closest to the camera. (all per pixel) If it is is not the closest object to camera (and therfor another object is blocking it's visability), it will not render what's behind it... So if you then apply transarency to the object (this happens in a later stage during the rendering), you will have the effect you see in your screenshot...

The logical solution would be to sort all your grass planes, from far to close, and render them in that order. but that's not possible in max (again, as far as I know).

If i'm not mistaking then you're using the viewport shader i wrote. I think i'll work on an updated version soon, have a few things i want to add to it. I'll look some more, maybe i'll find a way to fix this
doylle is offline   Reply With Quote
The Following User Says Thank You to doylle For This Useful Post:
Old 08-06-2008, 04:07 AM   #4 (permalink)
Founder of Statspaddling
Tiros's Avatar
1st Place 1st Place Winner of Speed Texturing Winner of Speed Modeling 
Tiros's User Activity: 10/10
1,331 - 198
Ah, that explains it then :/

Well, searching for dx opacity bug fixes on google didn't turn up any results, and I guess this is why.. I'll see if I can find anything about sorting the zbuffering though

And aye, I'm using your shader D, and if you'd be able to add a fix for it, I'd be forever grateful

Thanks for taking your time guys.

Cheers!
Tiros is offline   Reply With Quote
Old 08-06-2008, 04:12 AM   #5 (permalink)
Game-Artist.net Staff
Talon's Avatar
Winner of Speed Texturing Golden Star 
Talon's User Activity: 10/10
2,696 - 461
You could try making it 1-bit alpha.

Not sure how Max does it, but a fair few engines render 1-bit stuff in with the opaque stuff, rather than with the transparency pass. *shrug* Worth a try.
__________________
> My Portfolio
> Hull-Breach Lead Modeler
> Supporter of good crits.
Talon is offline   Reply With Quote
The Following User Says Thank You to Talon For This Useful Post:
Old 08-06-2008, 05:27 AM   #6 (permalink)
Founder of Statspaddling
Tiros's Avatar
1st Place 1st Place Winner of Speed Texturing Winner of Speed Modeling 
Tiros's User Activity: 10/10
1,331 - 198
Thanks for the tip Talon, but I'm afraid that didn't solve the problem, only made it look even more horrible

Cheers!
Tiros is offline   Reply With Quote
Reply

Bookmarks
Digg del.icio.us StumbleUpon Google
Thread Tools
Display Modes




All times are GMT -5. The time now is 01:39 AM.


Powered by vBulletin® Version 3.7.0 Beta 4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
Copyright © 2006-2008 Game-Artist.Net