You are here

Lets kick off modding! :D

Pages

AlexTSK's picture
I was in the War!
Posts: 2765
Submitted: Thu, 03/04/2014 - 12:25

Errol wrote:
Rippthrough wrote:
Well at least it's car shaped, that's better than I managed.

You were having a go at the MDL format? My processing code is here if that'll help any.

I've swapped the MTL and MT2 processing around so it'll parse the MT2 first if one exists and added support for ATI2 texture formats:

FatCat, the Eagle_R vert and face counts in their trianglestrip forms:

Spoiler:
Eagle_R
"c_Body". Faces 31803 Verts 35916
"c_Bonnet". Faces 2404 Verts 1312
"c_Spoiler_FL". Faces 32 Verts 48
"c_Tail_Flap_FL". Faces 822 Verts 1063
"c_Tail_Flap2_FL". Faces 580 Verts 831
"c_Spoiler_FR". Faces 32 Verts 48
"c_Tail_Flap2_FR". Faces 580 Verts 851
"c_Tail_Flap_FR". Faces 822 Verts 1082
"c_Inner_Exhausts_R". Faces 724 Verts 764
"c_Inner_Exhausts_L". Faces 724 Verts 734
"c_Door_R". Faces 4242 Verts 3094
"c_Window_R". Faces 111 Verts 72
"c_SVM_R". Faces 604 Verts 404
"c_Windscreen". Faces 156 Verts 97
"c_Blade". Faces 656 Verts 570
"c_Spike1". Faces 920 Verts 787
"c_Spike2". Faces 920 Verts 851
"c_Spike3". Faces 920 Verts 872
"c_Spike4". Faces 920 Verts 860
"c_Spike5". Faces 920 Verts 885
"c_Quarter_Panel1_FL". Faces 698 Verts 446
"c_Quarter_Panel_FL". Faces 1022 Verts 653
"c_Bumper_F". Faces 2438 Verts 2148
"c_Quarter_Panel_RL". Faces 1565 Verts 1049
"c_Boot". Faces 4296 Verts 2853
"c_Bumper_RR". Faces 666 Verts 412
"c_Exhausts_R". Faces 1215 Verts 1111
"c_Panel_R". Faces 896 Verts 1120
"c_Panel2_R". Faces 234 Verts 255
"c_Quarter_Panel1_RR". Faces 296 Verts 357
"c_Side_Skirt_R". Faces 365 Verts 263
"c_Headlight_Glass_L". Faces 183 Verts 106
"head_flare_L". Faces 292 Verts 299
"Steering_Wheel". Faces 1120 Verts 808
"c_RearLight_Case_L1". Faces 114 Verts 106
"reverse_flare_L". Faces 3 Verts 5
"tail_flare_L". Faces 6 Verts 8
"brake_flare_L". Faces 5 Verts 7
"c_RearLight_Case_R1". Faces 114 Verts 106
"tail_flare_R". Faces 6 Verts 8
"brake_flare_R". Faces 5 Verts 7
"reverse_flare_R". Faces 3 Verts 5
"Differential_IRS". Faces 700 Verts 822
"Wishbone_Link_R_IRS". Faces 68 Verts 104
"Damper_U_RR2_IRS". Faces 122 Verts 177
"Damper_U_RL2_IRS". Faces 122 Verts 187
"Wishbone_L_RR_IRS". Faces 400 Verts 486
"Damper_L_Pivot_R_IRS". Faces 112 Verts 152
"Wishbone_L_RL_IRS". Faces 400 Verts 488
"Damper_L_Pivot_L_IRS". Faces 112 Verts 152
"Damper_L_RR2_IRS". Faces 154 Verts 232
"Spring_RR2_IRS". Faces 584 Verts 778
"Spring_RL2_IRS". Faces 584 Verts 774
"Damper_L_RL2_IRS". Faces 154 Verts 220
"Wishbone_U_RR_IRS". Faces 188 Verts 261
"Wishbone_U_RL_IRS". Faces 188 Verts 256
"Hub_RL_IRS". Faces 176 Verts 212
"U_Joint_F_RL_IRS". Faces 66 Verts 97
"Caliper_RL". Faces 164 Verts 190
"Disc_N_Axle_RL_IRS". Faces 528 Verts 563
"Hub_RR_IRS". Faces 172 Verts 208
"U_Joint_F_RR_IRS". Faces 66 Verts 97
"Caliper_RR". Faces 164 Verts 273
"Disc_N_Axle_RR_IRS". Faces 528 Verts 618
"Damper_U_RL_IRS". Faces 122 Verts 187
"Spring_RL_IRS". Faces 584 Verts 774
"Damper_L_RL_IRS". Faces 154 Verts 220
"Damper_L_RR_IRS". Faces 154 Verts 232
"Damper_U_RR_IRS". Faces 122 Verts 187
"Spring_RR_IRS". Faces 584 Verts 778
"U_Joint_R_RL_IRS". Faces 66 Verts 97
"Driveshaft_Secondary_RL_IRS". Faces 70 Verts 99
"Driveshaft_Primary_RL_IRS". Faces 74 Verts 103
"U_Joint_R_RR_IRS". Faces 66 Verts 97
"Driveshaft_Secondary_RR_IRS". Faces 70 Verts 103
"Driveshaft_Primary_RR_IRS". Faces 74 Verts 107
"Engine". Faces 9023 Verts 10529
"Engine_Idler_Pulley". Faces 144 Verts 182
"Driveshaft_Damper_Belt". Faces 112 Verts 128
"Engine_Damper_Pulley". Faces 144 Verts 178
"Gearbox". Faces 4988 Verts 9050
"U_Joint_F_IRS". Faces 54 Verts 73
"Propeller_Shaft_IRS". Faces 104 Verts 146
"Gimble_F_IRS". Faces 44 Verts 72
"Gimble_R_IRS". Faces 44 Verts 72
"U_Joint_R_IRS". Faces 54 Verts 73
"Steering_Rack". Faces 632 Verts 834
"Steering_Column_Shaft_F". Faces 82 Verts 121
"Steering_Column_Joint_F". Faces 82 Verts 113
"Outer_Tie_Rod_R". Faces 230 Verts 317
"Outer_Tie_Rod_L". Faces 230 Verts 323
"Inner_Tie_Rod_R". Faces 167 Verts 201
"Inner_Tie_Rod_L". Faces 167 Verts 201
"Wishbone_Mount_FL". Faces 144 Verts 183
"Damper_U_FL". Faces 204 Verts 354
"Spring_FL". Faces 780 Verts 863
"Damper_L_FL". Faces 272 Verts 422
"Wishbone_L_FL". Faces 380 Verts 488
"Wishbone_U_FL". Faces 172 Verts 252
"Damper_U_FL_Pivot". Faces 164 Verts 236
"Hub_FL". Faces 248 Verts 404
"Disc_N_Axle_FL". Faces 366 Verts 547
"Caliper_FL". Faces 148 Verts 222
"Wishbone_Mount_FR". Faces 144 Verts 183
"Damper_U_FR_Pivot". Faces 164 Verts 236
"Damper_U_FR". Faces 204 Verts 231
"Spring_FR". Faces 780 Verts 865
"Damper_L_FR". Faces 272 Verts 424
"Wishbone_L_FR". Faces 380 Verts 488
"Wishbone_U_FR". Faces 172 Verts 252
"Hub_FR". Faces 248 Verts 404
"Caliper_FR". Faces 148 Verts 220
"Disc_N_Axle_FR". Faces 366 Verts 547
"c_Bumper_RL". Faces 666 Verts 412
"c_Exhausts_L". Faces 1215 Verts 1111
"c_Side_Skirt_L". Faces 365 Verts 249
"c_Door_L". Faces 4286 Verts 3107
"c_SVM_L". Faces 604 Verts 404
"c_Window_L". Faces 111 Verts 72
"c_Quarter_Panel1_RL". Faces 296 Verts 354
"c_Quarter_Panel_RR". Faces 1565 Verts 885
"c_Headlight_Glass_R". Faces 183 Verts 106
"head_flare_R". Faces 292 Verts 299
"c_Quarter_Panel1_FR". Faces 698 Verts 446
"c_Spoiler". Faces 5372 Verts 7050
"c_Tail_Flap1_RR". Faces 360 Verts 372
"c_Tail_Flap1_RL". Faces 360 Verts 372
"c_Tail_Flap_RL". Faces 760 Verts 727
"c_Tail_Flap2_RL". Faces 512 Verts 399
"c_Tail_Flap2_RR". Faces 512 Verts 399
"c_Tail_Flap_RR". Faces 762 Verts 730
"c_Quarter_Panel_FR". Faces 1022 Verts 651

