Wojciech Lewandowski wrote:
Hi Andreas,
DDS is flexible container format capable of storing 2D, 3D, Cube and Array
Textures (with or without mipmaps) in many pixel formats. Block compressed
pixel formats like DXTn, RGTC (3Dc) and LATC are supported. Of course I
don't know all existing image formats but I learned about a few and I guess
this is the only format capable to store every type of texture with every
type of pixel format used nowadays.
DDS files are not compressed for file storage and they don't require
decompression which means they load quite quicly. PNG and JPG require this.
DDS in OSG has support for a number of most used pixel formats (but not all)
and 2D & 3D textures. I am not 100% sure here but CubeMaps and Texture
Arrays are not supported yet by OSG DDS reader writer.
I can confirm that. The main issue with cube maps is that no one has
written the necessary glue to get the cube map from the dds plugin back
to the osg::Texture classes (I've looked into it, but I wasn't sure the
best place to put it, and it was a bit more complex than I had time for
at the time). I think array textures are in the same boat, although
they might just need work on the plugin side.
As far as image formats go, you're probably most often going to see DXT1
(for opaque images) and DXT3 or DXT5 (for transparent images) used for
textures, and these all work fine. There is also support for float and
half-float textures if you're into HDR rendering.
This flip does require some software work after image was loaded. Or
alternatively one may flip the image in authoring tools before saving as
DDS.
"Software work" is probably overstating it. All you need to do is pass
the "dds_flip" option when you load the file :-)
options = new osgDB::ReaderWriter::Options("dds_flip");
image = osgDB::readImageFile(filename, options);
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org