Page 1 of 1

Carmageddon Max Damage (.zad)

Posted: Mon Oct 31, 2016 12:47 am
by octaviousrex
Hello

I have a sample vehicle from the recently released "Carmageddon Max Damage" from steam port. I'd like to see if or how we could make a tool to turn the .zad file formate into something like an OBJ format. thank you for your time.

https://www.mediafire.com/?ndxgi456c06w011

Re: Carmageddon Max Damage (.zad)

Posted: Mon Oct 31, 2016 10:47 pm
by herbert3000
The .zad file is a simple zip.
Inside there are a couple of files, MDL = 3D model, TDX = texture, and some other file types.

I only had a quick look at c_body.MDL, haven't converted the faces yet, vertices only:
Image

Re: Carmageddon Max Damage (.zad)

Posted: Mon Oct 31, 2016 11:34 pm
by octaviousrex
herbert3000 wrote:The .zad file is a simple zip.
Inside there are a couple of files, MDL = 3D model, TDX = texture, and some other file types.

I only had a quick look at c_body.MDL, haven't converted the faces yet, vertices only:
Image
that's fantastic. cause when I'd tried to rip with say ninja ripper the meshes were in several different peices and peicing them together would be a nightmare to say the least. and intel anylizer would not inject into the game so I had to go for the archive files. this helps me imensly thank you so so much.

Re: Carmageddon Max Damage (.zad)

Posted: Tue Nov 01, 2016 12:23 am
by shakotay2
there's some fiddeling required to get the submeshes but should go:
c_body-mdl.JPG
I faced some odd behaviour of hex2obj which claimed to have unmatching
vertexcount/max faceindex count while in Strip mode although displaying they were equal.

As a workaround switch to noStr mode where you'll find the first submesh to end after 7998 face indices (roundabout).

Re: Carmageddon Max Damage (.zad)

Posted: Tue Nov 01, 2016 12:50 am
by Acewell
Noesis has native support for those *.tdx textures as "Stainless TDX Texture" :D

Re: Carmageddon Max Damage (.zad)

Posted: Wed Nov 02, 2016 10:37 pm
by herbert3000
I believe that the hierarchy of the models (and the relative position of the submodels) can be found in car.CNT.

c_body.MDL is only the chassis

@0xB2: face count = 23256

struct face {
int unknown; // always 0
int index1;
int index2;
int index3;
}

@0x5AE36: vertex count = 23441

struct vertex {
float x;
float y;
float z;
float nx; // vertex normals, I guess
float ny;
float nz;
float u;
float v;
float unknown;
float unknown;
byte unknown; // usually FF or 00
byte unknown; // usually FF or 00
byte unknown; // usually FF or 00
byte unknown; // usually FF or 00
}
screenshot.jpg

Re: Carmageddon Max Damage (.zad)

Posted: Wed Nov 02, 2016 11:35 pm
by octaviousrex
herbert3000 wrote:I believe that the hierarchy of the models (and the relative position of the submodles) can be found in car.CNT.

c_body.MDL is only the chassis

@0xB2: face count = 23256

struct face {
int unknown; // always 0
int index1;
int index2;
int index3;
}

@0x5AE36: vertex count = 23441

struct vertex {
float x;
float y;
float z;
float nx; // vertex normals, I guess
float ny;
float nz;
float u;
float v;
float unknown;
float unknown;
byte unknown; // usually FF or 00
byte unknown; // usually FF or 00
byte unknown; // usually FF or 00
byte unknown; // usually FF or 00
}
screenshot.jpg

holy crap how the hell did you do that? cause I've been trying to decompile the MDL's ever since it was found to be a zip format and had no luck in working with them. but I think you are pretty right. but what program would work with .CNT file? anyways thanks for your work so far it means a lot.

Re: Carmageddon Max Damage (.zad)

Posted: Thu Nov 03, 2016 7:09 am
by herbert3000
I (or rather we) should have googled the file format first :)

