Author Topic: Conversions to new better texture format  (Read 185 times)

0 Members and 1 Guest are viewing this topic.

Offline EatThePath

  • 27
  • Laser Lich
    • Twitter
Conversions to new better texture format
On discord over the past year or so there's been a mounting body of knowledge and experience with a newer, more advanced version of the .dds file format, called BC7. These files are still saved as .dds, but most programs still don't know what to do with them.

Which is a shame, because BC7 textures can be much, much better at preserving soft gradients and certain colors that get mangled in DXT1 and 5 textures, while still retaining many of the advantages of dds textures. FSO added support within the last year, and DahBlount has been advocating their use since, and experiments have shown them to be pretty suited for anything but effects textures so far.

Paint.net has the ability to open and save them, and I hear the latest GIMP has other gotten it or will soon. And there's a tool AMD has published, Compressonator, that can do lots of neat technical things including this. Of course, all the hundreds of textures used in a big mod make it utterly impractical for a switch over in large scale, even with an accessible tool like Paint.Net. Compressonator has some ability to do mass conversions, but honestly it's kind of busted and the documentation is bad.

So let me do it for you! I've got a scripted pipeline partly done, using Compressonator at it's core, and yesterday I pitched in to convert all of the NTF reskins that just got released. it took longer to zip and start the upload of the results than the actual conversion process. If you've got a bunch of textures you'd like to give this treatment to and clicking dozens of times in Paint.Net kills that idea, just give me a poke here or on discord. I'd like to make the scripts available to everyone, but honestly I don't know when I'll in a good place to do that with everything else I'm working on or planning to. But five minutes to convert an arbitrary number of files and help out, that's something I can fit into most days somewhere.

Now, one caveat is that this has the most actual improvement to offer if you have original, uncompressed textures to work with. I can convert an old .dds file to a new one, but honestly there's not a lot of point to it unless there's some form of cleanup being done in the middle. Otherwise you'll just have the old texture artifacts very accurately encoded into the new file. And I can't promise instant turn-around times, especially if tons of people want things done or people want to do it a little at a time, but I don't expect that'll be a huge problem.

Also if you want to try to make Compressonator do things yourself, check my crazed rantings notes on the wiki, they might save you some stress.
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 

Offline Col. Fishguts

  • voodoo doll
  • 211
Re: Conversions to new better texture format
Interesting, I was not aware of that format.
Does it do both with/without alpha, meaning can it replace both DXT1 and DXT5?
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea

 

Offline EatThePath

  • 27
  • Laser Lich
    • Twitter
Re: Conversions to new better texture format
Yes. In very high level, as I understand it, a BC7 texture can use any one of 7 different compression methods on different parts of the image, with the tools hopefully picking what gives the best results for that part. Some of these methods devote lots of space to alpha, some don't spend much or any on it. So you can do either just fine.

The only problem we've identified is that effects textures always render as if they've been given a transparent image, which is to say, very badly. I suspect that needs engine side fixes.
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."