Dear returning Carmageddon fans Image

These last years, the CWA Board assimilated what was archived from many old Carmageddon forums, including the whole of the Official Carmageddon.com Forums.
If you wish to merge any previous account you might have had with your new or existing CWA account, don't hesitate to reach out to us !

Crush It - A crush data generator for Carmageddon

When the mayhem started! And its expansion pack made by interns!
Post Reply
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Crush It - A crush data generator for Carmageddon

Post by Errol »

Image

How to use:
Put some .dat files in the same folder as crushit.exe
Run crushit.exe
Copy the resulting crush data into your car file, replacing the 2nd crush data block

Check out the project link below for more info.

Project: https://github.com/MaxxWyndham/CrushIt
Binary: https://github.com/MaxxWyndham/CrushIt/ ... v1.0.0.zip
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
QTZ
hit n run
Posts: 211
Joined: Sun Jan 12, 2014 6:53 pm
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by QTZ »

:supercrazy: :beer: :supercrazy: :beer: :supercrazy: :beer: :supercrazy: :beer: :supercrazy:
User avatar
LinksofSphynx
mechanic
Posts: 33
Joined: Thu Mar 22, 2018 12:16 pm

Re: Crush It - A crush data generator for Carmageddon

Post by LinksofSphynx »

VERY impressive, Errol! Seems to work like a charm.

Image

Image

I can't tell if cars acquire mechanical damage more rapidly with this data chunk, though.
User avatar
Toshiba-3
BRender Actor
Posts: 5510
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by Toshiba-3 »

Here we are! 20 years later, the last missing piece of C1 modding has been attained :crazy:
Again, extreme thanks to you Errol. It means a lot to us and for C1 modding as a whole.
Plus it's a nice and straightforward software, makes it all very easy.

Image
fig.1: "Beautiful and delicate crushing"

@Links: Mechanical damage is handled by the condition chunks for top, bottom, left, right, front, back impacts toward the start of car txt files. BUT it is also influenced by the first value (softness) of the second crush data (the one CrushIt generates). You have to change it manually: 0.0 is rock solid (and no mech damage, thus invulnerable), 0.7 is default softness for tier 1 cars.

BTW: I'm editing the link to the first picture of your posts as hosting them on newgrounds doesn't seem to work with the script that create the thumbnails in the forum header.
Image / carmageddon add-ons at road reaction
User avatar
WadeSullivan
hit n run
Posts: 110
Joined: Thu Feb 14, 2013 4:54 pm
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by WadeSullivan »

Its happing! :shock:
Yeaaaaah awesome job!! I want to test that tool too XD
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by Errol »

Glad things are working well. :ssmile:

I'm going to do a bit of a technical write-up on how I worked out the numbers, as well as some pseudo-code and illustrations to aid with getting this functionality into other tools.

Let me know if you have any issues, I'm available through PM here, Discord, Twitter and email. You can also raise issues on the GitHub.
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by Harmalarm »

freaking awesome guys! Hats off to you sir Errol! Greets from NYC :D
User avatar
Mastro 666
motorised death
Posts: 968
Joined: Thu Jan 26, 2006 6:24 pm
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by Mastro 666 »

Crashing this car…with no survivors!

Image
User avatar
WadeSullivan
hit n run
Posts: 110
Joined: Thu Feb 14, 2013 4:54 pm
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by WadeSullivan »

Image

Its awesomeeeee :shock:
User avatar
Jaw_Breaker
driver
Posts: 62
Joined: Wed Sep 18, 2013 5:17 am
Location: Semarang, Central Java, Indonesia
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by Jaw_Breaker »

Nothing more satisfying than crushing C1 addon cars into mangled tin cans! :cool:
Image
Discord: SDY2205#3474
User avatar
QTZ
hit n run
Posts: 211
Joined: Sun Jan 12, 2014 6:53 pm
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by QTZ »

Tested (It working under XP!) with only two cars so far (I don't know why I can't upload images here anymore) - first with Toshiba-3 custom car - it working, but crush look different than in original cars. So tested with Mini (SUBFRAME) which originally crash the game at end of race when driven by player when broken and fixed. Crush data replaced by custom doesn't help, it crush different (IMO not as nice as originally, but not compared directly) and still give error at end of race. So my method - removing some part of crush data is still better... I think there must be something wrong with original model. Also this will be cool to generate crush data close to original. I think originally was possible to skip some parts from crushing preprocessing. Not tested yet, but RAMRAIDER have uncrushable "head", so I wonder if this tool will create crush data for it or not. Looking at the screenshot above I think this will be better with disabled crushing for such solid parts.