As it turns out there's a program called Flummery that can import Carmageddon files but unfortunately Max Damage isn't supported (yet).
However, I checked the source code of the MDL and CNT formats and they are exactly the same except for the version byte in the file header.

Re: Carmageddon Max Damage (.zad)

Posted: Thu Nov 03, 2016 8:46 am
by octaviousrex
herbert3000 wrote:I (or rather we) should have googled the file format first :)

As it turns out there's a program called Flummery that can import Carmageddon files but unfortunately Max Damage isn't supported (yet).
However, I checked the source code of the MDL and CNT formats and they are exactly the same except for the version byte in the file header.
you make a good point. then again with the precurser game "Carmageddon Rencarnation" we were supposed to get modding tools because stianless knows that their games (fun as they are) are kept alive thanks to the thriving modding community. but we never got those tools. my hope is with this reworked game that they just released to steam is that they finally give us those tools....unless the community beats them to it first.

thanks for the information at this time I'll see what more I can do and try to post the results if I can make headway. thanks again for the post.

Re: Carmageddon Max Damage (.zad)

Posted: Thu Nov 03, 2016 5:53 pm
by herbert3000
Thanks for the background info. That sucks, hopefully they release those tools soon.

And here's a little update about the Flummery tool: Although I somehow managed to import the model, most of the textures just don't show up. I had to ignore some data that wasn't present in previous versions of the game. Obviously, saving the model back in the 'Max Damage' format also doesn't work.
screenshot.jpg

Re: Carmageddon Max Damage (.zad)

Posted: Thu Nov 03, 2016 7:48 pm
by Acewell
herbert3000 wrote:...I checked the source code of the MDL and CNT formats and they are exactly the same except for the version byte in the file header.
yep if you go to 0x02 in the mdl and change the 03 to 02 (Reincarnation = version 6.2 ?)
you can open it in Noesis with the native Stainless mdl format plugin. :D
c_body_mdl.png
here is a bms script to change the mdl version from 6.3 to 6.2
save the output to a new folder and not in the same location as the source files
then afterwards you can overwrite the source files with the modified ones :D
then you can open the mdl or cnt files with Noesis

Code: Select all

idstring "\x45\x23\x03\x06"
get NAME filename
set MEMORY_FILE binary "\x45\x23\x02\x06"
log NAME 0 0x4 MEMORY_FILE
append
get SIZE asize
math OFFSET = 0x4
math SIZE - OFFSET
log NAME OFFSET SIZE

Re: Carmageddon Max Damage (.zad)

Posted: Fri Nov 04, 2016 2:10 am
by octaviousrex
this is why I love this forum so much. you guys actually try to help people and I honestly cannot thank you enough for the help with this and some of my other pet projects it really appreciated thank you guys.

as to the recompiling back to max damage...I'd love that a lot if it can happen as I have fans of a 3d modeling project I was working on whom wanted me to port my models to this game and hopefully one day I can. this at least gets me to their models for study and understanding of what it will take to do that porting in the future and that means a lot guys so again thanks so much.

Re: Carmageddon Max Damage (.zad)

Posted: Fri Nov 04, 2016 3:22 am
by MrAdults
Oh, I didn't expect them to actually change the format for Max Damage. I'll loosen up the minor version check in the next Noesis so you don't have to mess with the data to view it. If it's still loading fine with the version change, it sounds like nothing was meaningfully changed data or structure wise.

This support was actually done for the iOS Carmageddon game back in 2012, I was pretty amazed that they changed virtually nothing all the way through Reincarnation in the model format itself.

Re: Carmageddon Max Damage (.zad)

Posted: Sat Nov 05, 2016 3:12 am
by CarLuver69
MrAdults wrote:This support was actually done for the iOS Carmageddon game back in 2012, I was pretty amazed that they changed virtually nothing all the way through Reincarnation in the model format itself.
As the old adage goes, "Don't fix it if it ain't broke."

Re: Carmageddon Max Damage (.zad)

Posted: Sat Mar 27, 2021 10:35 am
by addmixbb
Is there any chance that .wad files work similarly? I'm having trouble finding a way to open one.