Kiff Loh wrote on Thursday, February 28, 2008 8:41 PM:
> I have a large area TerraPage visual database loaded in OSG. When my
> 3D building models and light points (flt or ive) are planted close to
> the origin, everything works well. But when they are planted at
> somewhere far away, everything starts shaking and flickering, even at
> distances of less than 1km viewpoint. My X Y is only 5 digits.    
> 
> I've tried creating a matrix for my models and lights, creating
> external files etc. None of them works. I have to significantly lift
> models above the ground (eg 1m-20m) to have any positive results.
> I've heard that setting footprint and cutting up the terrain for my
> buildings, the problem will be resolved. But what about the lights
> flickering?     
> 
> Can anyone help? Is lifting my stuff above the ground the only way to
> solve this problem? 

It sounds like you are running into the float precision problem:
vertices in OpenGL are limited to float precision, so when you get too
far from the origin, you lose precision and things start to swim around.
This could also cause the flickering, as different parts of the terrain
move up and down.

The recommended way to fix this is to put your models under
osg::MatrixTransforms so their vertices are close to the origin. You can
split terrain up into areas that won't have precision problems and
transform them, too.

You might already have your models, etc. under transforms that are
getting optimized away. An easy way to test this is to put
OSG_OPTIMIZER=OFF in your environment before running and see if it
helps.

-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to