Thanks a lot Errol, this is awesome news, that means I won't have to reduce any of my models for the game thus far haha, if anything I can add stuff!

Edited by: Bloodstability on Thu, 03/04/2014 - 12:26
suicidal_banana's picture
Cunning Stunt Licker
Kickstarter Backer
Posts: 262
Submitted: Thu, 03/04/2014 - 17:42

Updated first post again with all the recent goodies.

Ooooh, hard nipples. Noooo.... :( *limp nipples* Hmmm, vanilla nipples!

Gorth_le_Barbare's picture
Fluffy Bunny
Kickstarter Backer
Posts: 15
Submitted: Fri, 04/04/2014 - 06:34

@Purple44 : I never said you have to use unpacked ressources, i said you don't need to unpack in the first place.
But i'm glad to see you finally did it.

I tried to put only the "SQUAD_CAR" under easy mode and it worked. All the opponents were driving CU:NT. It was fun to take the APC and run over them. The problem is the modification take effect in all diffulty modes. So I think the difficulty is not implemented right now, at least for the opponent list, or maybe this list has another purpose...

Edited by: Gorth_le_Barbare on Fri, 04/04/2014 - 06:35
Purple44's picture
Cunning Stunt Licker
Kickstarter Backer
Posts: 208
Submitted: Fri, 04/04/2014 - 07:00

Gorth_le_Barbare wrote:
@Purple44 : I never said you have to use unpacked ressources, i said you don't need to unpack in the first place.
But i'm glad to see you finally did it.

I'm brainwash from modding Flatout 1 & 2 where we unpack the bfs game files, tweak the unpack games files, then pack them back up into a bfs file. Not use to Using 7zip or WinRAR to unpack a "game file" and then use 7zip or WinRAR to add modded files to a game file. I'm an old dog ( 55 ), but can learn new tricks. ;)

