PDA

View Full Version : constructive solid geometry



hemmul
01-27-2005, 09:18 AM
in the article (http://www.opengl.org/resources/tutorials/advanced/advanced96/node33.html#SECTION00094000000000000000) on this website, there is stated, that problems with depth buffer arise during rendering of constructive geometry - for example the parts of the surface that is not in color buffer may be stored in depth buffer... and it's very very bad :)
can anyone point me some ways out?
i thought of some kind of storing the depth buffer, and restoring it afterwards (using glReadPixels and glDrawPixels) but it's tooo slow...
any ideas? i believe it can be done :)

flo
01-28-2005, 12:52 AM
The CSG rendering library OpenCSG (http://www.opencsg.org/) circumvents problems of false depth buffer values by calculating each CSG expression in a pbuffer and transfering only the really visible areas into the main frame buffer. In this way, CSG objects and other 3D geometry can be freely mixed. This technique is explained further in this paper (http://www.hpi.uni-potsdam.de/~doellner/kirsch/csg.en.html) .

By the way, I'm eagerly waiting for drivers with support for FBO to optimize this technique even more. Getting rid of the pbuffer's context-switch will be very handy here...