Re: [osg-users] Geometry Merging Problem

2013-02-20 Thread Sergey Polischuk
Hi if you are using osgconv at any stage to convert your model, it implicitly invokes optimizer. you can control this with env var OSG_OPTIMIZER, to turn optimizer off you can pass OSG_OPTIMIZER=OFF Cheers. 19.02.2013, 20:38, "Adam Stambler" ada...@gmail.com:Hi All,I believe I am having trouble with OSG automatically optimizing my sets of Geometry.I am visualizing a 3D reconstruction using OSG.  Each part of the reconstruction is put into its own OSG Geometry and Geode.  All of the parts are then put a group and saved to an .ive file.  In another application, I load the ive and try and select each reconstructed Geode node.  When I click on one part ,   parts are selected.  It looks like Geometry in a few  nodes have been automatically merged. My question is:  is there any automatic optimization somewhere?  Perhaps things are optimized when they are made IVE file?  Either I implemented something incorrectly (very possible) or something modifies my scene graph.  I am not explicitly calling osgUtil::Optimizer. Thanks for any insight,Adam ,___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Geometry Merging Problem

2013-02-19 Thread Adam Stambler
Hi Folks,

Sorry for the spam.  It turns out my problem was due to how I was coloring
my selected geometry.  For some reason changing the primitive color is
changing the colors of multiple geodes.

Sorry for the spam.
Adam

On Tue, Feb 19, 2013 at 11:38 AM, Adam Stambler ada...@gmail.com wrote:

 Hi All,

 I believe I am having trouble with OSG automatically optimizing my sets of
 Geometry.

 I am visualizing a 3D reconstruction using OSG.  Each part of the
 reconstruction is put into its own OSG Geometry and Geode.  All of the
 parts are then put a group and saved to an .ive file.  In another
 application, I load the ive and try and select each reconstructed Geode
 node.  When I click on one part ,   parts are selected.  It looks like
 Geometry in a few  nodes have been automatically merged.

 My question is:  is there any automatic optimization somewhere?  Perhaps
 things are optimized when they are made IVE file?  Either I implemented
 something incorrectly (very possible) or something modifies my scene
 graph.  I am not explicitly calling osgUtil::Optimizer.

 Thanks for any insight,
 Adam

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


Re: [osg-users] Geometry merging problem

2008-10-01 Thread Paul Martz
A single Geometry can only have one StateSet and can't change OpenGL state
within a Geometry, so I'm not sure how you expected this to work. Other than
building a texture atlas, your best bet would be to leave them as two
separate Geometries.
   -Paul
 


 
 Hi all,
 I am trying to merge two geometry objects that have two 
 different textures by using the merging function:
 bool Optimizer::MergeGeometryVisitor::mergeGeometry(osg::Geometry
 lhs,osg::Geometry rhs)
 After calling this function, one of these objects looses its 
 own texture. In fact it inherits the texture of the other 
 object. did anyone already try this function or know how to 
 merge two geometry objects correctly ?
 
 thanks.
 
 The following snippet code shows how I did the merging:
 osg::ref_ptrosg::Geometry  mergeGeoms(osg::Geometry 
 *g1,osg::Geometry *g2) {
   osgUtil::Optimizer::MergeGeometryVisitor::mergeGeometry(*g1,*g2);
   return g1;
 }
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
 negraph.org

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