DDS format ObjectLightMaps = performance boost...
Posted: Sun May 16, 2010 8:24 am
I have converted the lightmaps for my DC Sea Rigs map to DDS format instead of TGA files. Firstly most of the lightmaps are large. 512x512. And the interior lightmaps are 1024x1024. There was noticeable frame rate drops when I would pan the camera around the map whenever the rig comes across my view. This would be worse on slower machines.
So rather then redoing some of the lightmaps at smaller sizes, I decided to convert them all to DDS format using DXT3 compression. And after I tested it, it was actually faster. The file size of the DDS files are slightly larger then the TGAs before it. (TGAs were 60 or so MB combined while the DDS files were 80 or so MB combined). But the RFA packed better and the map has a smaller file size.
My theory is that either mipmaps capability with lighthmaps makes the game run better or the game simply caches the DDS in memory better then the TGAs. So I would encourage someone to do a map with a lot of large lightmaps to try converting them all to DDS. You should see a performance boost from it if you had lag before.
Also note. nvDXT/DDS Converter 2 can't convert the lightmaps to DDS as is, since it doesn't seem to support converting 8-bit grayscale TGAs to DDS. So you will need to run them through a batch converter like "Advanced Batch Converter" which supports TGAs. Even if you don't tell the converter to do any changes to the output files they still come out in RGB. So then you could convert them to DDS.
A couple things to expect from DDS format lightmaps:
1. DDS files are in color. So that means you can have colored lightsources and stuff in your lightmaps instead of being confined to the pallete file.
2. There's a chance the pallete.pal file has no effect on DDS lightmaps. You might not need this file in this case.
If anyone else has tried this, post your results. In theory you can make crazy large lightmaps (like 2048x2048 for example) and expect it to still run good if it's in DDS format.
So rather then redoing some of the lightmaps at smaller sizes, I decided to convert them all to DDS format using DXT3 compression. And after I tested it, it was actually faster. The file size of the DDS files are slightly larger then the TGAs before it. (TGAs were 60 or so MB combined while the DDS files were 80 or so MB combined). But the RFA packed better and the map has a smaller file size.
My theory is that either mipmaps capability with lighthmaps makes the game run better or the game simply caches the DDS in memory better then the TGAs. So I would encourage someone to do a map with a lot of large lightmaps to try converting them all to DDS. You should see a performance boost from it if you had lag before.
Also note. nvDXT/DDS Converter 2 can't convert the lightmaps to DDS as is, since it doesn't seem to support converting 8-bit grayscale TGAs to DDS. So you will need to run them through a batch converter like "Advanced Batch Converter" which supports TGAs. Even if you don't tell the converter to do any changes to the output files they still come out in RGB. So then you could convert them to DDS.
A couple things to expect from DDS format lightmaps:
1. DDS files are in color. So that means you can have colored lightsources and stuff in your lightmaps instead of being confined to the pallete file.
2. There's a chance the pallete.pal file has no effect on DDS lightmaps. You might not need this file in this case.
If anyone else has tried this, post your results. In theory you can make crazy large lightmaps (like 2048x2048 for example) and expect it to still run good if it's in DDS format.