[osg-users] OSGForest example glitch fix...

Viggo Løvli vigigio at hotmail.com
Mon Jul 21 04:28:05 PDT 2008


Hi, I am looking at the glitches in the OSG-Forest example.
Problem:
    Writing to the depth-buffer when rendering transparent pixels cause glitches because depth sorting is done per model.
 
My current solution:
    Render transparent objects twice.
 
I have attached two pictures that shows glitch on bill-board trees and on double-quad trees:
    - Glitch_OSGForest_Billboard.bmp
    - Glitch_OSGForest_DoubleQuads.bmp
 
I have attached one picture that shows the double-quad trees after implementing the fix:
    - Fixed_OSGForest_DoubleQuads.bmp
 
I have attached the modified source code file:
    - osgforest.cpp  
Please see the source code sections underneath "// VIGGO" to see the changes I have made.
 
Does anybody have a better solution to the double quad problem than this one?
 
We need to use transparent pixels. Our own landscape models contains a lot of double-quad trees and we do not want to turn off the blending (the wood becomes to square then).
 
Cheers,
 
Viggo
_________________________________________________________________
Hold deg oppdatert med MSN på mobilen.
http://info.mobile.no.msn.com/pc/default.aspx?ocid=30032
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080721/a41580a5/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Glitch_OSGForest_Billboard.bmp
Type: image/bmp
Size: 59622 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080721/a41580a5/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Glitch_OSGForest_DoubleQuads.bmp
Type: image/bmp
Size: 86742 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080721/a41580a5/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fixed_OSGForest_DoubleQuads.bmp
Type: image/bmp
Size: 263782 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080721/a41580a5/attachment-0008.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: osgforest.cpp
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080721/a41580a5/attachment-0001.asc>


More information about the osg-users mailing list