Hi Robert I'm using OSG 1.0.
My current workaround is to add an invisible QUAD with some z-depth to the
hud.
__
Rud
Am Montag, 22. Mai 2006 10:00 schrieb Robert Osfield:
> Hi Rudgier,
>
> Thanks for exaplanation of your experiments. BTW, which verson of the OSG
> are you working with?
>
> Robert.
>
> On 5/20/06, Rüdiger Hacke <[EMAIL PROTECTED]> wrote:
> > It's me again :)
> >
> > I did some more research as to what causes the projection matrix to get
> > destroyed.
> >
> > I replaced my hud with the complete createHud() from osghud example
> > (multiple
> > textlines with a transparent gray quad as backgroung) to see if my hud
> > was at
> > fault. With that, it worked, the error did not occur. Then I removed the
> > background quad leaving only the text and boom! there it was again.
> >
> > Then I readded the quad but removed the z-offset (float depth =
> > bb.zMin()-0.1;) and set the depth to 0. Same problem!
> >
> > So my -humble- conclusion is: osg doesn't like cameras whose subgraph is
> > completely flat (i.e. has a z-depth of 0). The strange thing is, that the
> > hud
> > continues to display fine, but the projection matrix of its parent camera
> > is
> > affected if it has nothing else to display because the model left the
> > field
> > of view.
> >
> > I've uncommented the osg::notifies in _clampProjectionMatrix in
> > CullVisitor.cpp and got the following output sequence as soon as my model
> > left the fov:
> >
> > Persepective matrix before clamping{
> > 1.29903806696231 0 0 0
> > 0 1.73205080756888 0 0
> > 0 0 -1.00098087302356 -1
> > 0 0 -0.00570442971828006 0
> > }
> >
> > Persepective matrix after clamping{
> > 1.29903806696231 0 nan 0
> > 0 1.73205080756888 nan 0
> > 0 0 nan -1
> > 0 0 nan 0
> > }
> >
> > Persepective matrix before clamping{
> > 1.29903806696231 0 0 0
> > 0 1.73205080756888 0 0
> > 0 0 -1.00098087302356 -1
> > 0 0 -0.00570442971828006 0
> > }
> >
> > Persepective matrix after clamping{
> > 1.29903806696231 0 nan 0
> > 0 1.73205080756888 nan 0
> > 0 0 nan -1
> > 0 0 nan 0
> > }
> >
> > Persepective matrix before clamping{
> > 1.29903806696231 0 nan 0
> > 0 1.73205080756888 nan 0
> > 0 0 nan -1
> > 0 0 nan 0
> > }
> >
> > Persepective matrix after clamping{
> > nan nan nan nan
> > nan nan nan nan
> > nan nan nan nan
> > nan nan nan nan
> > }
> >
> > Perhaps a division by zero happens somewhere in there ?
> > __
> > Rud
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
pgpANOLjZeQn2.pgp
Description: PGP signature
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
