[osg-users] Method for Converting FLT files to use DDS Textures

145 views
Skip to first unread message

Cary, Karl A.

unread,
Jan 25, 2013, 7:54:47 AM1/25/13
to OpenSceneGraph Users

This isn’t a direct OSG question, but one I was hoping people on this list might be able to help out with. We have several thousand FLT files that use rgbs as textures. Unfortunately we can’t convert these to ive or osgb files as they are shared with another application that is not made in OSG and only supports FLT files. However, both can support FLT files using DDS textures to allow for texture compression. Through testing we have shown a large improvement by doing this, so we want to go that route.

 

The issue is how to convert all of these FLT files over. We can easily batch convert all of the textures, that is not a problem. The issue is updating the FLT files themselves to tell them to point to the dds texture instead of the rgb texture. Having someone manually open up each file and edit the texture names is VERY time consuming. Does anyone know of an easy way we could do this through scripting or a custom converter or something else? The files will stay named the same except for the .rgb will become .dds.

 

Thanks in advance.

 

Karl Cary

SAIC

Software Developer

301-227-5656

 

Robert Osfield

unread,
Jan 25, 2013, 8:40:00 AM1/25/13
to OpenSceneGraph Users
Hi Karl,

Have you tried using the OSG's write support for OpenFlight, the
process would be opening the original model, convert the textures to
dds, record the new filename then write out to .flt.

Another approach would be cheat ;-)

The trick would be to leave the OpenFlight database as is and on the
fly re-map the .rgb files to the associated pre-generated .dds file
using a osgDB::Registry::ReadFileCallback that intercepts all the
readImage() calls and remaps the name then does the load.

Robert.
> _______________________________________________
> osg-users mailing list
> osg-...@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Andreas Ekstrand

unread,
Jan 29, 2013, 1:59:59 AM1/29/13
to OpenSceneGraph Users
Hi Karl,

One option could be to script the texture palette reference changes using Remo 3D (www.remograph.com) and convert the images using OSG or nvdxt from Nvidia DDS Utilities. If you need help with this, feel free to e-mail me off the list.

Regards,
Andreas

Paul Martz

unread,
Jan 29, 2013, 11:26:58 AM1/29/13
to OpenSceneGraph Users
I'll second Robert's suggestion of simply loading the .FLT file,
programmatically changing the texture references, and exporting back to .FLT.
This seems like the easiest approach, so you should probably try it first before
moving on to more elaborate solutions.

The potential problem is that the .FLT importer or exporter might drop some .FLT
features that your (non-OSG) rendering software depends on.
-Paul

Chris Hanson

unread,
Jan 29, 2013, 2:08:13 PM1/29/13
to OpenSceneGraph Users
Yeah, it should be a piece of cake to do a binary search and replace for ".RGB" and replace them with ".DDS" in your FLT file. I know of a couple of binary file editors that should be able to do this without damaging the FLT file.


On Tue, Jan 29, 2013 at 9:26 AM, Paul Martz <pma...@skew-matrix.com> wrote:
I'll second Robert's suggestion of simply loading the .FLT file, programmatically changing the texture references, and exporting back to .FLT. This seems like the easiest approach, so you should probably try it first before moving on to more elaborate solutions.

The potential problem is that the .FLT importer or exporter might drop some .FLT features that your (non-OSG) rendering software depends on.
   -Paul




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



--
Chris 'Xenon' Hanson, omo sanza lettere. Xe...@AlphaPixel.com http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]
Reply all
Reply to author
Forward
0 new messages