Hi Tim,

As you've spotted the culprit being the setting of RenderBinDetails of the LightPointNode's StateSet to be bin 20, which is after the default position of the transparent bin (defaults to 10).  This is done to insure that the lightpoints get blended correctly with the background, but as you point out the transparent bin will already have been drawn and set the depth buffer, so the light point fragments get discarded - so you can't see through your prop blurr effect. 

For performance the light points are drawn in batches, so you could do a whole runway within one LightPointNode and the OSG will do the compute on the CPU then send the visible light points down in one block to OpenGL to get good performance.  These days you could probably do most of the compute on the GPU, but in the days when LightPointNode was written shaders didn't exist.. Anyway the upshot of this batching is that the normal sorting of the transparent bin doesn't work well.

In hindsight I do see some more general value in drawing the light points after the opaque bins, but before the transparent bin.  You can manually set the the bin number to 9 and have a look at the results.  Don't put it in the transparent bin though as the depth sorting on such a large block of points won't work well.  Try:

  lightPointNode->setRenderBinDetails(9,"DepthSortedBin");

Robert.

Robert.

On 11/15/06, Tim Moore < [EMAIL PROTECTED]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

As part of FlightGear's switch to OSG I've been re-implementing point
lights and VASI / PAPI to use OSG's LightPoints. I noticed a problem
where the light points can't be seen through the propeller disk of the
default airplane. The propeller is semi-transparent. In snooping around
OSG I've found that the light points are drawn in a render bin after
everything else and that the depth buffer is never turned off when
drawing transparent objects (at least, I think that's the case and can't
see where it would happen). So, two questions:

Why are the light points drawn in their own bin, after transparent objects?

How come the depth buffer isn't disabled for transparent writes? In
researching this issue a bit -- and thinking about it -- I see that
there's not much point in disabling the depth buffer if you're sorted
everything and aren't going to draw anything else after, but in this
case you are drawing more.

I set the rendering hint on the LightPointNode's StateSet to
TRANSPARENT_BIN and things work now, but I'm wondering if that's the
right thing to do.

Thanks,
Tim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFFWxuYeDhWHdXrDRURAs2wAKDO9weGSDAMZSj+THV8TX84IPcCQACfcVN4
ANkamfgw0CDcjtDB6tPTo3E=
=mTxa
-----END PGP SIGNATURE-----
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to