Re: [osg-users] [osgPlugins] OpenFlight-Plugin - How to store individual object in seperate geode?

2009-04-07 Thread Bulkhead
Hi Brede,

Thanks very much for the info. Yup, with osgconv, I managed to compare the 
source flt database and the coverted osg format. Seems like the objects are 
already merged in the flt database. So I guess I have to find a way to modify 
the source before loading it to osg  [Wink] 

Once again, thanks for your help.

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





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


Re: [osg-users] [osgPlugins] OpenFlight-Plugin - How to store individual object in seperate geode?

2009-04-06 Thread Bulkhead
Hi Brede,

Just some updates. I have glanced through the codes for the openflight plugin, 
and not sure if this is correct.

Using the preserveObject option, the openflight Object record will be stored 
in a osg::Group node. All the faces will be stored as osg::Geode under the 
respective group node. Is this correct?

By iterating through the groups, and collecting the geodes in each group, I 
managed to retrieve the land from my openflight terrain file. However, the 
buildings are still being grouped based on the texture (i.e. building with same 
texture are stored under the same group node). Is this how the openflight 
structure organize the record? Is it feasible to seperate these buildings?

Thanks in advanced.

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





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


[osg-users] [osgPlugins] OpenFlight-Plugin - How to store individual object in seperate geode?

2009-04-03 Thread Bulkhead
Hi,

I'm new to the modelling world, and any help/advice is very much appreciated.

I'm using osg openflight plugin to load an flt terrain file. The terrain 
consists of a piece of land, and many buildings. What I am trying to achieve is 
loading the entire piece of land as one geode, and every building as individual 
geode.

After I have loaded the terrain into osg format, I noticed that the 
osgUtil::Optimizer will group some of the buildings that share the same texture 
into a single geode.

In order not to mess up with the original plugin codes (for ease of upgrading 
in the future), I disable the optimization by passing preserveFace option to 
the osgDB::readNodeFile() API, and invoke the optimizer in my loader codes. I 
have tried with different combinations of optimizer options, but couldn't find 
a combination that can produce the desired result  :( 

Here is the list of options that I have tried with:
SHARE_DUPLICATE_STATE
STATIC_OBJECT_DETECTION
MERGE_GEOMETRY (disabling this will blow my loader  [Embarassed] )
MERGE_GEODES
REMOVE_REDUNDANT_NODES
FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS
SPATIALIZE_GROUPS
COPY_SHARED_NODES
TESSELLATE_GEOMETRY

Any suggestions? Am I in the correct direction? Or should I develop a visitor 
for this purpose?

Thank you in advanced  :) .

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





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