[osg-users] osgText precision issue

chris dragonmagi at gmail.com
Sat Sep 8 15:05:13 PDT 2007


The other thing to do, and the most important, is to locate the local origin
where your text is *before* converting to floats. This will give you the
most accuracy. I know the problem well and how to solve it, but don't know
OSG so can't tell you how this is done in OSG.

best of luck,

chris

On 09/09/2007, sherman wilcox <wilcox.sherman at gmail.com> wrote:
>
> Yeah, that sounds like it will do the trick. I'll have to re-work some
> code, but that should address the issue.
>
> On 9/8/07, Jason Beverage <jasonbeverage at gmail.com> wrote:
> > Hi Sherman,
> >
> > The issue you're seeing is probably a precision issue since OpenGL works
> in
> > floats.  I've seen a similar effect with Text objects in my
> applications.
> > One way to reduce this precision problem is to to not position your text
> > using the setPosition function but to position it by using a
> MatrixTransform
> > as the parent of the geode containing your text.  This will allow OSG to
> > accumulate the transformation and camera matrices in doubles and only
> > convert to float the very last moment to increase precision.  It is the
> same
> > technique that osgdem uses when managing its tiles.
> >
> > Hope this help!
> >
> > Jason
> >
> >
> > On 9/8/07, sherman wilcox <wilcox.sherman at gmail.com> wrote:
> > >
> > > I'm having a bit of trouble with mangled text if I zoom in to close.
> > > This text is on an osgDem generated ellispoid. In the attached
> > > screenshots, the text appears correctly in text2.jpg. However, in
> > > text3.jpg you'll see the problem. This only occurs if I zoom in really
> > > close to the text. If I back off the camera a bit, the text reverts
> > > back to the correct state.
> > >
> > > My questions are:
> > >
> > > 1) What's causing this?
> > > 2) How best to address the issue?
> > >
> > > ______________________________ _________________
> > > osg-users mailing list
> > > osg-users at lists.openscenegraph.org
> > > http://lists.openscenegraph.org/listinfo.cgi/osg-users -
> openscenegraph.org
> > >
> > >
> > >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
http://ping.com.au
http://systemic.com.au
http://planet-earth.org/Rez/RezIndex.html
--
It be a great secret: there be more truth at the centre.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070909/57c12de4/attachment-0003.htm>


More information about the osg-users mailing list