VTFucker - Virtual Texture Explorer

The 2016 reincarnation of Carmageddon! Discuss, mod and troubleshoot!
User avatar
Trent
mindless
Posts: 2961
Joined: Wed Apr 05, 2000 9:08 am

VTFucker - Virtual Texture Explorer

Post by Trent »

I've just bundled up the latest version of VTFucker for release. Can't remember what I've changed since the previous release, or where I released it at so whatever. Usual "use at your own risk, I take no responsibility for VTFucker fucking up your VTs" type disclaimer. Grab it here: http://carmatools.com/downloads/tools/VTFucker.zip

It should just need to be run, pointed at the Max Damage directory, then load one of the VT sets from the file menu. You can browse through the different textures, change between Diffuse, Normal and Specular sets and change between the different pages of the VT, which are effectively mipmaps. Page 0 is not used, it was the original highest quality version of the textures but was optimized out so page 1 is the highest quality available.

Other fun features:
Edit -> Extract selected texture - does what it says on the tin.
Edit -> Extract current page - point it at a folder, it will create Diffuse, Normal and Specular sub folders and extract all the textures from the curent page into them.
Edit -> Replace selected texture - choose an image from your computer to replace the current texture, just make sure it's the exact same size as the texture you're replacing, there's no safe guards here!
Edit -> Shade Editor - crashes the tool :D

Enjoy!
a.k.a. Brent
User avatar
nicbou0321
pedestrian
Posts: 20
Joined: Mon Feb 16, 2015 1:36 am

Re: VTFucker - Virtual Texture Explorer

Post by nicbou0321 »

Hey, this tool has been amazing when it works. Its what ive been waiting for for years.
A big thank you for the work you put in these tools.

But ive encountered a bug and idk what to do about it.
Ive looked in scintilla.xml for fun and im not 100% sure if i found the reason for my problems but it sounds like it could be.
It said exactly as this
"Converts bitmap to XPM data for use with scintillaNET.
Warning: images with more than (around) 50 colors will generate incorrect XPM"


When exporting textures, more then half of them will export the diffuse texture with just plain black no color.
I think all the specular and normal exports properly tho.


Hopefully this is a small bug that wont be too hard to squish.

Hope yall are doing good in 2021, cheers :beer:
User avatar
Trent
mindless
Posts: 2961
Joined: Wed Apr 05, 2000 9:08 am

Re: VTFucker - Virtual Texture Explorer

Post by Trent »

A year on and I had done exactly zero work on this tool since the above release, but Nicbou joined the discord yesterday and asked about it and that got me nerdsnipped into fixing a few things up ­čść

So, new release! http://carmatools.com/downloads/tools/VTFucker.zip

Change log is fairly simple but significant:
1) It no longer keeps all the textures in memory during extraction, so it doesnt hit the 32bit memory limit on the larger VTs, hooray! Extracting outskirts topped out at around 500mb.
2) The textures are now listed in alphabetical order, hooray! You can now more easily find the texture you're looking for!
3) There is now a progress bar when extracting all the textures, wahoo! You no longer have to sit there and wonder if it's crashed or still going or completed for hours, which brings me onto the final point....
4) Extracting it sooooo much faster now, yayayayayayay! As well as running in a background worker thread, it also no longer creates Bitmap objects for each tile and uses the very slow GetPixel/SetPixel methods, instead it just grabs the tile data in a byte array, stitches them together in another bigger byte array and then copies that byte array directly into the Bitmap object's data. Now it doesn't take hours to extract Outskirts!

Enjoy!
a.k.a. Brent