Game Development Community

optimal texture format and compression optimization (DDS vs jpg)

by Jeff Kelsey · in Torque 3D Professional · 03/10/2010 (7:51 pm) · 2 replies

I am coming from a background in another render engine where I assumed that DDS was the optimal texture format. In the last engine I worked with I found that having the engine load a .jpg texture required the engine to convert it to .dds format on the fly, essentially holding two textures in memory for the price of one.

However when I recently converted(optimized so I thought) all the textures I was using in a torque3d project to DDS(DXT1 for diffuse w generate mip/maps checked, DXT5 for normal maps) using the Gimp DDS plugin my frame rate actually went down slightly(the texture file size is larger for dds than for jpg). Obviously I have all my textures at a power 2 (usually 512x512) What is the optimal texture format and compression settings for the torque 3d pipeline in terms of memory not graphic fidelity...


#1
03/11/2010 (2:55 pm)
DDS formats are actually the best choice, since they need less bandwidth to be sampled, use both less VRAM and less texture cache.

You probably forgot to generate mip maps for the DDS files. T3D will not generate mips for DDS files and will use the ones which are embedded in the file (if any). This is not a bug, it's intentional because it gives you more power of your mipmaps (and there are special cases where you don't want to use mipmaps). I never used the Gimp plugin, but it should have an option for generating mip maps somewhere.

Not using mip maps causes huge performance hit even on top-line video cards, due to the way they are designed.
#2
03/12/2010 (11:00 am)
you must crank up anisotropic filtering (in 1.1 beta) to get the most out of your DDS mipmaps, otherwise it looks like a blurred mess. also as Manoel said, make sure you generate your mipmaps. we use 13 mipmaps per image. use dxt1 for anything without an alpha (including your normal maps), use dxt3 for images with basic alphas, use dxt5 only for complex alphas like clouds. DXT1 holds the best compression, normal maps never need to be more than dxt1.