drawing transparent objects

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  04 April 2005
drawing transparent objects

hello, i understand that if you want to render transparent objects correctly, you turn off the depth test, right?

but what if a transparent object is behind an opaque one? then it will still be drawn infront of it?

whats the solution to this problem?

  04 April 2005
you sort the objects by pseudodepth before drawing.
then you draw the opaque objects, lock the zbuffer and draw the transparent ones.
hidden transparent objects will fail the test and not be drawn.

if you have resolved object-intersections then the drawing will be correct.
  04 April 2005

so i have to calculate the rendering order each time before i draw the frame?
cause if the camera rotates then the transparent object may be infront of the opaque one.

and what if i have a transparent object completely surrounding an opaque one (like when i visualize a boundingbox) then there will always be polygons of that will be infront and behind the opaque object.
  04 April 2005
You might like to have a look at 3D Game Engine Design and Architecture by Dave Eberly.
The Ogre 3D engine may also give you some clues if you want to look at some code.
If you want to look into k-d trees, there is a good discussion in Graphics Programming Methods - edited by Jeff Lander.
These resources are also good for many other things and I have found them to be invaluable.
  04 April 2005
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 01:08 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.