On Tue, 29 Aug 2006, Chris Hanson wrote:
I've been told that pre-compressing textures into one of the S3/DXT types
is a major win, versus storing them in an conventional format and compressing
them before download.
I have been experimenting with compressed textures lately, and they are
very much faster than loading PNG images, for example. I have an application
that plays an animation on some OSG geometry.
I am assuming the DXT type compression is done on the host CPU, correct?
Anyone have any metrics for this?
I'm not sure if the compression is done in the hardware or in the OpenGL
driver. But all you need to do is load the texture in the normal way,
requesting a compressed internal format. The hardware or OpenGL will
compress the texture for you and you can read it back and save it to disk.
It is slower while the actual compression is taking place. One limitation
with this method is if you are using texture subloading to only replace
part of a texture there is no way to just read a portion of the compressed
image back from the hardware.
Here are some metrics for various animations. All numbers are frames per
second (higher is faster). I am listing the uncompressed rate, the rate
while the compression is taking place, and the rate after all images
are compressed. I load each frame from disk every time through the
animation. This is only a very small sample of all the metrics I have
observed.
resolution color uncompressed progress compressed
1024x1024 RGBA 18 4.5 34
360x100 RGBA 19 19 29
512x512 RGB 46 9 65
1024x512 RGBA 56 9 90
1024x1024 RGBA 26 4 84
2048x1024 RGB 10 1.3 78
Of course, you have to determine if your particular image or animation
looks good enough with texture compression. It is lossy, and there
are unacceptable artifacts in one of the animations that I have tested,
so I added the ability to disable compression on a per-animation basis.
--
____ __ Eric Sokolowsky (GST) NASA Goddard Space Flight Center
/ __/__/_/__ Visualization Programmer Scientific Visualization Studio
/ __/ _/ / _/ 301.286.3751 Mailstop 610.3 Bldg 28 Rm E102
/___/_//_/__/ [EMAIL PROTECTED] Greenbelt, MD 20771
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/