Edited by: Purple44 on Fri, 04/04/2014 - 07:00
KazzyMac's picture
Cunning Stunt Licker
Kickstarter Backer
Posts: 408
Submitted: Fri, 04/04/2014 - 07:17

The Eagle:R has about 115,000 polygons? Jesus. I didn't think it had that many, that's impressive o_o

On the subject of modding, I recognise the 'mtl' texture format so at the risk of making myself look like a dumbass, does that mean that Stainless are using renamed .obj files or something for 3D models? I've dabbled a bit in model editing before and a game me and a friend are working on use a combination of .obj 3D models for models and a .mtl file to assign basic colours/textures to polygons (the game doesn't have proper texture support yet).

I'm just trying to think of ways to get the car models loaded up easier ... or at the least without crazy holes in them. I'm actually trying to think why the model would have holes in it - something due to certain uses of polygons or something. You'll probably figure it out before I do.

What tools/programs are you guys using to try and make these things load properly? Again, taking a stab at making myself look like an idiot but there are so many posts in this thread it's impossible for me to keep track; I'm assuming you've tried to load the models in regular editing programs like Blender, 3DS Max, etc? The whole mention that some of the files are just renamed makes me suspicious that Stainless may have just done a sneaky-sneaky on the file extensions and stuff ;) but I'm probably wrong. Just trying to make headsense of the situation.

