Jump to content

Better textures with nvcompress


Recommended Posts

I used Active Texture Management, then DDSLoader, and I was enthusiastic about the startup speed: I play KSP on an Aspire One netbook, so any performance tweak is important.

But I started noticing texture artifacts. When DDS became stock, the artifacts where still there.

I experimented a lot with DDS, and i found out nvcompress gives much better results: just reprocessing the stock DDS files all the artifacts were gone.

This is an example: the tank on the left has the stock texture, the one on the right is reprocessed with nvcompress. The quality difference is huge.

QjIbf4Q.png

I tried with img2dds, but the artifacts remain.

Does anybody else had the same problems? I'm currently working on a perl script to automatize the whole reprocessing, and I'd like to share it when it's done, if it is useful to anybody.

Link to comment
Share on other sites

I do when running on OpenGL mode as one does when looking for performance hacks :D. Does nvcompress result in a smaller RAM footprint though? Knowing absolutely nothing about graphics and compression, can't help out but would be interested in providing testing feedback if you want any.

Quick callout on what does and doesn't get's compressed - some visual enhancement mods appear to need certain formats for "volumetric clouds" and stuff. Might want to keep an eye out for that to avoid floods of reporting when everyone starts using your script.

Link to comment
Share on other sites

Thanks for the feedback, Weywot8 - at least I know I'm not alone now :-)

There's no performance or memory changes switching to nvcompress, because of how DDS compression works. But many stock textures have an unused transparency channel, and that's a waste: textures with transparency must be compressed to DXT5 format, but textures without transparency can use the DXT1 format, taking exactly half the space. The tool I'm writing can detect these cases and optimize them away. And it can be used to reduce the size of textures you don't use much - most spaceplane parts for me.

By the way, it's a Linux tool! It needs the ImageMagick utilities to analyze and convert textures. They work on windows too, but the installation could be a little tricky.

It mostly works now, I'm trying to make it a little more user friendly.

Link to comment
Share on other sites

Yes NathanKell, 100% alpha is what I check for.

By the way, here's a link to the script I'm working on. It's feature complete, just not very user friendly. It's written and tested on Linux, but it should work on Windows, with a little effort.

It needs the ImageMagick command line tools and the NVIDIA Texture Tools (https://code.google.com/p/nvidia-texture-tools/).

It shows a little help message when launched with no parameters.

For instance, this recompresses the stock parts textures:

$ ksp-dds-tool <path-to-KSP>/GameData/Squad

The script ignores images if their height and width are not powers of two, and if they're smaller than 32x32.

License: GPL

https://www.dropbox.com/s/i7ke2mh63nyemgu/ksp-dds-tool.zip?dl=0

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Link to comment
Share on other sites

  • 2 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...