Hi,

I have to deal with double precision data files.

By contrast to what's stated in [1], it seems to me that osg::Geometry
can be passed double precision vertex data. At least in OSG 3.2.1 that
may have fixed things since then. Allright. Great. But e.g.
osgUtil::SmoothingVisitor fails to compute the normals of such vertex
data, as osgUtil/SmoothingVisitor.cpp explicitely dynamic_casts vertex
data as osg::Vec3Array*, probably because a TriangleFunctor (that
doesn't seem to support anything else than osg::Vec3Array) is
required.

Now, reading in [2], [3] and the DAE/FBX readers source code, it
appears that handling double precision data is a reality. At least for
serialization. But what I'm missing is how to render them actually? I
don't understand how the conversion from double to simple precision
data is done for rendering. I don't seem to find any
duplicated-with-different-precision-vertex-data in the DAE/FBX
readers. BTW, [3] also mentions the newly (at the time) introduced
osgDB::Options::PrecisionHint thing that is only used by the DAE/FBX
to decide whether serialize the vertex data in osg::Vec3Array or
osg::Vec3dArray. But nothing about rendering.

I was thus wondering of maintaining my double precision vertex data as
node's meta-data. So I read the brilliant discussion and PDF file [4]
that seems to have led to the introduction of the UserDataContainer in
core OSG. But here again, I'm coming short of determining if that's
the right way to do so, as this API is only used to serialize
presentation settings by the Present3D plugin. And while I'm thinking
at "externalizing" my double precision data as meta-data (hence
duplicating them with simple precision data for rendering), why not
pass them as a separate object as plugin data? But here too, the
examples using the {set|get}PluginData API are scarce: namely the DAE
(once again) and FFmpeg plugins.

In short:
- how do you deal with double precision data?
- how do you deal with any non-standard data (well, not related to
geometry data)? How do you decide whether to use UserDataContainer to
store them as meta-data in nodes or as plugin data?

Thanks gurus,

     Émeric


[1] 
http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2007-August/133876.html
[2] 
http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2011-October/187722.html
[3] 
http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2010-April/173920.html
[4] 
http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2011-April/183451.html
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to