This is amazing you have done such tool and I hope for improvements ;). PS. It name is naughty as other tools in the C. universe - I like it too :)
User avatar
Toshiba-3
BRender Actor
Posts: 5510
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by Toshiba-3 »

CrushIt generates crush datas in a fashion extremely similar to the original cars. Some original cars have near 1:1 identical crush datas if you run them through CrushIt. Errol worked out CrushIt settings until it was able to replicate almost exactly those original crush datas.

It seems obvious to me that the crushing will look different if you apply it to an addon car with a higher polycount than the original cars...

MINI.DAT has degenerate faces. Have you attempted to repair it, apply CrushIt (tweaking the settings if the crushing isn't close enough to the original), and testing ingame?
Also you shouldn't compare CrushIt's crushing to your 'fixed' mini as the latter doesn't crush nicely anymore (only one side):
Image

Ramraider's ram is uncrushable because it isn't part of the main component. It wasn't possible to select uncrushable areas the way original crush datas were automatically generated (by the old MacOS PlayThing2), you simply had to detach them from the main component.


PS: Can't temporarily upload stuff to the CWA, just host it elsewhere like IMGUR.
Image / carmageddon add-ons at road reaction
User avatar
QTZ
hit n run
Posts: 211
Joined: Sun Jan 12, 2014 6:53 pm
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by QTZ »

It sound like CrushIt it's almost ideal from factory :)

Maybe including crush data require to make a car in specific way then (to look better after crash) :)

I don't know how to fix .DAT :( Maybe you can help? I think maybe it's even possible to keep original crush data (full of course) and just fix the model?

I didn't compared data, but just looked how the car crushing in game (of course full original data compared to custom - so I only guess the data is different - maybe not - I need to check).

As you know I made this fix completely blindly - with very limited knowledge about crush data - just trying each part of data one by one and eliminate every part that crashing game. Now we can look how it looks like - thanks for the screen-shoot :) It looks like this side is correct then?

I have made this fix *optional* just because I'm not satisfy as it is done. It's the only solution so far.
So I think fixed model should be the perfect way and definitive solution to replace current fix as non optional :)

I think CrushIt should warn about such situation in model.

Old MacOS PlayThing2? Is this available somewhere?
User avatar
Toshiba-3
BRender Actor
Posts: 5510
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by Toshiba-3 »

Errol's trying to figure out how some crush datas make the game crash upon exiting the race (and how to circumvent the issue).
It only happens with CARMA95 because it features a memory protection that was only intended for debugging. I guess Errol could explain it better.

In the meantime, Errol pointed to an instruction to patch to avoid the issue:
https://rr2000.cwaboard.co.uk/R6/CARMA95- ... e-skip.zip

QTZ: MacOS PT2 might be lost.
Image / carmageddon add-ons at road reaction
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by Errol »

In c you allocate a block of memory, use it and then free it. The "DAMAGE: after normal block" error occurs when memory is freed that has been written beyond the allocated amount.

Or, put more simply. The game says "I want 6 bytes", the game then writes 7 bytes and then calls free(). This will throw an error if the exe has been compiled in debug mode.

Stepping through with OllyDbg I was able to find the exact location the error occurred which has allowed Toshiba to skip the free() call and avoid the error. I'm now going to try and debug how the memory allocation is calculated in the first place and see why certain meshes cause issues.
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
70's Viking
hit n run
Posts: 237
Joined: Fri Aug 19, 2016 7:04 pm
Location: Norway
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by 70's Viking »

Image
Image

I must admit, its kind of weird to see Addon vehicles with the crush effect.
User avatar
Deep_Blue
Road Puppy
Posts: 4554
Joined: Wed Jan 10, 2001 12:00 pm
Location: In the Wind

Re: Crush It - A crush data generator for Carmageddon

Post by Deep_Blue »

YOU ROCK, BROTHAAAAAAAA!!
***When I die may I be surrounded by scattered chrome and burning gasoline***
User avatar
Toshiba-3
BRender Actor
Posts: 5510
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Re: Crush It - A crush data generator for Carmageddon

Post by Toshiba-3 »

Errol has updated Crushit to let the user set the minimum amount of vertices for a model to be processed.

Project: https://github.com/MaxxWyndham/CrushIt
Binary: https://github.com/MaxxWyndham/CrushIt/ ... v1.0.1.zip
Image / carmageddon add-ons at road reaction
Post Reply

Check who’s online

Users browsing this forum: No registered users and 18 guests