Hi Robert,

Does this atlas builder packs only rectangular textures with some sort of binary
space partitionning algorithm ? Can it handle non-rectangular elements like
triangle strips ?


Regards,


guillaume


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Robert Osfield
Sent: Mon 8/28/2006 11:57 AM
To: osg users
Subject: [osg-users] TextureAtlasBuilder checked into CVS.
 
Hi All,

Over the last few working days I have commissioned to write a class to help
build texture atlas, this work is all open source so we can all benefit from
it :-)

What you'll find it two class added to osgUtil::Optimizer:

    osgUtil::Optimizer::TextureAtlasBuilder - a class for doing the building
texture atlas' from a set of source images or texture

    osgUtil::Optimizer::TextureAtlasVisitor - a class for traversing an
existing scene collecting suitable textures, pass them to the
TextureAtlasBuilder, and
          then modifying the texcoords of the associated drawables to keep
everything in sync.

To enable the osgUtil::Optimizer::TextureAtlasVisitor pass in the usual
Optimizer usage add TEXTURE_ATLAS_BUILDER to the OSG_OPTIMIZER env var, or
options mask i.e.

   export OSG_OPTIMIZER="DEFAULT TEXTURE_ATLAS_BUILDER"
   osgconv mymodel.fmt optimized.ive

Or if you want to try and merge as much nodes and geometry add MERGE_GEODES
too.

   export export OSG_OPTIMIZER="DEFAULT TEXTURE_ATLAS_BUILDER MERGE_GEODES"
   osgconv mymodel.fmt optimized.ive

For large open flight models I'm getting a speed up of around 6%.  Milage
will vary from model to model so you may fair better or worse, please let me
know how you get on.

Consider this code alpha too, so look out for any artifacts that it
introduces.

Cheers,
Robert.

<<winmail.dat>>

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to