Automated mipmap generation and image resizing

Hi, guys. I’m developing a new pipeline for our small studio. Thought I’d ask how you handle textures at yours? We are basically just saving out our PSDs with Nvidia’s dds-plugin. However the best results I’ve gotten so far is by using Mipster. A plugin to Photoshop which creates mipmaps using Photoshop’s resize tools. The results are great but it’s is very inefficient and a bother to use. What I’m trying to achieve is the same results but automated. I want to skip the whole manual DDS step and just let the artists import a PSD to the engine.

I’ve only just begun experimenting with Nvidia Texture Tools 2 source library to automate it. So far I’ve only used the console applications nvzoom.exe to resize and nvcompress.exe to convert to DDS. And I wasn’t too happy about the result. I think a lot of detail was lost due to the fact I had to resize the PSD and save it to TGA. And then compress the TGA to DDS. So basically what I want is to resize the PSD with a good filter (maybe something else than Nvidia’s?) and then compress it to DDS with desired settings. How do you guys do it?

Saving the PSD as a TGA before converting to a DDS should not cause any loss of quality. TGAs don’t use lossy compression. The type of DXT compression will be the only source of detail loss.

We check in .psd source files and have a build step that uses Nvidia’s texture tools to convert the .psd to .dds which is then used by the engine. So the artists never touch a .dds file unless they need custom mips (like 1-bit alpha that needs to be hand edited), and everything is done automatically in a single build step. They don’t have to do any exporting themselves.
Unfortunately, we are running into issues with Nvidia’s toolset. They have some bugs. For example, when you set the bit depth in the command line tools to 32-bit, it will save the .dds as a 4,4,4,4 and not an 8,8,8,8. Additionally, CUDA acceleration doesn’t work on all cards, and it will actually corrupt your image (especially if you have a lot of info in your blue channel and you are outputting DXT5 textures). However, their compression algorithms are magnitudes better than the default Direct X compressor. You might also try another open-source compressor like Squish.
As for resizing, we generally check-in textures at the size they will be. However, whenever we need to downsize, we use an action and an artist’s eye and move the original source to a location that doesn’t get built (but is still checked-in). Hope this helps.

I didn’t work with nVidia’s DDS plugin in a long time, but I remember when I used to that it seemed to always generate mipmaps from already dds compressed images.
So with every mip stage more and more quality loss occurs.

So you might be better off manually creating your mips or creating an inhouse tool/RC that does it and can also be extended with things like automatic downsizing of too large textures etc.

pindercarl: Yes you are right, it didn’t lose any quality when I saved it out as a TGA. Only the downsizing and compression.

torgo3000: Very helpful! Thanks!

saschaherfort: Ye, the quality of manually created mipmaps seems far superior to generated ones. What I’m thinking of is to automatically generate mipmaps for the artists while they are working and during the night let a script create mipster made mips.

Thanks!