[osg-users] Jittering/Flickering geometry problem
Sebastian Messerschmidt
sebastian.messerschmidt at gmx.de
Thu Feb 16 02:30:23 PST 2017
Am 2/16/2017 um 5:48 AM schrieb umesh ramesh:
> Hi Sebastian,
>
> Thanks for the prompt reply. As I had written earlier, I do not prefer to generate my road geometries at origin & translate far off where they are located (maybe that’s the last option that I shall use).
> I am under the impression that there might be other techniques to tackle this problem.
Most likely not. The other problem usually occurring is z-fighting which
also is a precision problem. This can be tackled via logarithmic depth
buffers etc. but as you were talking about flickering involving only one
geometry, depth-precision is non of the problems (For z-fighting you'd
need at least two primitives).
Think about the problem this way: Your geometry is a _local_ description
of road-piece that can be _placed_ where you like it to be on a terrain
that is _placed_ where you like it to be. This way relative coordinates
will stay in the boundary of your viewing frustum.
And having a road-piece of several thousand kilometers is simply not
feasible.
> I think, VirtualPlanetBuilder is generating the Terrain Tiles in the way you had written.
> But, FlightGear too has terrain & roads all over & they are rendered properly.
There are several other techniques including texture splatting and so
on, to put decals onto terrain. But the problem arising with multiple
geometries on top of each other is usually z-fighting ...
> Do the similar Projects use the same basic theory that you had written?
> It will be helpful if you can give additional insight into this.
There is no way to have coordinates in the scale described in your
example and single precision. Usually one needs to transform the
coordinates around the center of the data-set by transforming either the
geometry coordinates or by using a transform in the scenegraph.
The other, in case relative precision is not-important is to simply
scale the coordinates. But basically it all boils down to send
reasonably "small" coordinates to the GPU. Believe me, i had to learn
this the hard way while implementing shader-based geocentric effects ;-)
This of course doesn't mean that I know every trick.
>
Cheers
Sebastian
> Cheers,
> umesh
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70205#70205
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
More information about the osg-users
mailing list