Hey all of you, I have a problem with the coloring of my objects (osg::Geometry). When I resize any of them (using PositionAttitudeTransform) and the scaling factor is <1 the opacity of the respective geometry nodes is scaled accordingly.
So *my question* is: How can I protect the transparence/opacity of a geometry against scaling? (some further questions below) Little description of what I'm doing: I have lots of similar objects to represent graphs and for each type of object (node, edge) I create a prototype to copy from. This is an osg::Geometry with TriangleStrips and TriangleFans. I keep it in memory as osg::ref_ptr<osg::Geometry> When building the structure I create a geometry for each object and copy (member by member) all the PrimitiveSets, Vertices, etc. as well as the ColorArray and color-binding (which is BIND_OVERALL) from the prototype to the new clone (-> 2nd question). I then insert this geometry into a osg::Geode node (->3rd question), which I add to a osg::PositionAttitudeTransform node (to scale, move and rotate) and finally to the respective osg::Group. Optionally I insert a osg::LOD to get higher performance. I'm also not using the osg::ShapeDrawables but my own objects for said performance (I got up to 10^5 objects to display atm, but very possibly even more to come) Right now I'm hiding the scaled transparence by creating the prototypes about the size the objects will be at the end, but they all will have different sizes so there's still a difference in opacity. *2nd question*: How can I more easily create a osg::ref_ptr<osg::Geometry> copied from another osg::ref_ptr<osg::Geometry> (cloning all the PrimitiveSets, vertices, normals, colors, states and so on) *3rd question*: Can I add a geometry more directly to a PAT than Geometry->Geode->PAT? *4th question*: Does anybody have any further suggestions to improve my osg structures, mainly in means of performance? -- Hartmut Leister <hartmut.leis...@s2005.tu-chemnitz.de> Hofer Straße 58a, 04317 Leipzig 0175/8491877 http://www-user.tu-chemnitz.de/~harl -- E-Mails richtig schreiben: http://www-user.tu-chemnitz.de/~harl/email_nettiquette.php http://www-user.tu-chemnitz.de/~harl/gpg.php _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org