I know this command in Creator but we want to automatize the process because
we work on hundred of files like this.

Building a creator API is maybe a solution but I don't know if there is a
function to remove unused texture on a Openflight model. I will look for
this.



you dont need any api for this. simply download the openflight spec, read
the palette record, parse the face record and count the used textures, and
clone all the records into new file. Very simple

-Nick


On Tue, Mar 2, 2010 at 10:07 AM, Alexandre Amalric <alex.pix...@gmail.com>wrote:

> Hi Paul,
>
> *You'd need to modify the OpenFlight plugin to support this.*
>
> I tried to do this but in the TexturePalette::readRecord function there is
> no way to know if a texture is used or not by the model. The only parameters
> we get from a texture (RecordInputStream) are :
> - the filename
> - the index
> - X
> - Y
>
> hi Tomlinsom,
>
> Simplest way would be to open up the file in Creator and use the remove
> unused textures command
>
> I know this command in Creator but we want to automatize the process
> because we work on hundred of files like this.
>
> Building a creator API is maybe a solution but I don't know if there is a
> function to remove unused texture on a Openflight model. I will look for
> this.
>
> Kind regards,
>
> 2010/3/2 Tomlinson, Gordon <gtomlin...@overwatch.textron.com>
>
> Simplest way would be to open up the file in Creator and  use the remove
>> unused textures command
>>
>> You could also write a simple Creator API app to do this on a list of
>> flight files
>>
>> Another option would be to load the file in to OSG and save out as  OSG
>> or IVE file again you could write a simple script to do this for many
>> files
>>
>>
>> Gordon Tomlinson
>> Product Manager 3d Technology & Project Wyvern
>> Overwatch(r)
>> An Operating Unit of Textron Systems
>>
>> -----Original Message-----
>> From: osg-users-boun...@lists.openscenegraph.org
>> [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul
>> Martz
>> Sent: Monday, March 01, 2010 10:29 AM
>> To: OpenSceneGraph Users
>> Subject: Re: [osg-users] [osgPlugins] OpenFlight - Palette Records
>> prevent using of ReaderWriter Callback
>>
>> Alexandre Amalric wrote:
>> > Hi osg-users,
>> >
>> > I have a question concerning the palette texture record. When
>> > converting a flt model which texture palette contains useless texture,
>>
>> > they are even read. Is there a way to read only used texture.  Let's
>> > say I have a simple model file using 1 texture but my texture palette
>> > in corresponding openflight model contains 100 textures, so 99% are
>> > useless but the plugin read them.
>> >
>> > I know that it is a special case, but when working on Openflight
>> > models with Multigen Paradigm it happens a lot.
>> >
>> > Any suggestion ?
>>
>> You'd need to modify the OpenFlight plugin to support this.
>>    -Paul
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
>> g<http://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
>>
>
>
>
> --
> Alexandre AMALRIC                   Ingénieur R&D
> ===================================
> PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
> http://www.pixxim.fr
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://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

Reply via email to