View Full Version : Transparency problem
12-25-2003, 11:46 AM
I've got a problem: When I drawing any 50% transparent plane in a big room it is transparent if I look at it on front side, BUT it isn't if I look at it on back side. What can be wrong?? Maybe I use bad parameters for glBlend() function?
I don't know so please help me http://www.opengl.org/discussion_boards/ubb/frown.gif
PS. Sorry for my english but I'm from Poland and I still learning this language http://www.opengl.org/discussion_boards/ubb/smile.gif
12-25-2003, 12:21 PM
If you want correct transparency, then you'll have to sort your objects by yourself, back to front.
Or draw any solids first and then all transparent objects later.
Then, if you notice you have to get the transparent objects correctly transparent to eachother, you must sort the transparent objects as said in previous reply.
I have always wondered how to do the sorting if I am rotating the model. Is there a an OPENGL command that does the sorting. I frequently need to draw meshes with up to 40000 elements so I tend to compile the drawing and then erase the coordinate information.
12-26-2003, 08:46 AM
No, there's no GL-Command that does the sorting for you. So you'll have to do that by yourself, but as mentioned above, it mostly is enough if you draw your solid geometry first and then all transparent faces.
This works good as long as two transparent faces overlap one another. In that case it won't work anymore and you'll have to sort it by yourself.
But first case, drawing solid then transparent faces is enough in most cases and even commercial games do it. (Saw it for example in Max Payne 2, where two opaque surfaces overlapped and one of them wasn't drawn correctly)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.