[osg-users] Are billboard capable of casting shadows?

Terry Welsh mogumbo at gmail.com
Thu Mar 5 15:18:08 PST 2009


Hi Alan,
Even if you get your billboards to cast shadows, the result is usually
unpleasant.  Most of the time your billboards will appear to be split
down the middle with a dark half and a light half.  This is because
the billboard has a different rotation with respect to the eye and the
light source, and one half of the billboard ends up underneath its own
shadow.

If you fix this problem by keeping the billboard rotated to face the
eye even when it is being rendered for the shadow map, you will see
squashed shadows on the ground.

I've had this problem with trees before.  Making trees out of 2
crossed polygons looks better, although it is also not perfect.
--
Terry Welsh  /  mogumbo 'at' gmail.com
www.reallyslick.com  /  www.mogumbo.com


>
> I have been working with the osgshadow example using the lz.osg input file and noticed that the tree billboards aren't casting shadows. So my question is are billboards capable of casting shadows with the osgShadow implementation or would it have to be modified to make them capable of casting and receiving shadows? If the current implementation isn't capable of supporting billboards, could this be added to the current architecture or is there some re-design required.
>
> BTW: I have created a Visitor for dividing a billboard into spatial cells as in the example osgforest. Would this be useful as an optimization class for anyone else?
>
> Thanks for your support in advanced.
>
> Alan Dickinson
>



More information about the osg-users mailing list