Hi,

I'm using the osgEarth library and I'm trying to draw Time Space Position 
Information datasets with a playback functionality. I want to draw the whole 
trajectory and then draw a subrange of the SAME trajectory, with a different 
style, for playback purposes: the playback subrange is "translated" over time 
to achieve the animation playback.

In the first approach, I used two different node graphs based on 
osgEarth::Feature classes (Feature / Session / FeatureSource / 
FeatureModelGraph). I wanted to share the feature and specify two different 
draws of same feature (total range and partial range), but I could not find a 
way to do this. So, at every frame I add geometry to the playback feature and 
this action drops the framerate.

To solve the problem, I've tried to switch to a "lower level" implementation 
based on osg::Geometry. In this case, I share the vertex array between the 
whole trajectory and the playback trajectory, then I specified two DrawArrays 
with different ranges for the different renders. The performance of this 
solution is perfect, but the geometry shows jitter problems related to the 
single precision of the GPU (geometry is specified in world coordinates).

I know that in the second scenario I have to "localize" the geometry in a local 
origin to minimize the jitter, but I ask if there is a way to achieve the same 
results with the "higher level" approach (osgEarth::Feature classes), because 
I'd rather take advantage of all optimizations in this classes. So, how can I 
specify a single Feature and then specify multiple renders of the same Feature, 
with different ranges of the data and different styles?

Thank you!

Cheers,
Michele

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66886#66886





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to