[Tool] GibbedTools - TDX Texture converter

The 2016 reincarnation of Carmageddon! Discuss, mod and troubleshoot!
User avatar
Mad Mike
Road Warrior
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

[Tool] GibbedTools - TDX Texture converter

Post by Mad Mike »

Seconded, very much looking forward to the fix to this issue.
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
Trent
mindless
Posts: 2951
Joined: Wed Apr 05, 2000 9:08 am

[Tool] GibbedTools - TDX Texture converter

Post by Trent »

I never got around to properly testing/finishing this off. So I've uploaded it as is so you guys can test it out: http://www.carmatools.com/downloads/tools/GibbedToolsBeta.zip
a.k.a. Brent
User avatar
Mad Mike
Road Warrior
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

[Tool] GibbedTools - TDX Texture converter

Post by Mad Mike »

Awesome, Thanks for this Trent! When I get a chance, I will give it a try and let you know if there any problems. :)

EDIT: Finally got a chance to do some decent tests, and I'm pleased to say it works! :) Although, weirdly the batch files did nothing, but after removing the for() loop, it converts the textures no problem.


Spoiler: Before & After #1






Spoiler: Before & After #2





Thanks again for updating this Trent :)
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
AlexTSK
mindless
Posts: 2859
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa

[Tool] GibbedTools - TDX Texture converter

Post by AlexTSK »

Oh neat, glad to see that its working :)
User avatar
AlexTSK
mindless
Posts: 2859
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa

[Tool] GibbedTools - TDX Texture converter

Post by AlexTSK »

Seems like i've discovered a bug that has beel plaguing my textures for a while.

Here is the original Eagle R and its original Eagle_Paint_D Diffuse texture:



Here is the same exact texture, except that I converted it to a png using 'Gibbed.Duels.TdxConvert.exe', the dragged and dropped it over 'CompressDXT5.bat'

No changes made to the texture, here is the result :



Seems like its getting desaturated somewhere along the line?
User avatar
Trent
mindless
Posts: 2951
Joined: Wed Apr 05, 2000 9:08 am

[Tool] GibbedTools - TDX Texture converter

Post by Trent »

Very interesting. If you convert the broken TDX back to PNG is there any difference between the two PNGs?
a.k.a. Brent
User avatar
AlexTSK
mindless
Posts: 2859
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa

[Tool] GibbedTools - TDX Texture converter

Post by AlexTSK »

Looking at them both in PS theres no difference visually, the pngs are slightly different sizes.

Original : 3928 kb

Broken: 4077 kb
User avatar
Trent
mindless
Posts: 2951
Joined: Wed Apr 05, 2000 9:08 am

[Tool] GibbedTools - TDX Texture converter

Post by Trent »

Did you compare the RGB values of any pixels? If not then could you? Especially the alpha channel.
a.k.a. Brent
User avatar
deadsheep
hit n run
Posts: 130
Joined: Wed Jun 01, 2011 4:20 pm

[Tool] GibbedTools - TDX Texture converter

Post by deadsheep »

What are your color profile settings in Photoshop?
User avatar
AlexTSK
mindless
Posts: 2859
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa

[Tool] GibbedTools - TDX Texture converter

Post by AlexTSK »

Trent wrote:Did you compare the RGB values of any pixels? If not then could you? Especially the alpha channel.
Neither PNG has an alpha channel, RBG values appear to be identical.

EDIT : The CR diffuse textures use to have alpha channels while the CMD dont appear to have any, maybe it has something to do with that?
User avatar
Trent
mindless
Posts: 2951
Joined: Wed Apr 05, 2000 9:08 am

[Tool] GibbedTools - TDX Texture converter

Post by Trent »

It turns out the issue was due to a completely unknown flag not being set in the TDX file. This flag seems to determine whether the game should render the texture in PBR or not... or possibly related to Gamma adjustment or colour space. Either way, it's required to match the look of the stock textures.

I've patched GibbedTools and added a new PBR bat file: http://www.carmatools.com/downloads/tools/GibbedTools.zip

In case you want to run GibbedTools manually from the command line, add the following option to your command line: -flags=16392

Both diffuse and specular maps should use that flag, however normal maps don't need it so I haven't bothered creating a bat file for normal maps using that flag.
a.k.a. Brent
User avatar
AlexTSK
mindless
Posts: 2859
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa

[Tool] GibbedTools - TDX Texture converter

Post by AlexTSK »

Thanks again for the patch Trent, very much needed to get the PBR textures looking right!
User avatar
Mad Mike
Road Warrior
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

[Tool] GibbedTools - TDX Texture converter

Post by Mad Mike »

Thanks for updating this Trent! I better get on and re-convert a lot of textures, hehe.
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.