Carmageddon: Let's face it; reality is BORING.

My Lam0r Rig.

Errol's picture
Piledriver
Community VIPKickstarter BackerModerator
Posts: 962
Submitted: Fri, 04/04/2014 - 07:57

Hi KazzyMac, thanks for getting involved!

A lot of the file names (like MTL and MDL) are fairly generic extensions. MTL is commonly used to describe a MaTeriaL and MDL is used fairly regularly to describe a MoDeL. Unfortunately for us they don't seem to be simply renamed from another extension.

Fiddling around in the MDL files they seem to describe the mesh a few ways. Up near the top they have the standard faces/verts information you'd expect. I was using this information initially for my screenshots (which was why there were no holes). But this was barely half the file processed! Looking further they had what looked like TriangleStrips generated from the earlier data, these are what I'm rendering now. Unfortunately these seem to contain holes. I think I'm getting fairly close to solving this problem though as I've found a tiny model with only 8 faces. Half render, half don't. Shouldn't take too long to work out why!

As to tools, my screenshots are all taken from within an application I'm developing in parallel to working out the formats. It's called Flummery and will support all versions of Carmageddon (1, 2, TDR2000, iOS and C:R). A long with a few other formats I've worked out over the years.

:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
Making C:R mods happen since '14!

copmac's picture
Cunning Stunt Licker
PayPal Backer
Posts: 135
Submitted: Fri, 04/04/2014 - 09:03

Errol wrote:
Hi KazzyMac, thanks for getting involved!

...
As to tools, my screenshots are all taken from within an application I'm developing in parallel to working out the formats. It's called Flummery and will support all versions of Carmageddon (1, 2, TDR2000, iOS and C:R). A long with a few other formats I've worked out over the years.

What language are you writing the tools in. The part code you posted looks like c# is that correct?
If so you are a hell of a developer ;-)

Reading and writing binary code isn't that simple.

Errol's picture
Piledriver
Community VIPKickstarter BackerModerator
Posts: 962
Submitted: Fri, 04/04/2014 - 09:15

Yup, all coded in C#. I have a few different carma tools available on my githubs. Feel free to mock my shoddy coding paradigms and lack of unit-tests.

Fortunately not having to read binary, just hex. I like looking at files in a hex editor and trying to work out how they're all held together. It's my replacement to Sudokus after I coded something to do Sudokus for me.

Edited by: Errol on Fri, 04/04/2014 - 09:15

:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
Making C:R mods happen since '14!

lemonrev's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1628
Submitted: Fri, 04/04/2014 - 09:19

Errol :P, soduko :), i think if you could make a game out of hex then that would be funny, but i think practice is always making for a perfect uniform approach :).

Looking at hex is complex i have tryed this my self and unless you understand say a an assembler which mind you i have tryed to work out on my own and would like dearly to program on a assembler level playground then the hex and only then would i understand it.

Good luck and have fun with your puzzles :P

copmac's picture
Cunning Stunt Licker
PayPal Backer
Posts: 135
Submitted: Fri, 04/04/2014 - 10:57

Errol wrote:
Yup, all coded in C#. I have a few different carma tools available on my githubs. Feel free to mock my shoddy coding paradigms and lack of unit-tests.

Fortunately not having to read binary, just hex. I like looking at files in a hex editor and trying to work out how they're all held together. It's my replacement to Sudokus after I coded something to do Sudokus for me.

Cool gone poke around when back at home. Don't have VS 2012 or higher at work. VS 2008 :(

Oh well. For building server software it still does the job.

Pages

randomness