[osg-users] Custom mipmap loading? (Re: Texture not clear in far view)
gordon at gordon-tomlinson.com
Mon Sep 8 19:55:11 PDT 2008
Mr Squid (eer mean. Mr Sid)
gordon at GordonTomlinson.com
IM: gordon3dBrit at 3dscenegraph.com
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
Sent: Monday, September 08, 2008 10:26 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Custom mipmap loading? (Re: Texture not clear in
> Is the use of DDS files the only way to use custom mipmap images?
> If so what's a good tool to author custom mipmap DDS files (or any DDS
file for that
> matter) on Linux and/or OS X?
As far as I know, it's the only widely accepted format that has this
functionality for textures (GeoTiff has a similar feature for height
fields, if I'm not mistaken).
But beyond having mipmaps embedded in the image, DDS is also a great
format for textures in its own right. For one thing, they are compressed
but do not require decompression before being used as a texture in
OpenGL as most video cards and drivers (OpenGL and DirectX) support them
If you use a JPEG compressed file as a texture, the file needs to be
decompressed and uploaded into video memory that way, so it takes more
texture memory. DDS files can be sent to the card in compressed form
directly and the card will use them directly, saving texture memory for
the same size/quality textures. The file size on disk will perhaps be
larger than the same image in JPEG, but the texture memory savings are
There is a Photoshop plugin to save DDS files, but I'm not sure what the
workflow in Photoshop works for saving mipmaps into the DDS file... Plus
you specified Linux, so Photoshop won't work for you.
Here's the DDS plugin for the GIMP:
Seems pretty complete. It says it can do automatic mipmap generation on
save, I hope it gives you options on which filtering algorithms to
use... It also says it can load mipmap levels onto separate layers, I
wonder if it can save mipmap levels that are on separate layers too...
That would be the best.
On Win32, there's a tool that allows you to create and manipulate DDS
files in the DirectX SDK.
ATI/AMD also has the Compressonator which allows you to work with them.
I'm sure a quick web search will give even more possibilities for Linux.
I don't use Linux regularly (just once in a while to test that my coding
is cross-platform) so I can't really suggest more than that.
> I was recently asked if it's possible to use individual files and had to
conclude (after a
> browse through the code) that it's not possible. Would it make sense to
> functionality? Kind of like an Image that contains Images?
That would be cool, true. Perhaps a pseudo-loader could be created that
would do this...
Hope this helps,
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
osg-users mailing list
osg-users at lists.openscenegraph.org
More information about the osg-users