Re: [osg-users] Problem with glass door in front of glass shelf.

2010-03-07 Thread Chris Denham
Thanks Paul, I'll look into that. I was also wondering if it was possible to use kd tree to solve ordering problem, but not got round to investigating yet. I know there's code already in osg for dealing with bsp and kd trees, so, is there an easy way to use that code to solve my glass problem?

Re: [osg-users] Problem with glass door in front of glass shelf.

2010-03-06 Thread Paul Martz
Chris Denham wrote: Question 2: If, in a simple scene consisting of two non intersecting transparent triangles, it is always possible to find a correct order to draw them, then what is the algorithm that sorts them? Given that a single depth value for each triangle is insufficent to

[osg-users] Problem with glass door in front of glass shelf.

2010-03-02 Thread Chris Denham
I'm guessing that this is an old computer graphics problem to do with depth sorting the drawing sequence of transparent objects, but I'm a bit puzzled why OSG is having a problem with this little example. Basically, in some views of a this example scene, the transparency is not working

Re: [osg-users] Problem with glass door in front of glass shelf.

2010-03-02 Thread Robert Osfield
Hi Chris, This is the classic problem with use and a depth buffer and depth sorting objects as whole objects rather than at the fragment level. You can tweak the sort algorithm and use further point, nearest point or mid point as the OSG uses and you'll best results with different sort values

Re: [osg-users] Problem with glass door in front of glass shelf.

2010-03-02 Thread Chris Denham
Thanks for the speedy reply Robert. :) Have you got any tips on how to tweak the sort algorithm? Would I have to change OSG, or are there options or callbacks I can set from outside. I'm sure you are right that the best thing to do would be to split the shelf, but the problem is that we have

Re: [osg-users] Problem with glass door in front of glass shelf.

2010-03-02 Thread Maxim Gammer
Hi http://developer.nvidia.com/object/Interactive_Order_Transparency.html 2010/3/2 Chris Denham c.m.den...@gmail.com Thanks for the speedy reply Robert. :) Have you got any tips on how to tweak the sort algorithm? Would I have to change OSG, or are there options or callbacks I can set from

Re: [osg-users] Problem with glass door in front of glass shelf.

2010-03-02 Thread Chris Denham
Hi Maxim, Thanks for the link, a very interesting description of depth peeling technique (it's new to me). Though now I'm feeling a bit out of my own depth ;-) Am I right in thinking the implementation described here will only work on NVidia GeForce3 hardware? Cheers, Chris --

Re: [osg-users] Problem with glass door in front of glass shelf.

2010-03-02 Thread Chris Denham
Question 2: If, in a simple scene consisting of two non intersecting transparent triangles, it is always possible to find a correct order to draw them, then what is the algorithm that sorts them? Given that a single depth value for each triangle is insufficent to determine the correct order,