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 !

Car Setup Tutorials For Trents Maxscript Tools.

The 2016 reincarnation of Carmageddon! Thanks, SCi!
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Thanks. But is not working again. Maybe is a problem in other files.
'Not working again'? So was it working at some point?

Have you checked the Script_log.txt for anything regarding malformed commands or invalid data in the vehicle_setup.lol?

Alternatively, below is a modified version of a vehicle_setup.lol taken from one of my vehicles. The absence of a car class declaration or Hud damage levels shouldn't have caused any issues, but that is the only remaining difference between what I have previously suggested, and what I use.

Make sure everything else in the vehicle_setup.lol has been removed prior to adding this.


module(...)
camera_distance = 32
cop = false
tier = -1
progress = 0
shipped = true
class_rounded = false
class_speedy = false
class_smashy = false
hud_damage_levels = {
0.2,
0.4,
0.6,
0.8,
1
}
override_vehicle_name = "Interceptor"
override_driver_name = "Mad Max"
override_bio = "Max Rockatansky is a Main Force Patrol officer fighting for peace on the roads."
If that still doesn't work, then I don't know what the problem is. Both the above, and what I have previously posted work for me.

To narrow things down, it would be worth checking if the game is loading the Vehicle_Setup.lol at all. Check the camera distance for your vehicle in the pause menu, and see if it has been set to 32 (or whatever your value of choice is). If the camera distance in the pause menu has not been set to 32, then the game is not loading the vehicle_setup.lol at all, suggesting that your vehicle_Setup.lol is either incorrectly named, in the wrong folder, missing completely, or is screwed up in some other way. If the camera distance has been set to 32, then the game is at least partially loading the vehicle_setup.lol, but something else within it must be malformed/broken.

As far as I know - none of the other paperwork files should influence this at all.
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
LuckyMike
hit n run
Posts: 239
Joined: Thu Jan 07, 2016 8:51 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by LuckyMike »

I test this on other car and its working. I think the problem is in some of Interceptor files.



Heh. Then i just copy this .lol file in interceptor.zip and now its woking too. Broken zip or incorrect character encoding, i dont know... some kind of magic. 8)

User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Excellent, at least it's works now. :)
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
Sleep Dirt
hit n run
Posts: 153
Joined: Sun Nov 27, 2011 7:36 pm
Location: England, Isle of Wight

Car Setup Tutorials For Trents Maxscript Tools.

Post by Sleep Dirt »

Nice one for putting up this tutorial Mike, been getting me head round this past few days and just got the basics of 3ds Max sort of worked out (Farcry from C2's CarED), n got my first reference images in place ready to hit it!
The Ocean Is the Ultimate Solution.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

No worries, I do need to make a few minor updates to this. Mainly updating the section on Minge to the newest version, plus updating materials, available drivers/engine sounds/skid PFX/exhaust PFX, etc, plus adding a section for the CMD specific extras. I've just got to find the time for it.
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Level 1 - Preface/About:

This is a guide on how to set up a basic car for Carmageddon Max Damage (CMD) using Trents Maxscript Tools, available from here. This guide will not cover how to model or texture a car, there are plenty of tutorials out there for that.

Contents:

  • Chapter 1 - Required & Available Tools (as of April 20th 2017)

  • Chapter 2 - Files, Formats and a breakdown of the paperwork for cars in CMD

  • Chapter 3 (part 1), (part 2) - Rigging a basic car model with all the essential parts required for setup in CMD + a few extra parts that make it more usable

  • Chapter 4 - Exporting that car to the games format

  • Chapter 5 - Setting up basic paperwork and loading the car in-game

________________________________________________________________________________________________

Level 1 - Chapter 1

Required & Available Tools:

  • Trents Maxscript Tools, available from here (only compatible with 3ds Max 2011 and up)
    Used for rigging and exporting a car to the formats used in CMD

  • Gibbed Tools, available from here
    Used for converting textures to and from CRs .TDX format

  • LOLDecoder, available from here
    Used to decode CRs .LOL scripts, so you can edit them in notepad

  • Mod Installer N’ General Enabler, available from here
    Used to package the car into a ZIP file and get your car working in the CarMODgeddon Mode for CMD. Minge (as of 5.12) supports both Max Damage & Reincarnation. It also provides other tools for unpacking the main game data, and can launch Carmageddon directly

  • Any XML Editor of your choice
    Used for editing XML & MT2 files

Note: I recommend extracting all non-installing tools to a ‘Mod-Tools’ Directory and placing it inside the documents folder, which houses all of your car models. The Maxscript should be extracted to the same folder.

________________________________________________________________________________________________
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Level 1 - Chapter 5

Setting up basic paperwork and loading the car in-game:


________________________________________________________________________________________________

With the car exported, it is worth double checking the structure.xml to ensure that it has exported correctly, the last line should read ‘’. After converting the textures using GibbedTools (If the Maxscript was unable to convert them), paste them into the same directory as the exported car. The UI assets need to be placed into a subfolder called ‘ui_assets’ inside your car folder.

The penultimate step is to copy the paperwork (except the structure.xml) over from the closest matching car, and adapting it to fit. We need the following:

  • SystemsDamage.XML

  • Setup.LOL

  • Vehicle_Setup.LOL

  • Vehicle_Setup.CFG

  • VFX_Anchors.LOL

NOTE: Copy these from the closest matching official car, then open the .LOL files using LOLDecoder to decode them.

________________________________________________________________________________________________

5-A] Structure.xml (XML Editor required)

This only applies if you're setting up a custom trailer hitch

Navigate to where the 'Trailer_Hitch' part is defined. Then add the following command after the 'Set_Crushability()' command.

CDamageParameters:Set_TrailerHitch( 0, 0, 0, 1 )
Your 'Trailer_Hitch' part should look something like this.







Save & Exit.

_______________________________________________________________________________________________

5-B] SystemsDamage.XML (XML editor required)

There are 8 sections (bodywork, engine, transmission, steering, fl_wheel, fr_wheel, rl_wheel, rr_wheel) on a regular vehicle. Each section links to a specific damage function in the game. The only thing we need to do is update the ‘Add_SolidPart()’ and ‘Add_ComplicatedPart()’ methods so that the parts referenced in these methods are parts from your car.

In this instance I will change the part referenced in the ‘transmission’ section to engine, that way as the engine takes damage, the transmission will do too.

If building a vehicle with more than four wheels &/or tracks, then there will have to be additional sections in this file.

________________________________________________________________________________________________

5-C] Setup.LOL (once decoded, edit with notepad)

After decoding this, you will see that it contains lots of performance data, I am going to make minimal changes to it for this version of the car. In later tutorials I will make more thorough changes.

As this car is going to be slightly lighter & faster than Caddy, I will increase the ‘PowerMultiplier’, ‘SuspDamping’, and lower the ‘Mass’.

________________________________________________________________________________________________

5-C] Vehicle_Setup.LOL (once decoded, edit with notepad)

If copied from Eagle R or Hawk R, then minimal editing of this file will be required. The 'Vehicle Setup.lol' mainly defines what the opponent tier & the unlock node is for a car, which is not applicable to CarMODgeddon vehicles as all content is unlocked when running in CarMODgeddon mode.

The 'Vehicle Setup.lol' also defines

- Default camera distance setting for the chase camera

- UI Text

- Car Class for Multiplayer

Once you've decoded the vehicle_setup.lol. It may look something like this:

module(...)
default = true
camera_distance = 25
cop = false
eagle = true
tier = -1
progress = 2
shipped = true
leaderboard_id = 9
class_rounded = true
class_speedy = false
class_smashy = false
hud_damage_levels = {
0.2,
0.4,
0.6,
0.8,
1
}
If any of the following are present - You must remove them, these do not apply to custom vehicles

  • unlock_node = 14

  • eagle = true

  • leaderboard_id = 9

So it will end up looking like this, feel free to copy and paste this into your 'vehicle_setup.lol'.


module(...)
camera_distance = 25
cop = false
tier = -1
progress = 0
shipped = true
class_rounded = false
class_speedy = false
class_smashy = false
hud_damage_levels = {
0.2,
0.4,
0.6,
0.8,
1
}
override_vehicle_name = "Vehicle Name goes here"
override_driver_name = "Driver Name goes here"
override_bio = "Driver bio for your vehicle goes here"
}
When you test your car in-game, you can work out the desired value for the 'camera_distance' by tweaking it under the 'camera' section of the pause menu. Then copy that value into the 'camera_distance' setting.

________________________________________________________________________________________________

5-E] Vehicle_setup.CFG (XML editor required)

This will need to be edited to reference the desired external assets (wheels, engine sounds, Exhaust VFX, Skid Mark FX, Tire Smoke VFX, Tire Sound FX, Horn Sound FX, Driver, Trailers). The main amendments required are to change the wheels & skin sections.

5-E-i] Skins

Remove the custom skins (unless you’ve got skins to setup), so you are just left with a default skin, like so:

[material_map]
default
localise FE_CAR_78_GP_STOCK
shrapnel 180,180,180
The Localise Entry references UI text. It doesn’t matter what it is called at this point, as custom UI text cannot be loaded without invalidating the game cache.

The Shrapnel entry sets the RGB colour for shrapnel that is generated under heavy collisions (mimicking small shards of metal & plastic)

5-E-ii] Wheels

If you don’t have any wheels of your own, then you will need to reference the stock wheels from one of the official cars, you can have as many custom sets of wheels as you want, just maintain the correct syntax & formatting.

5-E-iii] In-Car Camera offset

The in car camera offset defines an XYZ transformation in car space.

[in_car_cam_offset]
-0.47,-0.43,-0.09
Negative X = Left, Positive X = Right

Negative Y = Down, Positive Y = Up

Negative Z = Back, Positive Z = Forward

5-E-iiii]Trailer Maps

Trailer maps define what trailers a vehicle can spawn with upon event load. This does NOT define what trailers can or cannot be attached, that is determined by the trailer hitch IDs assigned to the 'trailer_hitch' part in the structure.xml. If you do not have a 'trailer_hitch' part, then the game will automatically attach a trailer hitch to the back of your vehicle for attaching caravans.

Available default/official trailers:

  • Caravan

  • Flatbed

  • Flatbed_Empty

  • super_suppressor_rear

  • Tanker

________________________________________________________________________________________________

5-F] VFX_Anchors.LOL (once decoded, edit with notepad)

The ‘lump_name’s referenced in this file have to match the names of your exhaust node/s from the car hierarchy. If you only have one exhaust pipe (like this car) then remove one of the sections, making sure to close the brackets correctly.

________________________________________________________________________________________________

5-G] Loading the car into CarMODgeddon using MINGE

Before testing out your new car, I strongly recommend enabling the ‘script_log’. To Enable the Script Log:

  • Create a new Folder called ‘Diagnostics’ in your Carmageddon Max Damage Folder

    (…\Steam\SteamApps\common\Carmageddon Max Damage)

  • In steam, Right Click on Carmageddon Max Damage and select Properties

  • Select ‘Set Launch Options’

  • Type ‘-dumplogs’ in the prompt (without the quotations)

  • Press ok.

Thanks to AlexTSK for providing the setup info to re-enable the script_log.

Now, every time the game initialises, it will create a ‘Script_Log’ and ‘Session_Log’, within a time-stamped folder. This can help massively with tracking down errors & warnings.

Now to get the car into the game. Start up the ‘Mod Installer N’ General Enabler’ (MINGE)

  1. Make sure to set game to Max Damage (Game -> Select Game -> Max Damage)

  2. Select ‘Package Mods’ -> ‘Package Carmageddon Mod’

  3. Browse to the folder where the car was exported to

  4. Set Mod Type as 'Vehicle' & Game Type as 'Max Damage'

  5. Fill in the Meta Data as desired (Author, Website, Vehicle Name)

  6. Press ‘Package Mod’

  7. Once the mod has packaged, enable the car under the ‘vehicles’ section, save and load the game.

________________________________________________________________________________________________
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Level 1 - Chapter 4

Exporting the car to the games format


________________________________________________________________________________________________

4] Overview

This chapter will cover:

  • Exporting the main car to the games format

  • Exporting a collision mesh

________________________________________________________________________________________________

4-A] Main car export:

If all of the car setup has been done properly, then this should be nice & easy.

  • Select the Root of the Scene (c_Body)

  • Navigate to the ‘Export’ Tab in the MaxScript

  • Under the ‘Advanced Export’ -> ‘Car’ Tab, enable
    Convert Textures To TDX – only need to use on first export, converts .PNGs to .TDX

    Create Materials – creates basic materials for your car

    Export Structure.xml Data – Writes the Structure.XML

  • Press ‘Export Complete Car’

  • Navigate to your Steam …\Steam\SteamApps\common\Carmageddon Max Damage\CarMODgeddon directory

  • Create a folder for your car, in this case I am using MM_Tut1_78GP

  • Enter Car.CNT and press save

The export process may take several minutes depending on how high or low-poly your car is. If the following error comes up ‘–Unknown property: “Convert” in undefined’, then disable ‘Convert Textures To TDX’, and retry ‘Export Complete Car’, you will then have to convert the textures manually using 'GibbedTools'.

The following should eventually show once the export process has completed:

Export Car to:
C:\… …\DirectorySpecifiedByUserGoesHere Completed

IMPORTANT: If you have scaled or re-sized any part of your vehicle, then the ‘Bake Scale Into Mesh’ under the ‘CNT Hierarchy’ MUST be checked for all parts of the car, except: Driver Node, Exhaust Nodes, Wheel Nodes.

________________________________________________________________________________________________

4-B] Collision Model

4-B-i] Regular vehicles with a convex collision shape

Typically, these are vehicles that do not have a custom trailer hitch


The last piece to export is a simplified collision model. Per Poly Collision detection is an extremely heavy operation, so each car should have at least 1 simplified collision model (for the c_Body), which reflects the basic outer bounds of the car.

The collision model for this car is ultimately 4 cubes worth of geometry, that roughly matches the cars overall shape. All collision models should be similarly basic.

  • In 3dsMax this part needs to be named c_Body

  • The Pivot Point Should be set to 0,0,0 (like the proper c_Body)

  • Add ‘CNT Hierarchy’ data using ‘Tools’ -> ‘Common’ -> ‘Setup Hierarchy’
    The ‘content filename’ under CNT Hierarchy must be c_Body_Collision, otherwise it will override the proper car body

  • If you have re-scaled any part of the mesh, make sure the checkbox ‘Bake Scale Into Mesh’ is checked

  • Export this as Collision.CNT using ‘Export CNT & MDL Hierarchy’ under ‘Export’

4-B-ii] Vehicles with a con-cave collision shape

Typically, these are vehicles that do have a custom trailer hitch


If you're building a vehicle that needs a con-cave collision shape, such a Semi-Truck, then you will need to have a collision model consisting of at least two parts. The 'c_Body_Collision' will usually represent the chassis below the hitching point (incorporating the full length & width of the vehicle), with a second collision object for the cab, this second part can be called whatever you want, and must be parented to the "c_Body_Collision" model. Below, you can see an example taken from the '72 Moth Truck.

Red Outlines is the 'c_Body_Collision'
Yellow Outlines is the 'cab_Collision' which is parented to 'c_Body_Collision'


________________________________________________________________________________________________
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Troubleshooting

MaxScript Issues


__________________________

1] Upon export, I get an error message

‘–Unknown property: “Convert” in undefined’

This error can have one of at least two causes.

Cause 1 - Failed Texture Conversion

Sometimes this error will pop up when you export your vehicle and have enabled 'Convert Textures to TDX'. If it fails to convert the textures it will generate this error.

Cause 2 - Attaching or detaching Geometry from a part

If you make a change to any model part/s that result in a change in the number of triangles contained in that part (through any one of the following methods):

- Attaching parts

- Detaching Geometry from that part

- Deleting Geometry from that part

- Welding up Geometry

This results in the texture vertices and normals not matching up to the geometry vertices, and it will generate this error whenever you try to export this specific part to MDL. The simplest solution is to assign an 'Unwrap UVW' Modifier to any affected parts.

__________________________

2] Upon export, I get an error message

‘-Runtime error: Map support not enabled for specified map channel: 2’

This error means a mesh is missing a vertex colour channel. You should make sure that any vertices which aren't used for welds or the driver box (green, red, blue or purple as the common colours for those) should be set black with the alpha set to 1.0

__________________________

3] DotNet Error Message when launching the Maxscript

If the following error comes up when you run the maxscript:

An attempt was made to load an assembly from a network location which 
would have caused the assembly to be sandboxed in previous versions
of the .NET Framework. This release of the .NET Framework does
not enable CAS policy by default, so this load may be dangerous.
If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources
switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
To remove this message, you will need to make a change to the "3dsmax.exe.config" file, which can be found in the "3dsmax XXXX" Root directory (where XXXX is the year of your version of 3dsmax).

Open the config file, and add the following code to the configuration:

           

For more information on this error. Head to https://www.sigershop.eu/doc-troubleshooting/

Thanks to Starbuck for providing this updated link.

________________________________________________________________________________________________
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Troubleshooting

[WIP] Issues/Errors/Warnings, and tips for testing vehicles

__________________________

1] Balancing cars & issue of APO upgrades

When setting up & testing your cars in CarMODgeddon, you may find it is difficult to balance the stock performance & strength of your vehicle with the official cars due to the automatic APO upgrades applied to the AI drivers, which match the upgrades you have unlocked in the career rather than the APO upgrades on your currently selected vehicle, especially if you do not have any spare upgrade tokens to upgrade your car.

To test cars with 'stock' APO. Create a new save game for using in CarMODgeddon.

__________________________

2] Model & Material Issues


A] Model flashes pink

  • Missing Materials, check material names in car folder against names in 3dsmax

  • Invalid Material IDs, make sure material IDs on all parts start from 1 and are sequential

B] Model is really shiny, &/or textures are all back, &/or normal maps looks all weird

  • Missing Textures, check texture names in material (MT2) file are correct

C] Model/s are invisible

  • Materials referencing shaders that do not exist, check the shader type in the material (MT2) file is correct

D] Model Parts are all messed up (exploded)

  • Likely to be an issue with scaled parts - Make sure "Bake Scale Into Mesh" has been ticked under "CNT Hierarchy" on all model parts before exporting.



__________________________

3] Serious In-Game Issues & Crashes


This could be one long list...

A] Game Crashes upon event load (many, many causes, That is an understatement)

  • i] Invalid/mixed up physics properties in structure.xml

  • ii] Invalid weld strength in structure.xml

  • iii] Broken trailer hitch on vehicle or trailer in respective structure.xml

B] Tires are off-set in-game (multiple causes)

  • i] No weld vertices on wheel welds in structure.xml

  • ii] Mixed up physics properties in structure.xml

C] Game Crashes as vehicle takes damage

  • i] broken welds (incorrect weld vertex colours for jointed welds) in structure.xml

  • ii] broken joints in structure.xml

D] Game crashes when flaps open

  • i] broken welds (incorrect weld vertex colours for jointed welds) in structure.xml

  • ii] broken joints in structure.xml

E] Wheels are invisible

  • Materials referencing shaders that do not exist, check the shader type in the material (MT2) file is correct

  • Wheels not enabled in Minge

__________________________

4] Less serious issues


This could still be one long list...

________________________________________________________________________________________________
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

'Setup.LOL' & 'Vehicle_Setup.CFG' Parameters


________________________________________________________________________________________________

Reserved for a Parameters overview for the following files UNDER CONSTRUCTION

  • Setup.LOL

  • Vehicle_Setup.CFG

________________________________________________________________________________________________

'Setup.LOL' Parameters

Below is a decoded version of the 'Setup.lol' taken from Caddy Fat Cat. Comments are in Red, some are based off comments in code taken from games .exe

car:SetCollisionEffect("effects.f_carsharpnel06", 10.5) Enables Shrapnel Particle FX in collisions
car:SetPowerMultiplier(1.702) // Base Power Multiplier, increased by Power upgrades
car:SetTractionFactor(1.5) // Base Traction Value for Wheels, applies to forward/reverse motion
car:SetFinalDrive(1) // Final Drive/Differential Ratio
car:SetRearGrip(1.2) // Grip Factor for Rear Wheels in Gs
car:SetFrontGrip(1.5) // Grip Factor for Front Wheels in Gs
car:SetCMPosY(0.52) // Position of Centre of Mass (Y Axis/height)
car:SetCMPosZ(0) // Position of Centre of Mass (Z Axis/length), 1.0 is over front wheels, -1.0 is over rear wheels, 0.0 is half way between
car:SetFrontDownforce(20) // Down-force on front wheels in Kg (A Splitter or Air Dam would increase this IRL)
car:SetRearDownforce(20) // Down-force on rear wheels in Kg (A Rear Wing would increase this IRL)
car:SetFrontRoll(0.3) // Anti Roll bar strength, 1.0 = Stiff, 0.0 = Soft (Front)
car:SetRearRoll(0.3) // Anti Roll bar strength, 1.0 = Stiff, 0.0 = Soft (Rear)
car:SetFrontCriticalAngle(6) // Angle at which Front Wheels lose traction
car:SetRearCriticalAngle(6) // Angle at which Rear Wheels lose traction
car:SetFrontSuspGive(0.25) // "Amount of suspension compression due to the weight of the car"
car:SetRearSuspGive(0.25) // "Amount of suspension compression due to the weight of the car"
car:SetSuspDamping(0.2) // Sets suspension damping
car:SetMomentOfInertiaMultiplier(1)
car:SetSteerSpeed1(1) // Steering Speed (1 is normal)
car:SetSteerSpeed2(0.5) // Steering Speed
car:SetSteerSpeedVel(150) // Steering Speed
car:SetSteerCentreMultiplier(2) // Multiplier of Steering Speed for when straightening up
car:SetMaxSteeringAngle(40) // Maximum Steering Angle
car:SetBrakeBalance(60) // Percentage of Brake force sent to front wheels
car:SetBrakeForce(60) // Brake Force in newtons, per kg of vehicle mass
car:SetHandBrakeStrength(10) // Strength of Parking/Hand-Brake
car:SetTorqueSplit(65) // Percentage of Torque sent to rear wheels
car:SetLSDThresholdF(10) // Difference in wheel speed between left & right wheels required to lock diff, value is in radians per second
car:SetLSDThresholdR(10) // Difference in wheel speed between left & right wheels required to lock diff, value is in radians per second
car:SetLSDThresholdM(10) // Difference in wheel speed between left & right wheels required to lock diff, value is in radians per second
car:SetReversePowerMulitplier(1) // Additional power multiplier for when in reverse gear
car:SetWheelMass(10) // Mass of wheels (per 1000Kg of Vehicle)
car:SetDragCoefficient(0.4) // Drag Coefficient, this can affect the vehicles ability to reach it's theoretical (gearing) top speed
car:SetSteerLimit1(0) // Apparently "prevents wheels from getting turned too much for given speed"
car:SetSteerLimit2(0) // Apparently "prevents wheels from getting turned too much for given speed"
car:SetSteerLimitSpeed(0) // Speed at which "steer limit 2" is applied
car:SetCastorSpeed1(0) // Not Sure, haven't tweaked these
car:SetCastorSpeed2(1) // Not Sure, haven't tweaked these
car:SetCastorSpeedVel(100) // Not Sure, haven't tweaked these
car:SetSteerGyroscope(1) // When enabled, steering wheels will "maintain their world-space alignment", this might partially acts as an automatic counter-steer
car:SetBrakeAttack(1) // Rate that Brakes affects speed
car:SetHandBrakeAttack(0.1) // Time taken for Hand/Parking Brake to reach full strength
car:SetSlideSpinRecovery(1) // Not Sure, haven't tweaked these
car:SetRollingResistance(0.018) // Rolling resistance
car:SetDriveMI(2.2) // Moment of inertia due to drive system (Including gear box, wheels etc)
car:SetEngineMI(0.06) // Moment of inertia in engine
car:SetRedLine(6500) // Limits/Governs Engine RPM - Limiter doesn't apply to reverse or top gear
car:SetMaxRevs(8000) // Maximum Engine RPM when limiter disabled
car:SetLimitRevs(true) // Enables Governor/Limiter of engine RPM - Limiter doesn't apply to reverse or top gear
car:SetConstantEngineFriction(833) // Mechanical Drag in engine (Constant Retardation/Deceleration Torque)
car:SetLinearEngineFriction(0) // "Retardation torque in engine proportional to angular velocity"
car:SetQuadraticEngineFriction(0.0023) // "Retardation torque in engine proportional to square of angular velocity"
car:SetConstantDriveFriction(9.1) // Constant Mechanical Drag in powertrain "Constant retardation torque in drive system"
car:SetLinearDriveFriction(0) // "Retardation torque in drive proportional to angular velocity"
car:SetQuadraticDriveFriction(0.0008) // Not Sure, haven't tweaked these
car:SetEngineBrakeDelay(0.5) // Delay in brakes applying after being pressed
car:SetEngineBrakeAttack(0.28) // Engine Brake rate, time taken from when Engine is at zero throttle
car:SetClutchDelay(0) // Time Clutch is engaged when changing gears
car:SetMass(1900) // Base vehicle Mass in KG
car:SetNumGears(5) // Number of Gears (excluding Reverse & Neutral)
car:SetGearRatios(10, 13.86, 8.2193, 5.7005, 4.2327, 3.2277, 2.6775, 2.1616, 1.7157, 1.3752, 1.1346) // See 'Other Notes'
car:SetTorqueCurve(20, 180, 262, 294, 320, 294, 262, 208, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) // Torque values at 1000 RPM intervals starting from zero
car:SetStabilityGripChange(0.4) // Amount of extra grip added to wheels by stability control. I'm not sure if this applies per wheel, or per axle
car:SetStabilityThreshold(0.5) // Time taken for stability/grip control to kick in, 0 is immediately, value can be up to 100

__________________________

Other Notes:

  • Gear Ratios are the same on all official cars, top speed is altered mainly by changing number of gears

  • I'm not entire sure what the first number (10) under gear ratios does, every time I've changed it has resulted in strange behaviors. Regardless, the numbers that follow it are used for the following gears: 1st/Reverse, 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 9th, 10th,

  • I suspect Torque Curve values are in Newton Metres

  • All Cars have the same RPM characteristics, 6500 RPM red-line, 8000 Max, lowering Max RPM will lower top-speed

  • Performance on official cars in primarily differentiated by: Power Multiplier, Torque Curve, Mass, Steering Speed and suspension parameters

________________________________________________________________________________________________

'Vehicle_Setup.CFG' Parameters


__________________________

Available Exhaust Smoke Particle FX

Updated to reflect changes made in CMD

  • f_diesel_exhaustsmoke02

  • f_diesel_exhaustsmoke03

  • f_diesel_exhaustsmoke04

  • f_megawootexhausts

  • f_siamesedreamexhaust

  • f_venomexhaust

  • f_yankv8_exhaustsmoke02

  • f_yankv8_exhaustsmoke03

  • f_yankv8_exhaustsmoke04

  • f_turbo

  • f_hotrod

  • f_megaturbo

__________________________

Available Engine Sounds

Updated to reflect changes made in CMD

  • engine Drag

    Hot Rod V8 Sound
    used by Twister & Subpressor

  • engine firetruck

    Volvo F12 Firetruck Diesel Sound
    used by Plow, Lumberer, Bear, APC, BlitzKrieger, Rig O Mortis, Super Suppressor

  • engine SUV

    1980s Jeep CJ7 Sound (I6 or V8)
    used by Caddy Fat Cat, Hevy Impaler Towmeister, Stiffshifter, Crazor, Razorbill, Tropikill

  • engine Euro_V8

    Modern Maserati V8
    used by Eagle R, Tez Eagle, Hawk R, Iron Hawk, Annihilator, Cleaver, Countslash, De'Gory Un, KVN Toucan, Snaky Bastard, Tashita, Volkswerker

  • engine Electric_Blue

    Electric Car sound
    used by Electric Blue only

  • engine SiameseDream

    Jet Engine Sound
    used by Siamese Dream only

  • engine kart

    Go Kart Sound
    Used by Squad Car/CU:NT only

  • engine Sportscar

    Exotic V12 Sound
    Used by Shredlight only

  • project_x
    Used by Project X only

__________________________

Available Driver Models

Updated to reflect changes made in CMD (Applies to AI only)

  • DRIVER_BODY_anna

  • DRIVER_BODY_autoscum

  • DRIVER_BODY_don

  • DRIVER_BODY_ed

  • DRIVER_BODY_grimm

  • DRIVER_BODY_grimm_02

  • DRIVER_BODY_harry

  • DRIVER_BODY_ivan

  • DRIVER_BODY_kutter

  • DRIVER_BODY_max

  • DRIVER_BODY_neotwig

  • DRIVER_BODY_otis

  • DRIVER_BODY_pitbull

  • DRIVER_BODY_roman

  • DRIVER_BODY_rusk

  • DRIVER_BODY_screwie_lewie

  • DRIVER_BODY_stella

  • DRIVER_BODY_stig

  • DRIVER_BODY_twins_l

  • DRIVER_BODY_twins_r

  • DRIVER_BODY_val

  • DRIVER_BODY_vlad

  • DRIVER_BODY_HEINZ

  • DRIVER_BODY_madam_scarlett

  • DRIVER_BODY_HAMMERHEAD

  • DRIVER_BODY_mother_trucker

  • DRIVER_BODY_ed_les

  • DRIVER_BODY_ED_HUNTER

__________________________

Available Horns

Updated to reflect changes made in CMD

  • generic01_horn - Generic Horn

  • generic02_horn - Generic Horn

  • generic03_horn - Generic Horn

  • monster01_horn - Truck Air-Horn

  • monster02_horn - Truck Air-Horn

  • monster03_horn - Truck Air-Horn

  • stiffshifter_horn - Piano Pipes

  • americansemi_horn - American Semi truck Air horn

__________________________

Other Factors:

  • max_compression - limits max compression

  • max_extension - limits max extension

  • max_steering_lock - limits steering lock

  • ride_height - sets ride height relative to wheels current position, not entirely sure of its use

________________________________________________________________________________________________
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
Doctor Fraggington
turbo bastard
Posts: 307
Joined: Wed Jan 15, 2014 1:47 am

Car Setup Tutorials For Trents Maxscript Tools.

Post by Doctor Fraggington »

Image links are broken. "Please Update Your Account to Enable 3rd Party Hosting"
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

It's a known issue, I am not paying photobucket to enable '3rd party hosting' for a few dozen images. So the images will be getting re-located to my web-host when I get a chance.

EDIT: Test re-location on post #4 has worked, I will look into completing the operation for all images tomorrow or thursday.
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
Doctor Fraggington
turbo bastard
Posts: 307
Joined: Wed Jan 15, 2014 1:47 am

Car Setup Tutorials For Trents Maxscript Tools.

Post by Doctor Fraggington »

Oh, no, I certainly didn't expect you to address the problem by paying photobucket.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

I know right.

Regardless, all images have now been re-linked.
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Level 1 - Chapter 2

Breakdown of Files & Formats in Carmageddon Max Damage:


________________________________________________________________________________________________

2-A] ZAD & ZIP Files:

All official assets in Carmageddon Max Damage are stored in ZAD archives. ZAD archives are simply renamed ZIP files, these can be opened with WinZip, WinRAR, etc.

In CarMODgeddon, all supported Mod content (Vehicles, Wheels & Levels) needs to be stored in ZIP archives. The Directory Structure within the ZIP files is different to the directory structure in the official cars ZAD files and old style 'Legacy Mods' ZADs, but you do not need to worry about this as Trents 'Mod Installer N' General Enabler' (MINGE) will take care of it for you.

________________________________________________________________________________________________

2-B] Model & Textures:


____________________________
Models:

Unlike most games, in Carmageddon Max Damage, car models are stored across multiple model files (.MDL), and all these parts are referenced by a central Hierarchy & Node file .(CNT). The .CNT files do not contain any model data, but define:

  • Parent/child links between the model (.MDL) parts and Null Nodes

  • Where each part (.MDL) is positioned in car-space, (Transformations & Rotations)

  • Additional Node types such as Null Nodes and LITg Nodes.
    Null nodes represent a point in 3d world-space (there is no model information).

Each car usually has two .CNT files

  • Car.CNT - Referencing all main model & parts

  • Collision.CNT - References one or more simple collision meshes

____________________________
Textures:

In Carmageddon Max Damage, all textures used by the cars are stored in the .TDX format. The primary way of converting to and from this format is using GibbedTools, which allows you to convert .TDX files to Portable Network Graphics (.PNG) and convert from .PNG to .TDX.

____________________________
Materials:

Those familiar with 3d modelling will be aware of setting up materials in your modelling application. In Carmageddon Max Damage, material properties are defined in MT2 files. MT2 Files are modified .XML files, and reference one of many preset shaders in Carmageddon Max Damage. Some of these shaders may just take a diffuse texture, others may take in normal & specular maps, and possibly damage & back-face textures. Some will also enable transparency based on Alpha channels (used for windows, lights, flares).

________________________________________________________________________________________________

2-C] Paperwork:


____________________________
2-C-i] Structure.XML

The Structure.XML is the backbone of the car. This file will define what each node & Model from the cars Hierarchy (.CNT) does. This includes (but is not limited to):

  • Basic car characteristics (Offence, General Defence, Car Defence, among several other values)

  • Values determining if parts can deform and if so, by how much

  • Weld parameters, defining what each part is ‘Welded’ to, and how strong the ‘Weld’ is

    Sometimes ‘Welds’ may contain joints allowing parts to open/close or hang before breaking off

  • Physics properties, linking parts to specific behaviours (Wheels, Hubs, etc)

  • Collision parameters

  • Animations (Rotations, Slides, Vibrations, Rocking motions)

  • Advanced suspension setup, Macpherson Strut, Double Wishbone, and Live Axle (with Trailing Arm) are the supported types

  • Point to Point Animations (used for moving parts around in worldspace, mainly used for animating suspension & steering parts)

  • Light settings for car lights

  • Referencing weapon characteristics, to get specific parts to increase damage done to cars, props or pedestrians

  • Advanced damage settings, for substituting materials & subsequently textures (used for windows & lights)

  • Trailer Hitch settings

  • Track IDs & track settings for tracked vehicles

____________________________
2-C-ii] SystemsDamage.XML

The SystemsDamage.XML file defines what it takes to wreck the car. This file specifies what ‘damageable’ parts exist (Body, Engine, Transmission, Wheels, Steering, Tracks, Etc), and how big a contribution damage to these parts makes to physical damage in-game, it also links these damage sections to parts from the car, to correctly localize damage. This way when the cars engine model is hit, it will trigger engine damage.

____________________________
2-C-iii] Setup.LOL

The Setup.LOL file contains all performance data defining how the car will drive and handle, this includes (but is not limited to):

  • RPM Characteristics

  • Torque Curve

  • Gear Ratios

  • Brake Strength and bias

  • Suspension Give & Damping

  • Steering speed and max angle

  • Mass

  • Centre of mass Position (Y & Z positions only)

____________________________
2-C-iv] Vehicle_Setup.LOL

The Vehicle_Setup.LOL primarily defines

  • - Vehicle tier, requirements to unlock it & Leaderboard ID
    Not applicable to Mod Vehicles in CarMODgeddon at this time

  • - Camera Distance settings

  • - Vehicle Class

  • - UI Text (Custom Vehicles only)

Feel free to copy the example below into your vehicle_setup.lol and ammend as necessary.

module(...)
camera_distance = 32
cop = false
tier = -1
progress = 0
shipped = true
class_rounded = false
class_speedy = false
class_smashy = false
hud_damage_levels = {
0.2,
0.4,
0.6,
0.8,
1
}
override_vehicle_name = "Vehicle Name goes here"
override_driver_name = "Driver Name goes here"
override_bio = "Driver bio for your vehicle goes here"

____________________________
2-C-v] Vehicle_Setup.CFG

The Vehicle_Setup.CFG defines all external files the car references, such as:

  • Exhaust (Smoke) Particle FX

  • Tyre (Smoke) Particle FX

  • Tyre Sound FX

  • Engine Sounds

  • Stock wheels

  • Custom Wheels

  • Driver Model/s (AI opponents only)

  • Any trailers the vehicle can spawn with upon event load (includes separate settings for AI & Multiplayer)

This file also defines:

  • Any skins/paint jobs for the vehicle

  • The statistics printed to the UI

  • In-Car camera offset to position the camera in-game

  • Garage camera offset for larger vehicles

Furthermore, there are several other commands that can be used to:

  • disabling driver ejection

  • Limiting suspension extension

  • Limiting suspension compression

____________________________
2-C-vi] VFX_Anchors.LOL

This file will link particle effect emitters (for your exhaust smoke FX defined in Vehicle_Setup.CFG) to parts from the car. Typically the exhaust emitters are Null nodes.

________________________________________________________________________________________________

2-D] UI Assets:

The basic UI assets are the 4 images below:

◦XXXXX_Default_Top – Top view render of the vehicle used in Menu Grid position screen, vehicle front faces left edge of image (720×360 pixels)


◦XXXXX_Default_Side – Side view of vehicle pointing right (180×90 pixels)


◦XXXXX_Default_Minimap – Smaller version of Top, used in the minimap, vehicle front faces left edge of image (180×90 pixels)


◦XXXXX_Driver – Driver image used in Grid screen and garage, see official cars for positional reference (512×324 Pixels)

‘XXXXX’ will be the folder name of your vehicle. These MUST match, otherwise the UI assets will not work in-game.

The advanced UI asset (damage indicator) will be covered in Level 2.

________________________________________________________________________________________________
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Level 1 - Chapter 3 (Part 1)

Rigging a basic car model with all the essential parts required for setup in Carmageddon Max Damage (CMD)


________________________________________________________________________________________________

3-A] Setting up the Tools

To enable the Maxscript:

  • Press the ‘MAXscript’ dropdown in 3ds Max,

  • Navigate to ‘Run Script’

  • The prompt will automatically go to your 3ds max/scripts folder

  • Navigate to where the 'ReincarnationTools' Maxscript folder is stored

  • Select 'ReincarnationTools.ms'
    NOTE: While the current release version of the MaxScript was made for Reincarnation, it still works fine with exporting models & configuring vehicles for use in Max Damage.

You may or may not get a DotTime exception error that may look something like this:

An attempt was made to load an assembly from a network location which 
would have caused the assembly to be sandboxed in previous versions
of the .NET Framework. This release of the .NET Framework does
not enable CAS policy by default, so this load may be dangerous.
If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources
switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

To deal with this error, you will need to make a change to the "3dsmax.exe.config file". Head to the Troubleshooting section for instructions.

The tools should show up regardless. You can ‘Dock’ the menu with the sidebar in Max, or keep it as a floating toolbar. You may need to set the GibbedTools directory under the ‘Tools’ -> ‘Settings’ section of the MaxScript. This will enable the MaxScript to convert your textures for you when you export the car.

NOTE: The textures MUST be loaded in as .PNG if you want the MaxScript to convert them to the games .TDX format.

________________________________________________________________________________________________

3-B] Required parts for Car setup:

As we are setting up the simplest type of car (that should work reasonably well in-game), We only need 2 model parts.

  1. The Car body (generally named ‘c_Body’)

  2. An engine model

Additionally We are going to need 14 Null Nodes, which will be setup using the MaxScript:

  • 4 x Wheel Nodes (Defining the position & scale of the wheel models in-game)

  • 4 x Brake Nodes (Defines the brakes, an actual model part/s will be used in Level 3)

  • 4 x Hub Nodes (Anchoring point for car wheels to body, an actual model part will be used in Level 3)

  • Driver Node (Where the driver Model will go)

  • Exhaust Node (Where the Exhaust smoke will originate from, you can have multiple nodes if you have 2 or more exhaust pipes)

________________________________________________________________________________________________

3-C] Getting Started:

With what is needed for the car defined, We can begin. below you can see an imported model into 3ds Max with the MaxScript running.


First step is to get the basic material names setup. As this model has been imported from a .3ds, all materials are named ‘Material#0′, ‘Material#1′, etc. If you’ve built you car in max, you’ll probably already have the materials names setup. The only name of pivotal importance is the ‘bodywork’ material needs to be called ‘Paint’ if you want to be able to change paint jobs/skins in-game.

Otherwise the materials are named appropriately for this car

  • Windows & Lights material -> glass

  • Bodywork material -> Paint

  • Chrome Trim material-> Trim

  • Licence Plate material -> plate

  • Miscellaneous (Grille, Chassis, Interior) material -> Misc

NOTE: If there is no 'paint' material, then the game will crash when you try to load an event.

________________________________________________________________________________________________

3-D] Car position, Orientation & Pivot Point

In Carmageddon Max Damage, the Origin/Pivot Point/Local Axis of the root note (the car body) represents the Ground, and as such the pivot point of the root of the car (Car Body) should be set at (0,0,0) in World Space. This means that your car model must be positioned so the wheels would be touching the ground (Y=Zero), like below


Having moved the car to the correct place, To set the Pivot point of the Car Body back to (0,0,0):

  • Select the Car Body Model only

  • Navigate to the ‘Hierarchy’ Tab on the right menus

  • Press Affect Pivot Only

  • Make sure ‘Absolute Mode Transform Type-In’ (Below the Timeline) is disabled

  • Then Type ‘0.0’ into the X, Y & Z Boxes



Additionally, the car should be rotated so that the front is pointing in the direction of negative values in the Z Axis (this is known as the Y axis in 3ds max).

With that done, now we need to look at adding the necessary parts to the car hierarchy.

NOTE: the car body is named c_Body as the ‘c_’ prefix denotes a part that is crushable on the official CR cars, it is your choice as to whether or not you follow this practice. The ‘c_’ prefix will not automatically make the part crushable, but implies that the part should be made crushable in the structure.xml, parts that are not crushable do not have this ‘c_’ prefix (engine, transmission, hubs, wheels, suspension parts and typically weapons)

________________________________________________________________________________________________

3-E] Adding in the Hub Nodes & Brake Nodes

In section ‘3-B’ We listed the Null Nodes needed for vehicle setup. A Null Node is literally a point of ‘No Displacement’ (A position in World-space) with no geometry, hence ‘Null’. With the MaxScript loaded, the easiest way to create a Null-Node is to Navigate to the ‘Tools’ Menu -> ‘Common’ -> ‘Create Null Node’.

If you press ‘Create Null Node’ while nothing is selected, it will create a null node at the origin of the scene (0,0,0), but if you select a part before creating it, such as a wheel, it will create the Null Node at the Pivot Point of the wheel (make sure the pivot point of each wheel model is set using ‘Center to Object’ prior to creating the null node).


Afterwards, we will hide the wheel models and can see each of the ‘Null Nodes’ that will become the ‘Hubs’.


If we Return to the ‘Modify’ Tab and select one of the Nodes, you will see that the MaxScript has named each Node ‘NewNullNode’, and you will see a ‘CNT Hierarchy’ Section in the modifiers tab. Only parts that have ‘CNT Hierarchy’ data can be exported by the MaxScript.

We are going to rename each Null Node (including the ‘Content Filename’ in the ‘CNT Hierarchy’) to Hub_XX, where ‘XX’ represents which wheel the Hub is for (FL, FR, RL & RR).


Next, We need to set the Hubs as ‘Child’ Objects of the Car Body. For those unfamiliar with hierarchies, press the ‘link’ button (The small chain link icon). Depending on your version of 3ds Max, this might appear in a different place in the Toolbars.

NOTE: For those unfamiliar with hierarchies, the purpose of a model hierarchy is to create parent/child links between models that reflect how parts are connected in the real world. For Example: a Licence plate may be attached to a bumper, and then the bumper is attached to the chassis. Now, if the Licence plate is not a child object of the bumper, when the bumper detaches – the licence plate will be left ‘floating’. Hence, this is why the cars have a hierarchy for all parts.


When active, the icon will be illuminated:


Select one of the Hubs and Drag it to the Car Body, when you release the mouse, the car body wire-frame should flash to indicate the link, repeat this for all hubs. If you accidentally select a different part, then repeat the process for the correct part, or press the ‘Unlink Selection’ button next to the ‘link’ tool to break the link and then recreate it.

The links for the hierarchy can also be set using the schematic view (Icon with two boxes connected by an arrow). The ‘Connect’ Tool within the schematic view works the same as the ‘link’ tool is the main UI, and has the same chain link icon.


With the hubs in place, we are going to use them to create the brakes

  • Right Click on a Hub -> ‘Clone’

  • In the Prompt, make sure to select ‘Copy’ instead of ‘Instance’, and confirm

  • Name each copy ‘Brake_XX’, where ‘XX’ represents which wheel the Brake is for (FL, FR, RL & RR), make sure to change the ‘Content Filename’ under the ‘CNT Hierarchy’ modifier as-well

  • Using the schematic view, make the brake Nodes Child objects of the Relevant Hub

  • If you want, you can then offset the brakes from the hubs (X axis only!) to make selection easier

________________________________________________________________________________________________

3-F] Adding the Wheel Nodes

In the same way that we used the wheel models as reference for creating the Hubs, we are going to use them again to create the Nodes that are used for the wheels in-game. The MaxScript comes with an additional ‘WheelPlaceholder’ system for wheel nodes, that will provide a visual representation of how big the wheels are. This will allow you to scale them perfectly to the required size without having to rely on Trial & Error (exporting multiple times) to get the wheel size right.

Go to the ‘Tools’ -> ‘Car’ section and you will notice a ‘Wheel Tools’, where you can create the wheel nodes in several ways:

  • create a node for each wheel individually

  • create 4 wheel nodes in one go

  • convert a model to a wheel node

If we select one of the wheel models, and then create the appropriate wheel, it will create a wheel node at the origin of the Wheel Model.

NOTE: You might get a warning prompt ‘– Unable to convert: undefined to type: Integer’, disregard it.


Alternatively, if we press ‘create set of 4 wheels’, it will create 4 wheels, all positioned at default values set by Trent, these will need to be positioned manually to where your wheels are. Use whichever tool is of preference, but if you’re creating each wheel individually, be sure to change the drop-down to match the wheels position, otherwise it will generate extra work (having to change names & physics properties) later.

With the wheel nodes created, the next step is to make each wheel a child object of the relevant brake node. It will be easiest to do this using the schematic view. With that done, the hierarchy should look something like this.


________________________________________________________________________________________________

3-G] Engine, Driver Node & Exhaust Node

With the Hubs, Brakes & Wheels now present (although they still need to be configured). The only remaining parts are the Engine model, Driver Node and Exhaust Node.

Engine

Make the engine child part of the 'c_Body'


Exhaust & Driver Node

To create the driver and exhaust nodes, we are going to use ‘Tools’ Menu -> ‘Common’ -> ‘Create Null Node’.

The Driver Node is where the driver is going to sit, so position it accordingly. Since this model has a basic silhouette interior with very little detail (like the traffic cars in Simpsons Hit & Run), the node will have to be positioned where the base of the drivers seat would go. Remember to name this part (including its ‘content filename’) to Driver.


The exhaust Node needs to be positioned where the Tail-pipe ends, and will be called VFX_Exhaust. If you’ve got dual exhausts, then name this node 'VFX_Exhaust_L', create a second node, and name it 'VFX_Exhaust_R'. Alternatively call the nodes 'VFX_Exhaust_0' & 'VFX_Exhaust_1', it is your choice as to what you name these nodes.


The Exhaust Node & Driver Node will then need to be linked to the car body. The hierarchy should now look something like this in the schematic view.


________________________________________________________________________________________________

3-H] Custom Trailer Hitch

This only applies if you want a custom hitch, or to tow something other than a caravan

If you do want to set up a custom trailer hitch, such as the fifth wheel for a Semi Truck, then you will need a trailer hitch model that is seperate from the root of your vehicle. Make sure that the "Trailer Hitch" Part, is parented to the "c_Body", and that its pivot-point/local-axis/object-origin, is set to the point you want the connection to be made. The "Trailer hitch" will be a non-crushable part, so set a single vertex to the weld colour (Green/RGB:000,255,000).

________________________________________________________________________________________________
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Level 1 - Chapter 3 (Part 2)

Rigging a basic car model with all the essential parts required for setup in Carmageddon Max Damage (CMD)


________________________________________________________________________________________________

3-I] Car Structure setup Overview

This chapter covers setting up the structure data for what was integrated into the cars hierarchy in Part 1.

________________________

3-I-i] Configure Car Structure

With everything that is needed for a basic car present in the scene, it is time to get the car structure setup, so the MaxScript can write the structure.xml for you when you export the car.

The first step is to setup the CNT Hierarchy data and add structure data to all necessary parts.

  • Select the car body (c_Body)

  • Navigate to the ‘Tools’ -> ‘Common’ section of the Maxscript and press 'Setup Hierachy’**

  • Navigate to the ‘Tools’ -> ‘Car’ section of the Maxscript and press ‘Configure car structure’

Note: These tools should only usually be used when the root node of the car is selected (Car Body model /c_Body).

  • The 'Setup Hierachy’ tool will go through every part in the hierarchy and add CNT hierarchy modifiers to it, unless you've changed the settings in the dropdown to 'Selection only'

  • The ‘Configure car structure’ tool will add basic structure modifiers to all parts (if not already present). On more complex cars, such as the official cars or my own main cars this would take the Maxscript several minutes, as these operations are being conducted on 100 to 150 + parts.

Once this operation has completed, select the Driver Node, and delete the ‘Car Structure Part’ from the modifiers tab, then repeat this for the Exhaust Node(s). These Nodes serve only as points of reference for attaching external files and should never have structure data set.

** - You may notice that the 'setup hierarchy' has a drop down box next to it, with this you can set the tool to:

  • Add CNT Hierarchy data to the selected part & all of its child parts

  • Add CNT Hierarchy data to just the selected part

  • Add CNT Hierarchy data to everything in the scene

________________________

3-I-ii] Car Structure Part Modifiers

Now return to the car body (c_Body) model, and you will notice the following modifiers present under the modify tab in addition to what was present before

  • Car Characteristics – Sets the basic car characteristics (defence, offence, etc) and should only ever appear on the root of the car (c_Body)

  • Vehicle_Setup.cfg – Not currently working, ignore this

  • Car Structure Part – Sets the structure data for that part

  • CNT Hierachy – Required for export, sets the exported file name for model parts

Select ‘Car Structure Part’, and you will notice a lot of drop down menus.


For the simplest of cars, we are only going to be making use of ‘Render Level’, ‘Basic Settings’, ‘Physics Properties’ & ‘Driver Box’. All of the drop downs will configure settings that will be wrote to the ‘Structure.xml’.

________________________

3-I-ii-A] Render Level:

Render level sets at what distance a part is no longer rendered in-game, the Maxscript will default to ‘1’, which means always visible. You will need to select an appropriate value for all parts on your car that have Structure data.

On the official cars

  • 1 = always visible, used by bodywork, wheels and weapons
    Parts that use this level seem to be culled based on part volume relative to a 'far' camera distance. How 'far', depends on graphics settings

  • 2 = rendering culled at far distance, usually used by windows, lights, engine, axles or mechanical parts on clear display

  • 3 = rendering culled at close distance, usually used by all other mechanical parts (wishbones, hubs, mounts, shocks, coil springs, trailing arms, exhausts)

We will be setting a render level of:

  • 3 for the Hubs & Brakes (despite them being Null Nodes with no actual geometry),

  • 2 for the Engine Model

  • 1 for the Body & Wheels

Additionally there is a ‘Named Render Level’ used for setting a render level for parts that don’t have any structure data, such as the Driver Node. There is no point in the driver being visible at a distance, when the player cannot see them. So with the car body (c_Body) selected, we will:

  • Select ‘2’ on the Named Render Level

  • Press ‘Pick Object’

  • Click on the ‘Driver’ Node, the ‘pick object’ should now read ‘Driver’

  • Press ‘Add’

The Named Render Level will generally not be used for anything else on the car.

________________________

3-I-ii-B] Basic Settings:

The ‘Basic Settings’ literally control just that, the most basic of settings. For all parts (except wheels), a crushability value MUST be set

  • 0.0 = Non deformable, part will take damage but won’t visually deform, normally used for mechanical parts & weapons

  • >0.0 = deformable, amount of deformation will vary depending on if this is set to 1.0 or a smaller value

Most crushable parts (bodywork, windows, lights) have a crushability value of 1.0, and a ‘stiffness’ of 0.3, so enable these and set them appropriately. Trent has set the MaxScript so the default values for ‘Crushability’ and ‘Stiffness’ (when enabled) is 1.0 and 0.3 respectively.

Other settings (not usually used by the car body):

  • Mass – Sets a mass for when a part detaches, this may result in damage to cars that hit this part. This value will also be deducted from the cars overall mass making it accelerate quicker

  • Resiliance – Typically used by non-crushable parts (Weapons, Hubs, Suspension Mounts), this acts as a resistance to the part being moved when the car takes damage, stopping your wheels or engine from getting offset significantly in collisions. Usually a value of 1.0 is used on engines

  • Restitution – Only used by wheels, not entirely sure what it does

________________________

3-I-ii-C] Physics Properties:

This will add ‘Physics Properties’ to parts resulting in certain behaviours in-game, usually only used on:

  • Wheels

  • Hubs

  • Tie/Track Rods

  • Steering Wheel

  • Brake Discs/Drums

Collision shapes and bounding multipliers can also be set for parts that are especially high poly or have no geometry, and need simple collision shapes. The available shapes are ‘TIC_TAC_X’, ‘TIC_TAC_Y’ and ‘TIC_TAC_Z’. We will be setting a Collision shape of ‘TIC_TAC_X’ on each wheel when we get to them.

________________________

3-I-ii-D] Driver Box:

The Driver box is used to specify a box, which the driver model/s have to fit into, as this box crushes with the car – the driver will hunker/crouch down until they cannot shrink in volume any more, and are then replaced with the ‘Gibbed’ Organs. This is only ever used by the parent object of the driver node/s.

The Driver box is also used as the primary point of reference for positioning the in-car camera in-game. A manual offset from this point can be defined in the 'vehicle_setup.cfg' if the camera is not positioned where you want it. If a vehicle does not have a driver box, then the game might not allow the use of the in-car camera.

You need to select 8 vertices in the model and change the vertex colour to:

  • - 255,0,255 (Pink) is used for Driver box 1

  • - 0,255,255 (Cyan) is used for Driver Box 2 (only applicable if you’ve got 2 drivers – See Siamese Dream or Stiffshifter)

Below is an example of the 8 selected vertices (highlighted in red & taken from several angles) for the driver box


NOTE: On a more complex model, the vertices used for the driver box will typically be part of the interior, rather than the exterior. Exterior vertices have been used in this instance as there are no suitable interior vertices.

With the vertex colours set accordingly. To actually set the driver box, all you need to to do is navigate to the ‘Driver Box’ Section of the ‘Car Structure Part’ Modifier, and:

  • Input the RGB Values of the driver box vertices in the first 3 boxes
    255,0,255 (Pink) for Driver 1
    000,255,255 (Cyan) for Driver 2 (If applicable)

  • Press ‘Add’

  • The driver box is now set

________________________

With the basic settings drop-downs that we're going to be using to set up this basic car covered. We will now setup the car Structure.

________________________________________________________________________________________________

3-J] Car Structure Setup

Firstly, what we need to do, is setup the root of the car (c_Body)

________________________

3-J-i] Body (Root of car)

Render Level:

  • leave at 1

  • Set ‘Named Render Level’ For driver node at 2

Basic Settings:

  • Enable Crushability at 1.0

  • Enable Stiffness at 0.3

Physics Properties:

  • None for this part

Driver Box:

  • Add a driver box that matches your 8 vertices, use 255,0,255 as the RGB Values

Next We will move onto the first Hub, ‘Hub_FL’.

________________________

3-J-ii] Hub_FL

Render Level:

  • Set to 3

Basic Settings:

  • Enable Crushability and set to 0.0

  • Enable Resiliance and set to 1.0

Physics Properties:

  • Set Collision Shape as ‘TIC_TAC_X’ (without the quotations)

  • Add ‘FRONT_LEFT_POINT_OF_SUSPENSION’

  • Add ‘FRONT_LEFT_POINT_OF_STEERING’

Note: on the other hubs, ‘FRONT_LEFT’ will be the appropriate Physics property for that corner (FRONT_RIGHT, REAR_LEFT OR REAR_RIGHT). Also since we’re not modelling a car with 4 or rear wheel steering, the Rear Hubs (Hub_RL & Hub_RR) will not have a ‘POINT_OF_STEERING’ assigned to them!

Welds:

Now we need to ‘Weld’ the Hub to the ‘C_Body':

  • Navigate to ‘Tools’ -> ‘Car’, and press ‘Add Weld’

A new modifier ‘Car Weld’ should now be present in the modifiers tab


Welds set what parts are attached to in the hierarchy. This is typically the direct parent part or a sibling part (a part with the same parent as this part)

  • Weld Name is optional, I usually set them to reflect what the weld does, in this case that would be ‘HubToBody_FL’
    On the official cars, Weld Names are only used when setting up GangedBreaks (linking welds together so that when one breaks, the other will)

  • Press ‘Weld Partner’ and then select the part to weld to – in this case the c_Body
    ‘Weld Partner’ should now display ‘c_Body’

  • ‘Weakness’ will set the part as being detachable, the official cars typically use weld strengths of the following presets:
    -1 to -8 (integer values only) – these reference preset weld stengths in-game, ‘-1′ is weakest, ‘-8′ is toughest
    Hubs usually have a weld strength of -4 or -5, We’re going to set it at -5 for this car

  • ‘Absolute Limit’, ‘Chance of Failure’ and ‘Break’ are more advanced weld parameters, which will not be used here

  • As we are welding a part with no geometry, we need to add a vertex to the weld.
    Leave the R,G,B,A values as 0,255,0,0
    Press ‘Part Space’ -> ‘Add’ – this will add a vertex to the part at 0,0,0 in part-space

  • The ‘Joints’ Menu only applies to jointed parts such as doors, hood, trunk, or any part than can dangle or move before breaking off

________________________

3-J-iii] The Other Hubs (Hub_FR, Hub_RL, Hub_RR)

The Setup process for ‘Hub_FL’ should now be repeated for the other hubs (Hub_FR, Hub_RL, Hub_RR), but the physics properties will need to be appropriately assigned.

Hub_FL

  • ‘FRONT_LEFT_POINT_OF_SUSPENSION’

  • ‘FRONT_LEFT_POINT_OF_STEERING’

Hub_FR

  • ‘FRONT_RIGHT_POINT_OF_SUSPENSION’

  • ‘FRONT_RIGHT_POINT_OF_STEERING’

Hub_RL

  • ‘REAR_LEFT_POINT_OF_SUSPENSION’

Hub_RR

  • ‘REAR_RIGHT_POINT_OF_SUSPENSION’

________________________

3-J-iv] Brake_FL

Similarly to the hubs, we will begin the brake setup with Brake_FL.

Render Level:

  • Set to 3

Basic Settings:

  • Enable Crushability and set to 0.0

Physics Properties:

  • Set Collision Shape as ‘TIC_TAC_X’ (without the quotations)

  • Add the Physics property ‘FRONT_LEFT_POINT_OF_ROTATION’

Weld:

Now we need to ‘Weld’ the Brake to the relevant Hub (Hub_FL):

  • Navigate to ‘Tools’ -> ‘Car’, and press ‘Add Weld’

  • Select ‘Weld Partner’, and pick Hub_FL

  • Add a ‘Part Space’ Vertex at 0,0,0 (like we did with the Hub)

________________________

3-J-v] The Other Brakes (Brake_FR, Brake_RL, Brake_RR)

The Setup process for ‘Brake_FL’ should now be repeated for the other brakes (Brake_FR, Brake_RL, Brake_RR), but the physics properties will need to be appropriately assigned. On actual model parts, the ‘POINT_OF_ROTATION’ Physics Property will get the part to rotate at the same speed as the wheel.

Brake_FL

  • ‘FRONT_LEFT_POINT_OF_ROTATION’

Brake_FR

  • ‘FRONT_RIGHT_POINT_OF_ROTATION’

Brake_RL

  • ‘REAR_LEFT_POINT_OF_ROTATION’

Brake_RR

  • ‘REAR_RIGHT_POINT_OF_ROTATION’

________________________

3-J-vi] Wheel_FL

Similarly to the hubs & brakes, we will begin with Wheel_FL. If you have created each wheel correctly (changing the drop-down to match the corner) or by using ‘create set of 4 wheels’, then each wheel should be correctly named, and already have the correct physics properties assigned.

Render Level:

  • Leave at 1

Basic Settings:

  • Do NOT enable crushability, stiffness or Resiliance

  • Enable Restitution and set to an appropriate value, Light cars use 1.0, Trucks use 2.0, so We’ll be using 1.5 for this Intermediate/Mid-size car.

Physics Properties:

  • Set Collision Shape as ‘TIC_TAC_X’ (without the quotations)

  • Add/Verify the Physics property is ‘FRONT_LEFT_WHEEL’

Weld:

Now we need to ‘Weld’ the Wheel to the relevant Brake (Brake_FL):

  • Navigate to ‘Tools’ -> ‘Car’, and press ‘Add Weld’

  • Select ‘Weld Partner’, and pick Brake_FL

  • Set Weakness as -5

  • Add a ‘Part Space’ Vertex at 0,0,0 (like we did with the Hub)

It is vitally important that this weld has a ‘Part Space’ Vertex added, otherwise the tires will be offset from the rim in-game.

________________________

3-J-vii] The Other Wheels (Wheel_FR, Wheel_RL, Wheel_RR)

The Setup process for ‘Wheel_FL’ should now be repeated for the other Wheels (Wheel_FR, Wheel_RL, Wheel_RR), but the physics properties will need to be appropriately assigned as follows:

Wheel_FL

  • ‘FRONT_LEFT_WHEEL’

Wheel_FR

  • ‘FRONT_RIGHT_WHEEL’

Wheel_RL

  • ‘REAR_LEFT_WHEEL’

Wheel_RR

  • ‘REAR_RIGHT_WHEEL’

At this stage, I strongly recommend that at this point you go over all the Hubs, Brakes & Wheels, verifying that the physics properties are correct.

________________________

3-J-Viii] Wheel Size

With the wheels in place and setup, the next step is to set the size of them. This can be done by eye using the scaling function, but there is a considerably more accurate method.

Set Wheel Radius To Position:

Navigate to the ‘Tools’ -> ‘Car’ Section, and under the ‘Wheel’ Tools, you will see a ‘Set Wheel Radius to Position’ tool. Select each wheel individually and then activate this function. It will scale the radius of the selected wheel to the correct size (using the current Y axis position), so it will touch the ground.

Set Wheel Position to Radius:

Under the same menu as the above, this does the opposite of the above function, it will move your wheel in the Y axis (using the current radius) until the wheels touch the ground. It is unlikely that you will need to use this.

Wheel Width:

If your wheels are not the desired width, you can alter this with manual scaling in the X axis. If you accidently end up scaling the whole wheel, you can set the radius back to the correct size by re-using the ‘Set Wheel Radius To Position’ method.

________________________

3-J-ix] Engine

The engine is last part to setup for this basic car. The engine is a non-crushable part, and will need a crushability value of zero.

Render Level:

  • Set to 2

Basic Settings:

  • Enable Crushability and set to 0.0

  • Enable Resiliance and set to 1.0

Physics Properties:

  • None for this part

Engine Weld:

As the engine is a physical model, versus the null nodes used for the Hubs & Wheels. Actual vertices in the part will need to have their vertex colour set to the colour specified in the weld (standard weld value is RGB 0,255,0). But since the Engine is a Non-crushable/Solid Part, and the body is crushable – the engine weld can only have one vertex in it.

Reason for this: If you were to weld a part that cannot deform to a deformable part at more than one point, as the deformable part deforms, you would have to deform the non-deformable part, and in doing so defy the entire point of it being non-deformable.

So with that in mind:

  • Select the 'Editable Mesh' modifier

  • Go to vertex level

  • Select 1 vertex

  • Set the vertex colour as Green (RGB 000,255,000)

Then setup the weld appropriately. I usually use a weld strength of -4 or -5 on the engine of a regular car.

________________________
Some final notes on welds:

  • when welding non-crushable parts to crushable parts, or indeed any parts, the weld vertex doesn’t have to actually meet any vertices on the ‘Weld Partner’, although it will help if it does

  • when welding Crushable parts to Crushable parts (for example: bumper to body), the weld vertices (You can have more than 1) MUST meet actual geometry on the ‘Weld Partner’

  • Crushable parts cannot be welded to non-crushable/Solid parts, if you do – the game will make the crushable parts solid when loading an event

________________________________________________________________________________________________

3-J-x] Custom Trailer Hitch

This only applies if you want a custom hitch, or to tow something other than a caravan

The 'Trailer_Hitch' will typically have the following settings
Render Level:

  • Set to 1

Basic Settings:

  • Enable Crushability and set to 0.0

Physics Properties:

  • None for this part

Hitch Weld:

  • Weld to Parent part (c_Body)

  • Do NOT set a weakness value

Lastly, the trailer hitch function will have to be set manually by pasting the following command:

CDamageParameters:Set_TrailerHitch( 0, 0, 0, 1 )

into the '' section for the 'Trailer_Hitch' within the structure.xml. This will be covered in chapter 5.

________________________________________________________________________________________________
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Guess what? Now you can start the Game and test out your new set of wheels.

Its Wreck ‘Em Up Time!




NOTE: In the above images, I have replaced the materials created by the MaxScript, to enable use of damage textures, opacity, normal & specular maps, and blood splatters. Recommended Materials & required textures for setup will be covered in a separate Materials Tutorial.

For Level 2 (Detachable Parts, Jointed Parts, Breakable Parts, Lights, Advanced UI assets & more), Head this way

Any resemblance between the Tutorial car and a Pontiac Grand Prix is entirely co-incidental
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by '80s Time Warp »

Recommended Materials Tutorial


________________________________________________________________________________________________

Linking on from the end of the Level 1 Car Tutorial. This mini tutorial will cover the recommended material/shader types to use on your cars in Carmageddon Max Damage.

________________________________________________________________________________________________

Recommended Materials Overview

For best results, you can copy the contents of the Material (MT2) files from one of the official cars, and then replace/edit the texture names to match your own. You will need an XML editor to edit these files, notepad will not cut it.

Recommended Material Types:

  1. Car Paint Material (Exterior Bodywork) – “car_shader_double_sided_base”

  2. Exterior trim or Interior Materials – “car_shader_base”

  3. Windows & Lights Materials – “car_shader_glass”

  4. Illuminated Light Materials – “glow_simple_norm_spec_env_base_a”

  5. Wheel (Rim) Material – “simple_norm_spec_env_base”

  6. Tire Material – “simple_norm_base”

  7. Simple Materials with no specularity or normal map – “simple_base” “car_shader_base”

________________________________________________________________________________________________

Materials Breakdown

_________________________________

1] Car Paint Material (Exterior Bodywork) – “car_shader_double_sided_base”

“car_shader_double_sided_base” is the only material in the game, which will have blood splatters enabled. On the official cars this is just used on a single material, for which the texture contains: paintwork, all exterior trim (chrome, plastic, rubber), weapons, underbody, engine bay surround, grille, and sometimes the interior.

The material takes in 9 textures (comments for each texture argument are on line below, in Turquoise):


  • // Regular Texture colour



  • // Adds ‘3d effect’ details, useful for badges, crumples, panel lines, bolts & weld seams



  • // Determines specularity/reflectivity, diffuse of this texture is reflection colour, alpha channel determines intensity



  • // Damaged Texture colour (usually has crumples &/or scratches overlayed)



  • // Adds ‘3d effect’ details, used to add effect of crumples in bodywork



  • // Determines specularity/reflectivity, diffuse of this texture is reflection colour, alpha channel determines intensity, usually diffuse & alpha channel are brightened considerably where scratches are on the main damage texture



  • // Backfacing diffuse texture, if you don’t have one, then just reference regular texture here



  • // Adds ‘3d effect’ details, useful for bulkheads, crumples, panel lines, bolts & weld seams, if you don’t have one, then just reference regular normal map here



  • // Determines specularity/reflectivity, diffuse of this texture is reflection colour, alpha channel determines intensity. If you don’t have one, then just reference regular specular map here

Additionally you can disable the double-sided nature of this material, by changing the “
// Base Texture colour


  • // Adds ‘3d effect’ details, useful for badges, crumples, panel lines, bolts & weld seams

  • // Determines specularity/reflectivity, diffuse of this texture is reflection colour, alpha channel determines intensity
  • [/]

    _________________________________

    3] Windows & Lights Materials – “car_shader_glass”

    “simple_norm_spec_env_base_A” is almost identical to “simple_norm_spec_env_base”, in that it takes in the same number of textures, but the alpha channel (transparency) of the diffuse texture will be used to determine the opacity of the material. This is ideal for windows & lights.

    Additionally, you can set this material as being two-sided.

    _________________________________

    4] Illuminated Light Materials – “glow_simple_norm_spec_env_base_a”


    Previously "Simple_additive_base" was used

    “glow_simple_norm_spec_env_base_a” takes in a diffuse texture (with alpha channel), normal map & specular map and is used for illuminated lights. There are multiplier (Float) values that can be increased or decreased if your lights are appearing too bright or too dark in-game.

    Note: All of the official cars reference the same normal map ("normal_n") & specular map ("spec_s")

    _________________________________

    5] Wheel (Rim) Material – “simple_norm_spec_env_base”

    “simple_norm_spec_env_base” is very similar to "Car_Shader_Base", in that it takes in the same set of maps (Diffuse, Normal & Specular)

    _________________________________

    6] Tire Material – “simple_norm_base”

    “simple_norm_base” works the same as “simple_norm_spec_env_base”, but it seems that the specular map is not used in-game. If you have not modelled backfacing on your tires (like me), then you will need to set this material as being 2 sided with the following command placed on the line below the material type.


    _________________________________

    7] Simple Materials with no specularity or normal map – “car_shader_base”

    The default material created by the Maxscript (Simple_Base) is the simplest material available in-game. It is no longer ideal to use "Simple_Base" for any vehicle materials, as any material on a vehicle referencing 'Simple_Base', will be made invisible when the vehicle is split. You can use 'Car_Shader_Base' in its place with "normal_n" as the normal map, and "spec_s" as the specular map. Both "normal_n" & "spec_s" are standard non_VT textures in CMD.

    ________________________________________________________________________________________________
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Wheel Setup Tutorial

    CONTENT COMPLETE

    ________________________________________________________________________________________________

    Overview of wheels

    In Carmageddon Max Damage/CMD. Wheel models are stored externally from each car. This allows users to setup & use different sets of wheels on cars (available wheels on each car are defined in the 'Vehicle_Setup.CFG').

    In CMD, while the Rim models will rotate, the tire models do NOT rotate, instead the tire texture will scroll in the Y/V Axis to match the wheel speed.

    Contents:

    • 1] Required Models for full wheel setup

    • 2] Model & texture Guidelines

    • 3] Rigging & export for use In-game

    • 4] Materials, Textures & Paperwork

    • 5] Setup for use in-game

    ________________________________________________________________________________________________

    1] Required Models for full wheel setup

    To achieve basic setup of a wheel model in CMD. You will need to break your wheel down into the following:

    • - Rim

    • - Tire

    Additionally, if you want your tire model to deflate, you will need 5 pre-damaged tire models, which make up the key-frames in the tire deflating animation

    • - Tire_Deflated_020

    • - Tire_Deflated_040

    • - Tire_Deflated_060

    • - Tire_Deflated_080

    • - Tire_Deflated_100

    Optionally you can also have a different tire model for when the tire has become 'De-Rimmed', the official cars usually reference the fully deflated tire model for this.

    ________________________________________________________________________________________________

    2] Model & texture Guidelines


    _____________________________________

    2-A] Rim:


    Your Rim can be modelled and textured however you choose.

    _____________________________________

    2-B] Tire:


    As mentioned in the Overview, the tire models do NOT actually rotate, instead the tire texture will scroll in the Y or 'V' Axis to match the wheel speed.

    With this in mind, make sure that your tire model consists of sufficient steps, so that the player will not be able to make out each step of the tire model in-game. Remember, the bigger the wheels are on the vehicle, the more steps will be required.

    I usually use 48 Steps for regular car tires, and have used 96 Steps for the tires on Big Dump R as they are so huge.

    With the tire texture animating in the Y/V axis, this means that your tire model will need to be un-wrapped as a strip, like below


    _____________________________________

    2-C] Deflated Tires:


    If you are unsure about deflated tires - It is worth importing the wheels from one of the default cars to get an idea of scale and the amount of deflation on each deflated tire relative to the regular tire model.

    Here is an example of each deflated tire model relative to regular tire (with wheel/rim)

    Regular Tire


    Tire_Deflated_020


    Tire_Deflated_040


    Tire_Deflated_060


    Tire_Deflated_080


    Tire_Deflated_100


    Remember that as a tire compresses vertically, it will expand in width, widening the tire footprint.

    ________________________________________________________________________________________________

    3] Rigging & export for use In-game


    _____________________________________

    3-A] Position & Pivot Points:


    Before you begin rigging the wheels, it is worth importing the tire & rim from one of the default cars, then scale & rotate your models to the same size & position. All Models should be positioned at 0,0,0 in world-space, with the pivot point set to where the centre of the wheel/rim is.

    Unlike the car models, the rim, tire and each stage of deflated tire models are all referenced by separate CNT files referencing just one MDL.

    _____________________________________

    3-B] Naming Conventions:


    The following naming convention is used on the official cars for each model

    • - Rim - Main Wheel/Rim model

    • - Tire - Main Tire

    • - Tire_Deflated_020 - First stage deflated tire

    • - Tire_Deflated_040 - Second stage deflated tire

    • - Tire_Deflated_060 - Third stage deflated tire

    • - Tire_Deflated_080 - Fourth stage deflated tire

    • - Tire_Deflated_100 - Fifth stage deflated tire

    _____________________________________

    3-C] Material Names:

    The Rim model usually has a material name of Rim - How ironic?

    The Tire model usually has a material name of Tire - Also, how Ironic?

    Deflated tire models reference same material as regular tire.

    _____________________________________

    3-D] CNT Hierarchy:

    • Select each part and press 'Setup Hierarchy' under the 'Tools' -> 'Common' menu.

    • Make sure to tick 'Bake Scale Into Mesh'!

    • There are no parent/child links defined between the rim or tire models

    _____________________________________

    3-E] Export:

    • Select the Rim model, then select 'Export' -> 'Export Full CNT & MDL Hierarchy'

    • Navigate to your CarMODgeddon folder, and create a folder for your wheels (Example. Wheel_YourCarNameGoesHere_Stock)

    • Save as Rim.CNT

    • Repeat the export process to the same folder using the parts from your scene in Orange, as the names in Yellow
      Tire, -> Export as -> Tire.CNT
      Tire_Deflated_020, -> Export as -> Tire_Deflated020.CNT
      Tire_Deflated_040, -> Export as -> Tire_Deflated040.CNT
      Tire_Deflated_060, -> Export as -> Tire_Deflated060.CNT
      Tire_Deflated_080, -> Export as -> Tire_Deflated080.CNT
      Tire_Deflated_100, -> Export as -> Tire_Deflated100.CNT
      Tire_Deflated_100, -> Export as -> Tire_Derimmed.CNT

    ________________________________________________________________________________________________

    4] Materials, Textures & Paperwork


    _____________________________________

    4-A] Materials:


    You can either create simple materials using the MaxScript, or copy materials from other wheels, and edit the file arguments within (where appropriate) to match your texture names. Remember the name of the material (MT2) files need to match the materials from the scene (Rim & Tire).

    Additionally you can have different materials referencing damage textures for your tire when 'deflated', 'derimmed' & 'detached'.

    _____________________________________

    4-B] Textures:


    Convert your textures to .TDX using GibbedTools, and place them inside the wheel model folder.

    _____________________________________

    4-C] Paperwork:


    You need one piece of paperwork to tie all this together 'CComplicatedWheelParameters.LOL'. Copy this from one of the official cars, and decode it with LOLDecoder.

    When you open 'CComplicatedWheelParameters.LOL', It will look something like this

    CComplicatedWheelParameters:Set_RotateTyre(false) 
    CComplicatedWheelParameters:Set_ScrollTyreTiles(-1)
    CComplicatedWheelParameters:Add_PuncturedStage(20, "Tyre_Punctured020")
    CComplicatedWheelParameters:Add_PuncturedStage(40, "Tyre_Punctured040")
    CComplicatedWheelParameters:Add_PuncturedStage(60, "Tyre_Punctured060")
    CComplicatedWheelParameters:Add_PuncturedStage(80, "Tyre_Punctured080")
    CComplicatedWheelParameters:Add_PuncturedStage(100, "Tyre_Punctured100")
    CComplicatedWheelParameters:Set_MaterialName_Tyre("Tire")
    CComplicatedWheelParameters:Set_MaterialName_Tyre_Punctured("tire")
    CComplicatedWheelParameters:Set_MaterialName_Tyre_Derimmed("tire")
    CComplicatedWheelParameters:Set_MaterialName_Tyre_Detached("tire")
    Make sure that:

    • the Material Name 'Set_MaterialName_Tyre()', matches the name of your regular tire material.

    If you do not have different materials for when the tire is deflated, derimmed or detached from the wheel, then use the regular Tire material name for:

    • 'Set_MaterialName_Tyre_Punctured()'

    • 'Set_MaterialName_Tyre_Derimmed()'

    • 'Set_MaterialName_Tyre_Detached()'

    NOTE: If you do not have deflated tire models, then change the names in each of the punctured stages to that of your regular 'Tire'.

    ________________________________________________________________________________________________

    5] Setup for use in-game


    _____________________________________

    5-A] Packaging Wheel:

    • Start up Minge

    • Make sure to set game to Max Damage (Game -> Select Game -> Max Damage)

    • Select ‘Package Mods’ -> ‘Package Carmageddon Mod’

    • Browse to the folder where the wheel was exported to

    • Set Mod Type as 'Wheel'

    • Fill in Meta Data as required

    • Press 'Package Mod'

    • Once complete, enable the wheel under 'Wheel Mods' and save

    _____________________________________

    5-B] Getting a car to use this wheel as its default wheels


    With that complete, make sure to change the name of the 'wheel_folder_name' in the 'vehicle_setup.CFG' of your vehicle to match that of your new wheel, like so (Comments in Red):

    [wheel_map]
    default //Used for stock wheels ONLY!
    localise FE_CAR_MM_PARALYSER_TRASHEM_RIM_DEFAULT //References UI data
    wheel_folder_name default_MM_Paralyser_TrashEm //Wheel Folder Name

    Then update your vehicle using MINGE, and add the wheel as a 'required mod'.

    If you want to use different wheel models for each wheel, then the wheel map will look something like this


    [wheel_map]
    default
    localise FE_CAR_MM_PARALYSER_TRASHEM_RIM_DEFAULT
    fl_wheel_folder_name default_CustomCarWheel_FL
    fr_wheel_folder_name default_CustomCarWheel_FR
    rl_wheel_folder_name default_CustomCarWheel_RL
    rr_wheel_folder_name default_CustomCarWheel_RR

    _____________________________________

    5-C] Getting a car to use this wheel as custom wheels


    If this wheel is being added as a custom wheel, then add extra [wheel_map] data underneath the existing wheels in the 'Vehicle_Setup.CFG' in the same way that is used on the official cars, like so (Comments in Red):

    [wheel_map]
    set_01 //This number reflects which set of wheels this is in the list
    localise FE_CAR_MM_STODGE_BARGER_RIM_DEFAULT //References UI data
    wheel_folder_name default_MM_Stodge_Barger //Wheel Folder Name

    Then update your vehicle using MINGE, and add the wheel as a 'required mod'.

    If you want to use different wheel models for each wheel, then see the example above.

    ________________________________________________________________________________________________

    One last note

    If your tire is rotating (scrolling) backwards in-game, then invert the number defined in 'Set_ScrollTyreTiles()'.

    ________________________________________________________________________________________________
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 2 - Chapter 2

    Detachable (Non-Crushable) Parts

    The setup process for Non-Crushable Detachable parts (when welding to crushable parts) is very similar to Crushable parts. The major differences are:

    • You can only have a single vertex being used by the weld

    • The weld vertex doesn’t have to meet a vertex on the weld partner

    • Crushability has to be set to 0.0

    • No Stiffness value is set

    The example here is the new exhaust pipes, which are separate from the car body. Below you can see the single vertex that will be used for the weld selected.


    With the weld Vertex set, press the ‘Add Structure Part’ under ‘Tools’ -> ‘Car’ to add basic structure data. As this is a basic non-crushable part:

    • Enable Crushability & Set it to 0.0

    • Set Render Level at 2 (this is a small exterior part, so it won’t be as easy to see)

    Then Add the weld:

    • Set Weld Partner as ‘c_Body’

    • Set weakness as -4, or a value of your choosing depending on the type of vehicle you’re building

    NOTE: As this is the exhaust pipe, the Exhaust FX Node will be linked to this part instead of the car body.
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 2 - Chapter 1

    Detachable (Crushable) Parts


    ________________________________________________________________________________________________

    Most Body parts in Carmageddon Max Damage are detachable and crushable. The key difference between crushable and non-crushable parts is:

    • crushable parts have a ‘Crushability’ value greater than 0

    • non-crushable parts have a crushability value of 0

    Detachable (Crushable) parts will be parts such as bumpers, fenders, quarter panels, hood, trunk, wings, side-steps, running boards, sun-roofs. We will cover setup on the Tutorial car of a Bumper under this method.

    ________________________________________________________________________________________________

    1-A] The weld vertices

    As briefly mentioned in Level 1. When crushable parts are welded to crushable parts, the weld vertices MUST meet vertices on the weld partner. In this case, the weld vertices on the bumper will have to meet vertices on the body. If you want, you can only use a single vertex for the weld, it is your choice as long as that vertex matches a vertex on the weld partner. Below you can see the vertices being selected to be used as for the weld. The colour for these vertices, and weld vertices on all other parts that are not jointed should be green (RGB 000,255,000).


    ________________________________________________________________________________________________

    1-B] Car Structure Part Setup

    With the weld vertices set. Link the part to the body using the ‘link’ tool. Then press the ‘Add Structure Part’ under ‘Tools’ -> ‘Car’ to add basic structure data. As this is a basic crushable part:

    • Enable Crushability & Stiffness

    • Leave Render Level at 1 (this is a large exterior part, so it needs to be visible)

    Then Add the weld:

    • Set Weld Partner as ‘c_Body’

    • Set weakness as -4, or a value of your choosing depending on the type of vehicle you’re building

    This is optional but it is worth centring the pivot point for regular detachable parts using ‘Affect Pivot Only’ -> ‘Center To Object’ under the hierarchy modifier.

    ________________________________________________________________________________________________
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 2 - Chapter 3

    Flappable Parts


    ________________________________________________________________________________________________

    3-A] Flappable Parts Overview

    Flappable parts can open and close when the ‘Flaps’ Key is pressed, as-well as opening after sustaining damage. the joint will originate at each parts local axis/pivot point. Setup for flappable parts is similar to a regular detachable part, but there are a few extra elements to setup. Flappable parts are usually Doors, Hood & Trunk.

    ________________________________________________________________________________________________

    3-B] Pivot Points

    For a ‘Flap’ to work correctly, the objects pivot point will need to be set where you want the part to ‘pivot’ about. Make sure to set the pivot point using ‘Affect Pivot Only’ under the ‘hierarchy’ Tab.


    ________________________________________________________________________________________________

    3-C] Weld Vertices

    As flappable parts are crushable, remember the weld vertices have to meet vertices on the weld partner. Compared to a regular detachable part, Flappable parts need two different welds, each referencing a different vertex colour:

    • Hinge – Vertex Colour is Red (RGB 255,000,000)

    • Latch – Vertex Colour is Blue (RGB 000,000,255)

    ________________________________________________________________________________________________

    3-D] Structure data & welds

    Primary Structure part setup is otherwise identical to any other crushable part, afterwards you will need to add two welds to the part

    Hinge

    • Make sure to change vertex colour from Green (default weld colour) to Red

    • Needs a ‘Weakness’ Value (typically -4)

    • Needs a ‘Break’ Value (typically 30) – This is needed to get the part to flap when the ‘flaps’ key is pressed

    Latch

    • Make sure to change vertex colour from Green (default weld colour) to Blue

    • No other values set!

    ________________________________________________________________________________________________

    3-E] Creating the Joint

    With the welds in place, the next step is to create a joint. With the ‘Flap’ selected, Go to ‘Tools’ -> ‘Car’ -> Create Joint’. This will create the joint at the origin of this part (where the pivot point is) Next We have to configure the joint, and then attach it to the ‘latch’ weld. Generally Flaps use hinges, which is the default joint type when you create a joint in the MaxScript. The values that typically need to be set are:

    • Weakness – Sets how easy the joint is to break
      Usually set to 200-300 (tweak to your liking after testing)

    • Limit – Enables to set the angles that the part can rotate
      First number is the minimum angle (in degrees), usually set to zero as you don’t want your flap to open inwards

      Second number is maximum angle (in degrees), usually set to 70 or higher

    • Flap Springs – sets the force with which the flap will open
      First value is usually 20-30

      Second value is usually 30-40

    With the values set, next you need to rotate the joint so that the visual representation of the joint (see below) matches the direction you want the joint to open. The pointed end of the joint illustration represents the max limit of rotation.


    NOTE: If you alter any variables of the joint – the rotation of the joint will automatically default to what it was when you created it, so you may need to rotate it back.

    ________________________________________________________________________________________________

    3-F] Adding the joint

    The last step is to select the part we want to use this joint, then:

    • Navigate to the ‘Latch’ weld

    • Open the ‘Joints’ drop-down

    • Press ‘Add Joint’, and select this joint

    • Press ‘Add Joint’

    This part is now jointed and flappable!

    Note: it will be worth double checking the joint axis for each part after exporting the car structure.

    The Joint axis method in the structure.xml will look like this CWeldJointParameters:Set_JointAxis( 1, 0, 0 )

    • 1 for the first value (like above) will get the joint to rotate forward (X axis), like normal trunks, or a conventional Semi Truck Hood

    • -1 for the first value will get the joint to rotate back (X axis), like a regular hood or tail-gate

    • 1 for the second value will get the joint to rotate (Y Axis) like a regular left side door, or a right side suicide door

    • -1 for the second value will get the joint to rotate (Y Axis) like a regular right side door, or a left side suicide door

    • 1 for the third value will get the joint to rotate (Z axis) like an older style split hood (right side) or right side gull-wing door

    • -1 for the third value will get the joint to rotate (Z axis) like an older style split hood (left side) or left side gull-wing door

    ________________________________________________________________________________________________
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 2 - Chapter 6

    Functional Lights


    ________________________________________________________________________________________________

    To setup working lights, you will need an overlay illuminated version of the desired light models, which needs to be offset by a tiny distance (to avoid clipping issues) from the actual light model.

    ________________________________________________________________________________________________

    6-A] Hierarchy:

    On the official cars, the hierarchy for ‘Functional Lights’ are usually organised like this:

    Regular Light Model

    -> Null Node as child object (this is to keep lights organised)

    -> -> Illuminated light Model as child object of Null Node

    -> -> Light Generator Node (This is optional, only usually applies to Head lights, brake lights, reverse lights & police lights)

    Visual representation of hierarchy:

    • “c_HL_L2″ is the regular light model (2nd Headlight on left side of vehicle)

    • “Headlight_L2″ is the Null Node (needs to be rotated so it will be pointing out of the vehicle)

    • “c_HL_L2_On” is the illuminated light model (2nd Headlight on left side of vehicle)

    • “Head_Light” is the Light Generator Node (Optional, also needs to be rotated so it will be pointing out of the vehicle)



    All of these parts that are child objects of the regular light model will not have structure data. These parts only need ‘CNT Hierarchy’ data, which can be set through ‘Tools’ -> ‘Common’ -> ‘Setup Hierarchy’.

    ________________________________________________________________________________________________

    6-B] The Light Generator (optional):

    The Light Generator Node (including its ‘Content Filename’) must be called one of the following, depending on what type of light you’re setting up:

    • head_light

    • brake_light

    • reverse_light

    • cop_blue

    • cop_red

    • cop_head

    • cop_strobe

    Additionally, set the Node type from ‘Null’ to ‘LITg’ in the ‘CNT Hierarhcy’ modifier. LITg nodes reference pre-set ‘.LIGHT’ files to generate light in-game. Lastly you will need to rotate the Light Generator (‘LITg’) Nodes, so that they are pointing down towards the ground (or in whatever direction you want them to). Below is an example of the ‘Head_Light’ light generators rotated down.


    The last step is to set up the lights under the ‘Functional Lights’ Dropdown for the regular light models ‘Car Structure Part’ Modifier.

    ________________________________________________________________________________________________

    6-C] Functional Light Setup:

    Select the regular light model, and navigate to the ‘Functional Lights’ Dropdown under the ‘Car Structure Part’ Modifier. You will see several options:

    • Select the relevant light type for the car light (this will trigger the appropriate actions in-game, such as reverse lights only coming on when vehicle is in reverse gear)

    • Press ‘Pick Object’

    • Select the Illuminated light model, and press ‘Add’

    • Repeat the process for the light generator (If applicable)

    Here is an example of completed ‘Functional light’ for a car Headlight.



    NOTE: the ‘Light Type’ Dropdown will automatically default back to ‘HEAD_LIGHT’ after you ‘Add’ a light.

    ________________________________________________________________________________________________

    6-D] Required .light files:

    Once you have exported your vehicle, you will need to get matching ‘.LIGHT’ files from one of the default cars, and place them in the folder with your exported car.

    ________________________________________________________________________________________________
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 2 - Chapter 8

    Advanced UI Assets (Damage Indicator)


    ________________________________________________________________________________________________

    The advanced UI asset is the damage indicator. To set this up, you will need two images at 240×480 Pixels in resolution – ‘HUD_Damage_Backing’ & ‘HUD_Damage_Outline’. Additionally, you will need several Binary files & a configuration file.

    ________________________________________________________________________________________________

    8-A] Required assets


    _______________________
    HUD_Damage_Backing

    This is a render of the top of your vehicle

    • Usually greyscale with no decals (numbers, stripes, flames) applied

    • Alpha channel/Transparency is usually set to solid (255,255,255) around outline, and 60% opaque in centre (153,153,153)

    • An additional faded black outline is usually applied around the edges


    Spoiler: Some Examples: Caddy Fat Cat, ’72 Moth Truck, The Plow








    _______________________
    HUD_Damage_Outline

    • This is an outline of the Backing that will be flashed as the car body takes damage

    • The image is just white, with an alpha channel/Transparency of the outline of the car body


    Spoiler: Some Examples: Caddy Fat Cat, ’72 Moth Truck, The Plow







    NOTE: Try to match the scale of your vehicle in the images to the closest official car (Extract the UI assets from that car). It will make the next step easier. Once your UI assets are completed, convert them to .TDX using ‘GibbedTools’ & place them inside the ‘ui_assets’ folder in your car folder.

    ________________________________________________________________________________________________

    8-B] .BIN Files & Layout.lol

    To get the damage indicator working, you will need to copy the .BIN files from one of the default cars ‘ui_assets’ folder:

    • HUD_DAMAGE_ANIM.BIN

    • HUD_DAMAGE_IMAGE.BIN

    • HUD_DAMAGE_IMAGE_CONTAINER.BIN

    Additionally, you will need to copy the ‘XXX_layout.lol’, where ‘XXX’ is the car name. The layout file will need to be renamed to ‘YourCarFolderNameGoesHere_layout.lol’. Once renamed, decode it will LolDecoder. The ‘_layout.lol’ file defines where (relative to the HUD damage images), the indicators for: Engine, Transmission, Steering and each wheel goes. If the wheel indicators are too big or small in-game, they can be changed.

    Here is a list of the available wheels:
    _08x14

    _12x18

    _14x24

    _14x12

    _10x20

    _24x12

    _08x86

    _track

    _tank


    Suspension Link? Haven't seen any car using this yet


    ________________________________________________________________________________________________
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    All Done


    ________________________________________________________________________________________________

    With a selection of the above setup, the tutorial car certainly looks better and falls apart better in-game.




    ________________________________________________________________________________________________
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 3 - Chapter 4 – Live Axle with Trailing Arms

    Part 1


    ________________________________________________________________________________________________

    4-A] Required Parts

    Mandatory parts to get Suspension system working in-game

    When Setting up a Live Axle with Trailing Arms, you will need the following parts (as a minimum) to make the suspension system work.

    ____________________________
    4-A-i] – Hubs

    In the Level 1 & 2 Tutorial, we used Null Nodes for the Hubs. Here you will need actual model parts for these. You can see an example of the Hubs in the colour coded image below.

    ____________________________
    4-A-ii] – Live Axle

    The Live Axle forms a rigid body between the two hubs. You can see an example of the Axle in the colour coded image below.

    ____________________________
    4-A-iii] – Trailing Arms

    A Pair of Trailing Arms will form the connection between the Axle and the Mounts. Both Trailing Arms will need to be separate parts. You can see an example of the Trailing Arms in the colour coded image below.

    ____________________________
    4-A-iiii] – Trailing Arm Mounts

    Each Trailing Arm needs a respective mount to attach to. You can see an example of the Trailing Arm Mounts in the colour coded image below.

    ____________________________
    4-A-v] Brake Disc/Drum

    In the Level 1 Tutorial, we used null nodes for the brakes. here we will use an appropriate model for the braking system. If you are modelling disc brakes, the Calliper will need to be a separate part from the disc.

    ____________________________
    4-A-Vi] Wheel

    Same as the Level 1 Tutorial

    ________________________________________________________________________________________________

    4-B] Extra Parts

    Additional parts that are required to fully realize a live axle.

    ____________________________
    4-B-i] Shock Absorbers

    A Shock Absorber is there to dampen any movement of the suspension and absorb any ‘shock’ or impulse exerted on it. The Shock Absorber will need to be separated into two parts, an upper & lower shock. These two ‘halves’ should end up rotating in such a way, that they always form a straight line, mimicking the visual appearance of a real shock absorber. You can see an example of the Shock Absorbers in the colour coded image below.

    ____________________________
    4-B-ii] Coil Springs

    The Coil Spring is there to provide rebound in the system, and is wrapped around the shock absorber. You can see an example of the Coil-springs in the colour coded image below.

    ____________________________
    4-B-iii] Driveshafts/UJ

    As part of transmitting power from your transmission to the axle, you will need to have a part representing a Universal-Joint/UJ attaching to the differential on the axle, and another part for the driveshaft to connect to the Universal-Joint/UJ on your transmission

    ____________________________
    4-B-iiii] Damper/Axle Mount

    Lastly, we need to group all of these parts under a single part to keep the hierarchy clean, and ideally simplify the setup process by keeping all of the live axle parts grouped under one non-crushable part to prevent the animated parts from moving away from one another as the vehicle takes damage.

    ____________________________
    4-B-v] Visual Representation

    Below is a colour coded image, showing all of the requisite parts listed above.

    ◦Brake Drums (Red: 255,000,000)

    ◦Hubs (Orange: 255,102,000)

    ◦Live Axle (Yellow: 255,255,000)

    ◦Trailing Arm Mounts (Blue: 000,000,255)

    ◦Trailing Arms (Green: 000,255,000)

    ◦Damper (Axle) Mount (Brown: 075,025,000)

    ◦Upper Shock/Damper (Cyan: 000,255,255)

    ◦Lower Shock/Damper (Pink: 255,000,255)

    ◦Coil Spring (White: 255,255,255)

    The vehicles chassis & the universal joint are shown in dark grey. Wheels are hidden from view


    ________________________________________________________________________________________________

    4-C] Typical Hierarchy

    Below is the Hierarchy of how these parts need to be organised under the Damper (Axle) Mount.
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 3 - Chapter 4 – Live Axle with Trailing Arms

    Part 2


    ________________________________________________________________________________________________

    4-D] Part Setup (Mandatory Parts)

    Unless otherwise stated in the setup information for each part, all mechanical parts typically have the following main settings

    Render Level:
    • ◦Set at 3, unless part is very large or on clear display (Axle, Engine)

    Basic Settings:


    • ◦Enable Crushability and set to 0.0

    Information regarding Pivot Points (accessed under the hierarchy tab) will be in each section.

    ____________________________

    4-D-i]

    Damper (Axle Mount)

    While not strictly a mandatory part, the Damper Mount will keep the hierarchy clean, and ideally simplify the setup process by keeping all of the live axle parts grouped under one non-crushable part to prevent the animated parts from moving away from one another as the vehicle takes damage.

    This only needs to be set-up as a non-crushable part, with an appropriate resilience factor to prevent the entire axle system from being offset in a light collision. As the Tutorial Car is a hefty Intermediate car, I have selected a value of 2.0.

    Lastly, the damper mount will need to be welded to its parent part – the chassis (or body if vehicle has a unitized body-frame construction). The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    4-D-ii]

    Hubs

    Setup of the Hubs is similar to the hubs for the level one tutorial car, but as we have an actual model part, you do not need to assign a collision property. In addition to basic structure data, the appropriate ‘POINT_OF_SUSPENSION’ must be assigned to match the wheel for that corner of the vehicle.

    Additionally, you will need to make use of the ‘Set as Hub’ tool under ‘Tools’ -> ‘Car’. Once this has been pressed, you should see a ‘Hub’ Part Modifier under the modifiers tab. You will need to:

    • set the ‘Hub Type’ as ‘Live Axle Hub’

    • Select the Appropriate Corner, which matches the physics property for that corner

    • Select the Wheel Position, you can either select the wheel node, or the Hub



    Additionally, the Hubs Pivot Point (accessed under the hierarchy tab) must have the same Y & Z Axis position as that of the Wheel Nodes, otherwise you may find the entire suspension system offset from where it should be in-game. The same applies for the brake drum/disc and the live Axle.

    Lastly, Live Axle Hubs will need to be welded to their parent part – the Live Axle. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    4-D-iii]

    Axle

    The Live Axles’ Pivot Point (accessed under the hierarchy tab) must have the same Y & Z Axis position as that of the Wheel Nodes, otherwise you may get strange off-setting of the entire suspension system in-game.

    You do not have to set any physics property for a live axle.

    In addition to basic structure data, You will need to use the ‘Set As Axle’ Command under ‘Tools’ -> ‘Car’. It will bring up the following modifier.


    Make sure that the ‘Axle Type’ is set as ‘Live Axle’ and that the ‘Axle Wheel’ is always set to the right side for the axle. In this instance, as we are setting up the rear axle – that requires the ‘Axle wheel’ to be set as ‘Rear Right’.

    Lastly the Axle Pivot is the point on the axle, where the right trailing arm attaches to the axle. You will need to create a position helper at the point where the Trailing Arm attaches. Below you can see this helper highlighted in white. Depending on how you’ve constructed your axle, that may affect where the Trailing Arm attaches, and subsequently where the pivot point is.

    NOTE: The game will calculate where the Trailing Arm attaches to the left side of the axle by mirroring the X position of the Live Axle Pivot point, so make sure your Live Axle & Trailing Arms are symmetrical.



    The final step is to weld the Live Axle to the Damper/Axle Mount. Select an appropriate weakness value. Most tougher cars use ‘-5’ to ‘-8’. As the tutorial car is a hefty body on frame intermediate car, I have selected ‘-5’. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    4-D-iiii]

    Trailing Arm Mounts

    In addition to basic structure data, The Trailing Arm Mounts need to make use of the ‘Set as Mount’ command under ‘Tools’ -> ‘Car’. It will bring up the following modifier.


    The ‘Axle Type’ needs to be set as ‘Trailing Arm'. The ‘Axle wheel’ will need to match the wheel for that corner, in this case – it is the ‘rear right’ trailing arm for the ‘rear right’ wheel. The ‘Mount Point’ is the point in world-space where the Trailing Arm will attaches to the Mount. Below you can see a Position Helper set to that Point (highlighted in White). If you have set the Trailing Arm Mounts’ Pivot Point (accessed under the hierarchy tab) to this point, then you can just select the Actual Trailing Arm Mount for the ‘Mount Point’.



    The Trailing Arm Mount will need to be welded to its’ parent part – the Damper (Axle) Mount. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    4-D-v]

    Trailing Arms

    In addition to basic structure data, The Trailing Arms need to make use of the ‘Set as Trailing Arm’ command under ‘Tools’ -> ‘Car’. It will bring up the following modifier.


    The ‘Axle Wheel’ will need to match that of the Trailing Arm Mount, in this case the ‘Rear Right’ Wheel.

    The ‘Mount Pivot Point’ is where the Trailing Arm pivots about and attaches to the Trailing Arm Mount. The Pivot point for this part (accessed under the hierarchy tab) should be set to this point.

    The ‘Axle Pivot Point’ is where the Trailing Arm meets the Axle. You should reference the ‘Axle Pivot Point’ Position Helper here, make sure to create another helper for the Trailing Arms on the left side of the axle.

    Below, both of the position helpers used are highlighted in white.


    Despite the trailing Arm declaration, you will need to manually animate the Trailing Arm using a ‘SnapPointToPointOnOtherPart()’ and a ‘RotatePointToPointOnOtherPart()’ function.

    ____________________________
    4-D-v-1] SnapPointToPointOnOtherPart()

    Select the ‘Point-to-Point Animation’ under ‘Tools’ -> ‘Car’ to bring up the following modifier. The ‘Point-to-Point Animation’ defaults to ‘SnapPointToPoint’.


    As we need the Trailing Arm to stay attached to its’ Mount:

    • The ‘Point on this object’ should be set to the point where the Trailing Arm Pivots about

    • The ‘Other Object’ should be the relevant Trailing Arm Mount

    • The ‘Point on other object’ should be set to the point where the Trailing Arm meets the Mount

    So both the ‘Point on this object’ and ‘Point on other object’ need to be set to the same position helper referenced as the ‘Trailing Arm Pivot’.

    ____________________________
    4-D-v-2] RotatePointToPointOnOtherPart()

    Select the ‘Point-to-Point Animation’ under ‘Tools’ -> ‘Car’ to bring up a second modifier. change the dropdown to ‘RotatePointToPointOnOtherPart’.


    As we need the trailing to rotate to stay with the axle:

    • The ‘Point on this object’ should be set to the point where the Trailing Arm meets the Axle

    • The ‘Other Object’ should be the Axle

    • The ‘Point on other object’ should be set to the point where the Trailing Arm meets the Axle

    So both the ‘Point on this object’ and ‘Point on other object’ need to be set to the same position helper referenced as the ‘Axle Pivot Point’ in the Trailing Arm declaration.

    Lastly, the trailing arm should be welded to its’ parent part – the Trailing Arm Mount. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    4-D-Vi]

    Brake Disc/Drum

    Setting up the Brake Disc/Drum very similar to how we set-up the brakes in the level 1 tutorial. As we have an actual model part, you do not need to assign a collision property. In addition to basic structure data, the appropriate ‘POINT_OF_ROTATION’ must be assigned to match the wheel for that corner of the vehicle.

    The Pivot Point for the Brake Disc/Drum (accessed under the hierarchy tab) must have the same Y & Z Axis position as that of the Wheel Nodes, otherwise you may find the entire suspension system offset from where it should be in-game.

    The Brake Disc/Drum should be welded to its’ parent part – the relevant hub Mount. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    If you have modelled disc brakes, then the ‘Brake Calliper’ will only need basic structure data, and to be welded to it’s parent part – the Hub.

    ____________________________

    4-D-Vii]

    Wheels

    Setting up the Wheels is no different to how we set-up the wheels in the level 1 tutorial. These must be parented to the brake disc/drum, and also welded to their parent.
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 3 - Chapter 4 – Live Axle with Trailing Arms

    Part 3


    ________________________________________________________________________________________________

    4-E] Extra Parts

    These parts are not required to get the suspension system working, but are necessary in completing the look of the suspension system.

    ____________________________

    4-E-i]

    Shock Absorbers

    The Shock Absorber/Damper should be divided into two parts, upper and lower. The Upper Half should be parented to the Damper (Axle) Mount, and the lower half should be parented to the Axle. It is very important that the pivot point for each half of the shock absorber/damper is set to the point where each half of the shock connects to it’s respective parent part.

    If the shock absorber is not vertical, then the Pivot Points also need to be rotated to match that rotation. Additionally the Pivot Point for the Upper half of the shock absorber/damper needs to be rotated by an additional 180 degrees in the X Axis, on top of any other rotation.


    You will need to create position helper/PH at the pivot points and the end points, of both halves of the shock absorber.

    In addition to basic structure data. You will then need to make use of two ‘Point-to-Point’ Animations for each half of the shock.

    Upper Half Animations:

    • SnapPointToPointOnOtherPart() – Snaps Pivot Point to Damper/Axle Mount at the same point

    • RotatePointToPointOnOtherPart() - Rotate End Point of This Half to the lower Half of the shock at its’ Pivot Point

    Lower Half Animations:

    • SnapPointToPointOnOtherPart() – Snaps Pivot Point to Live Axle at the same point

    • RotatePointToPointOnOtherPart() – Rotate End point of this half to the Upper Half of the shock at its’ Pivot Point

    Lastly Each Half of the Shock Absorber will need to be welded to it’s respective parent part. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    4-E-ii]

    Coil Springs

    The Coil Springs will need to be parented to the upper half of the shock absorber. The Pivot Point will need to be set-up in the same way as the upper half of the shock absorber. You will need to create two position helpers. One at the centre of the top of the coil spring, and the Second at the centre of the bottom of the coil spring. In the case of the Tutorial car, these points are set to the end points of the Dampers/Shocks to simplify the number of position helpers required.



    In addition to basic structure data, you will need to make use of two ‘Point-to-Point Animation’s. One of which needs to be set to a ‘RotatePointToPointOnOtherPartWithScaling()’.

    • SnapPointToPointOnOtherPart() – Snaps Pivot Point of Coil Spring to Upper Half of Shock Absorber/Damper at the same point

    • RotatePointToPointOnOtherPartWithScaling() – Rotate and scale the End point of the Coil Spring to Lower Half of Shock Absorber/Damper at the same point

    Lastly, the Coil Spring should be welded to its’ parent part. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    4-E-iii]

    Universal Joint/UJ

    The final part attached to this live Axle is the Universal Joint depicting the transmission of power to the Axle. This parts’ pivot point needs to be set to the centre of the shaft. This part needs to be parented to the live axle.


    In addition to basic structure data, you will need to assign a ‘Standard Animation’ (accessed via ‘Tools’ -> ‘Car’). This will need to be set to rotate by 1 degree in the local Z axis, using the ‘GEARBOX_OUTPUT_ANGLE’ animation controller.



    Lastly, the UJ should be welded to its’ parent part. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    Setup of the driveshaft will be covered under chapter 8 (powertrain/drivetrain).

    ________________________________________________________________________________________________

    4-F] Differences for Front Axle (Hubs & Steering)

    When setting up a live axle as a front axle, there are some things that need to be modelled and set up slightly differently.

    ____________________________

    4-F-i]

    Importance of Pivot Point

    When setting up Live Axle Hubs for the front axle, the pivot point will be the point used to rotate the hub when the vehicle steers, and the way the hub visually connects to the axle should be modelled slightly differently to reflect that this part can pivot.

    ____________________________

    4-F-ii]

    Attachment point on hubs for Tie/Track Rods

    When setting up Live Axle Hubs for the front axle, you will need an arm extending from the Hub for the Tie/Track Rods to connect to.


    ________________________________________________________________________________________________

    4-G] Alternate Setup (Faking Leaf Springs)

    While Leaf Springs are not officially supported, it is entirely possible to manually animate and 'fake' the appearance of leaf springs. Each Leaf Spring will need to be split in half. The first half will be setup with the 'Trailing Arm' declaration & 'Point-To-Point Animation's, the second will just have the manual 'Point-To-Point Animation's applied.

    4-G-i] Visual Representation


    Below you can see a visual representation of this.

    • Inner Leaf Spring Mount (Red - 255, 000, 000)

    • Inner Leaf Spring (Orange - 255, 102, 000)

    • Outer Leaf Spring Mount (Green - 000, 255, 000)

    • Outer Leaf Spring (Yellow - 255, 255, 000)



    ____________________________

    4-G-ii] Pivot Points


    Since leaf springs are not typically flat like trailing arms, it is very important that the pivot-point for each half of the leaf spring is rotated in such a way, that if you were to draw a straight line in the local Z axis, it would lead to the 'Outboard pivot Point' where the leaf springs meet the axle. This angle can be calculated using simple Trigonometry (a Tangent Function).

    For visual reference depicting the rotation of the pivot points, see image below.


    Below you can see (roughly), how if you draw a line in the local Z axis, it leads to the outboard pivot point for both halves of the leaf spring.


    ____________________________

    4-G-iii] Typical Hierarchy


    As for the hierarchy, each 'half' of the leaf spring will be a child object of the relevant mount, and the mounts will all be child objects of the Damper (Axle) Mount.


    ____________________________

    4-G-iiii] Part Setup

    Inner Halves of Leaf Springs

    Remember that the inner halves of the Leaf Springs and their mounts will have to have the relevant 'Trailing Arm' & 'Trailing Arm Mount' declarations. Then the leaf springs will need two manual animations:

    • 'SnapPointToPointOnOtherPart()' - Snap pivot point to respective Mount at the point

    • 'RotatePointToPointOnOtherPart()' - Rotate End Point of this half to the Live Axle at the same point

    Outer Halves of Leaf Springs

    The Outer halves of the Leaf Springs and their mounts will just need basic structure data. Then the Leaf Springs will need two manual animations:

    • 'SnapPointToPointOnOtherPart()' - Snap pivot point to Mount at the point

    • 'RotatePointToPointOnOtherPartWithScaling()' - Rotate and scale End Point of this half to the Live Axle at the same point

    Lastly, don't forget to weld these parts to the their respective parent parts. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 3 - Chapter 5 - (Double) Wishbone Suspension

    Part 1


    ________________________________________________________________________________________________

    5-A] Required Parts

    Mandatory parts to get Suspension system working in-game

    When setting up (Double) Wishbone suspension, the following parts are the minimum required to animate the suspension.

    ____________________________
    5-A-i] Wishbone Mounts

    When setting up Wishbone suspension, you will need two wishbone mounts, one for the lower wishbone, and one for the upper wishbone. The Wishbone mount serves as the anchoring point for the entire suspension system to the vehicle chassis. Both mounts are usually unified into a single part. This is to avoid the risk of the wishbone mounts moving apart and messing up the entire suspension system. You can see an example of the Wishbone Mount in the colour coded image below.

    ____________________________
    5-A-ii] Upper & Lower Wishbone

    A wishbone hub needs two wishbones to connect it to the mounting point on the chassis. The Wishbones do not have to be of identical length or at the same angle. If your wishbones are at an angle, make sure that angle is an integer value and keep a record of it, as it will affect the pivot point.

    ____________________________
    5-A-iii] Wishbone Hub

    A wishbone Hub connects the brakes & wheel to the suspension system. It will need to have attachment points for both wishbones.

    ____________________________
    5-A-iiii] – Brake Disc/Drum

    In the Level 1 Tutorial, we used null nodes for the brakes. here we will use an appropriate model for the braking system. If you are modelling disc brake, the Calliper will need to be a separate part from the disc.

    ____________________________
    5-A-v] Wheel

    Same as the Level 1 Tutorial

    ________________________________________________________________________________________________

    5-B] Extra Parts

    Additional parts that are required to fully realize Double Wishbone suspension.


    ____________________________
    5-B-i] Damper Mount

    This part serves as a mounting point for the upper half of the shock absorber, it can be unified into the wishbone mount if you choose.

    ____________________________
    5-B-ii] Shock Absorbers

    A Shock Absorber is there to dampen any movement of the suspension and absorb and ‘shock’ or impulse exerted on it. The Shock Absorber will need to be separated into two parts, an upper & lower shock. These two ‘halves’ should end up rotating in such a way, that they always form a straight line, mimicking the visual appearance of a real shock absorber. You can see an example of the Shock Absorbers in the colour coded image below.

    ____________________________
    5-C-iii] Coil Springs

    The Coil Spring is there to provide rebound in the system, and is wrapped around the shock absorber. You can see an example of the Coil-springs in the colour coded image below.

    ____________________________
    5-C-iiii] Visual Representation

    Below is a colour coded image, showing all of the requisite parts listed above.

    ◦Brake Disc (Red: 255,000,000)

    ◦Brake Calliper (Grey: 153,153,153)

    ◦Hubs (Orange: 255,102,000)

    ◦Lower Wishbone (Yellow: 255,255,000)

    ◦Wishbone Mount (Blue: 000,000,255)

    ◦Upper Wishbone (Green: 000,255,000)

    ◦Damper Mount (Brown: 075,025,000)

    ◦Upper Shock/Damper (Cyan: 000,255,255)

    ◦Lower Shock/Damper (Pink: 255,000,255)

    ◦Coil Spring (White: 255,255,255)



    ________________________________________________________________________________________________

    5-C]

    Typical Hierarchy

    Below is the Hierarchy of how these parts need to be organised under the Wishbone Mount.
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 3 - Chapter 5 - (Double) Wishbone Suspension

    Part 2


    ________________________________________________________________________________________________

    5-D] Part Setup


    Unless otherwise stated in the setup information for each part, all mechanical parts typically have the following main settings

    Render Level:
    • ◦Set at 3, unless part is very large or on clear display (Axle, Engine)

    Basic Settings:


    • ◦Enable Crushability and set to 0.0

    Information regarding Pivot Points (accessed under the hierarchy tab) will be in each section.

    ____________________________

    5-D-i]

    Wishbone Mount

    In addition to the basic structure data, the Wishbone mount will need a resilience value, similar to the Axle/Damper Mount covered earlier. For the Tutorial car, which is a hefty intermediate car, this has been set as 2.0.

    The ‘Set As Mount’ command under ‘Tools’ -> ‘Car’ will need to be used twice for this part. Once for the upper wishbone mount declaration, and once for the lower wishbone mount declaration. You will need to create a position helper at the pivot point of both wishbones where they meet the wishbone mount.

    The Mount modifier will appear as follows


    Each Wishbone Mount will need to have two ‘Wishbone Mount’s set, one for the upper, and one for the lower wishbone.

    • The ‘Axle Wheel’ is the wheel for that corner.

    • The 'pivot axis' is the axis in which the wishbone pivots and should be set to Z.

    • The 'Mount point’ needs to reference the position helper for the relevant wishbone, and is the point where that wishbone will meet the mount.

    Make sure that each ‘Wishbone Mount’ declaration has the correct ‘Mount Point’ for the ‘Axle Type’, in other words – don’t use the position helper for the lower wishbone when setting up the upper wishbone mount.

    Lastly, the Wishbone Mount should be welded to its’ parent part. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    5-D-ii]

    Wishbones

    Setup of the Wishbones is fairly straightforward, but requires a position helper at both the wishbones Pivot point and its’ end point (where it meets the hub). These are highlighted below in white


    Additionally, the Wishbones pivot point (accessed under the hierarchy tab) should be set to the point where the wishbone meets the wishbone mount, like below.


    In addition to the basic structure data, each Wishbone will need to be set as a ‘wishbone’ using the ‘Set As Axle’ Command under ‘Tools’ -> ‘Car’. The modifier will appear as follows.


    • The ‘Axle Type’ & ‘Axle Wheel’ will need to bet set accordingly,
      In this case it’s the ‘Upper’ wishbone for the ‘Front left’ wheel. The Pivot axis needs to be set as Z to match the axis set for the wishbone mount.

    • The ‘Inboard Pivot Point’ needs to reference the point where the wishbone meets it’s mount. So select the relevant position helper, or reference the wishbone itself as it’s ‘pivot point’ should beset to that point.

    • The ‘Outboard Pivot Point’ is where the wishbone meets the Hub. So select the position helper at the point where the wishbone meets the hub.

    Lastly, the wishbones should be welded to their parent part. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part. Both wishbones should have a weakness value set.

    Make sure to give the weld for the lower wishbone a unique name, as it will be referenced in a ‘Ganged Break’ with the Hub!

    ____________________________

    5-D-iii]

    Hub

    Setup of the Hubs is similar to the hubs for the level one tutorial car, but as we have an actual model part, you do not need to assign a collision property. In addition to basic structure data, the appropriate ‘POINT_OF_SUSPENSION’ & ‘POINT_OF_STEERING’ must be assigned to match the wheel for that corner of the vehicle.

    As this hub is on the front suspension, and used for steering, the pivot point for the Hub will be used in determining the point about which the wheels are steered. Ideally the Hubs pivot point will have the same X & Z axis co-ordinates as the point where the lower wishbone meets the hub. The Hubs pivot point MUST have the same Y Axis position as that of the brakes & wheels, otherwise the suspension system could be offset in-game.

    Additionally, you will need to make use of the ‘Set as Hub’ tool under ‘Tools’ -> ‘Car’. Once this has been pressed, you should see a ‘Hub’ Part Modifier under the modifiers tab.


    • The ‘Hub Type’ will need to be set as ‘Wishbone hub’

    • The ‘Pivot Axis’ will need to match that of the wishbones and wishbone mount (Z axis)

    • The ‘Axle Wheel’ will need to match the wheel for that corner, in this case – Front Left

    • For the ‘Wheel Position’, just reference the hub itself

    • The ‘Upper Pivot Point’ is where the upper wishbone meets the hub, so use the relevant position helper

    • The ‘Lower Pivot Point’ is where the lower wishbone meets the hub, so use the relevant position helper

    The Hub should be welded to the Upper Wishbone and NOT its’ parent part. The weld should have a weakness value set and a unique name. In the ‘Ganged Break’ box, copy in the name of the weld that holds the lower wishbone to it’s mount, and then copy the name of the hub weld to the ‘Ganged Break’ box on the weld for the lower wishbone. The Ganged Break means that if one of these welds break, the other will too. The weld vertex/vertices do NOT have to meet an actual vertex on the ‘Weld Partner’.

    ____________________________

    5-D-iiii]

    Brake Disc/Drum

    Setting up the Brake Disc/Drum is no different to how we set-up the brakes in the level 1 tutorial, but as we have an actual model part, you do not need to assign a collision property. In addition to basic structure data, the appropriate ‘POINT_OF_ROTATION’ must be assigned to match the wheel for that corner of the vehicle.

    The Pivot Point for the Brake Disc/Drum (accessed under the hierarchy tab) must have the same Y & Z Axis position as that of the Wheel Nodes, otherwise you may find the entire suspension system offset from where it should be in-game.

    The Brake Disc/Drum should be welded to its’ parent part – the relevant hub Mount. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    If you have modelled disc brakes, then the ‘Brake Calliper’ will only need basic structure data, and to be welded to it’s parent part – the Hub.

    ____________________________

    5-D-V]

    Wheels

    Setting up the Wheels is no different to how we set-up the wheels in the level 1 tutorial. These must be parented to the brake disc/drum, and also welded to their parent.
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 3 - Chapter 5 - (Double) Wishbone Suspension

    Part 3


    ________________________________________________________________________________________________

    5-E] Extra Parts

    These parts are not required to get the suspension system working, but are necessary in completing the look of the suspension system.

    ____________________________

    5-E-i]

    Shock Absorbers

    The Shock Absorber/Damper should be divided into two parts, upper and lower. The Upper Half should be parented to the Damper Mount (or wishbone mount if the damper mount is part of the wishbone mount), and the lower half should be parented to the lower wishbone, or the hub (whatever part it attaches to). It is very important that the pivot point for each half of the shock absorber/damper is set to the point where each half of the shock connects to it’s respective parent part.

    If the shock absorber is not vertical, then the Pivot Points also need to be rotated to match that rotation. Additionally the Pivot Point for the Upper half of the shock absorber/damper needs to be rotated by an additional 180 degrees in the Z Axis (known as the Y Axis in 3ds max), on top of any other rotation.



    You will need to create position helper/PH at the pivot points and the end points, of both halves of the shock absorber.

    In addition to basic structure data. You will then need to make use of two ‘Point-to-Point’ Animations for each half of the shock.

    Upper Half Animations:

    • SnapPointToPointOnOtherPart() – Snaps Pivot Point to Damper Mount at the same point

    • RotatePointToPointOnOtherPart() -Rotate End Point of This Half to the lower Half of the shock at its’ Pivot Point

    Lower Half Animations:

    • SnapPointToPointOnOtherPart() – Snaps Pivot Point to lower Wishbone/Parent Part at the same point

    • RotatePointToPointOnOtherPart() – Rotate End point of this half to the Upper Half of the shock at its’ Pivot Point

    Lastly Each Half of the Shock Absorber will need to be welded to it’s respective parent part. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    5-E-ii]

    Coil Springs

    The Coil Springs will need to be parented to the upper half of the shock absorber. The Pivot Point will need to be set-up in the same way as the upper half of the shock absorber. You will need to create two position helpers. One at the centre of the top of the coil spring, and the Second at the centre of the bottom of the coil spring. In the case of the Tutorial car, these points are set to the end points of the Dampers/Shocks to simplify the number of position helpers required.



    In addition to basic structure data, you will need to make use of two ‘Point-to-Point Animation’s. One of which needs to be set to a ‘RotatePointToPointOnOtherPartWithScaling()’.

    • SnapPointToPointOnOtherPart() – Snaps Pivot Point of Coil Spring to Upper Half of Shock Absorber/Damper at the same point

    • RotatePointToPointOnOtherPartWithScaling() – Rotate and scale the End point of the Coil Spring to Lower Half of Shock Absorber/Damper at the same point

    Lastly, the Coil Spring should be welded to its’ parent part. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ________________________________________________________________________________________________

    5-F] Differences for Rear Suspension (Hubs)

    When modelling wishbone suspension for rear suspension, there will be some minor differences in how the parts should be modelled.

    ____________________________

    5-F-I]

    Modelling different attach points on hub (hinges rather than ball joints)

    Non-steering (Rear wheel) Hubs on wishbone suspension will be modelled slightly differently to the front hubs. On a Hub that is used for steering, it is connected to the wishbones via ball joints and would be modelled that way. But on a hub that is not used for steering, it is connected via hinges, so adapt the model accordingly.

    ____________________________

    5-F-ii]

    Driveshafts/UJs

    To be covered briefly in the powertrain section. For Wishbone suspension, you will need to break the driveshaft down to a total of four parts for each corner on a wishbone setup.
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 3 - Chapter 6 - (MacPherson) Strut Suspension

    Part 1


    ________________________________________________________________________________________________

    5-A] Required Parts

    Mandatory parts to get Suspension system working in-game

    When setting up (MacPherson) Strut suspension, the following parts are the minimum required to animate the suspension.

    ____________________________
    5-A-i] Wishbone Mount

    When setting up Strut suspension, you will need a wishbone mount, with an attachment point for a single wishbone, and an attachment point for the shock absorber/strut. The Wishbone mount serves as the anchoring point for the entire suspension system to the vehicle chassis. You can see an example of the Wishbone Mount in the colour coded image below.

    ____________________________
    5-A-ii] Strut Wishbone

    A Strut hub needs a single wishbone to form the lower connection to the wishbone mount. If your wishbone is at an angle, make sure that angle is an integer value and keep a record of it, as it will affect the pivot point.

    ____________________________
    5-A-iii] Strut Hub

    A Strut Hub connects the brakes & wheel to the suspension system. It will need to have an attachment point for the wishbone, but it will also need to have the lower half of the shock absorber integrated into the upper part of the hub. Below is an example of the strut hub.


    Further down You can see an example of the Strut hub in the colour coded image.

    ____________________________
    5-A-iiii] – Brake Disc/Drum

    In the Level 1 Tutorial, we used null nodes for the brakes. here we will use an appropriate model for the braking system. If you are modelling disc brake, the Calliper will need to be a separate part from the disc.

    ____________________________
    5-A-v] Wheel

    Same as the Level 1 Tutorial

    ________________________________________________________________________________________________

    5-B] Extra Parts

    Additional parts that are required to fully realize Double Wishbone suspension.


    ____________________________
    5-B-ii] Shock Absorber (upper half only)

    In Macpherson strut suspension, the hub forms a strut with the shock absorber. Since the lower half of the shock absorber is part of the strut hub, you only need to have the upper half as a separate part. You can see an example of the upper shock in the colour coded image below.

    ____________________________
    5-C-iii] Coil Springs

    The Coil Spring is there to provide rebound in the system, and is wrapped around the shock absorber. You can see an example of the Coil-springs in the colour coded image below.

    ____________________________
    5-C-iiii] Visual Representation

    Below is a colour coded image, showing all of the requisite parts listed above.

    • Brake Disc (Red: 255,000,000)

    • Brake Calliper (Grey: 153,153,153)

    • Strut Hub (Orange: 255,102,000)

    • Wishbone (Yellow: 255,255,000)

    • Wishbone Mount (Blue: 000,000,255)

    • Upper Shock/Damper (Cyan: 000,255,255)

    • Coil Spring(Pink: 255,000,255)




    ________________________________________________________________________________________________

    5-C]

    Typical Hierarchy

    Below is the Hierarchy of how these parts need to be organised under the Wishbone Mount.
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    User avatar
    '80s Time Warp
    Road Warrior
    Posts: 1257
    Joined: Wed Aug 03, 2011 8:30 pm

    Car Setup Tutorials For Trents Maxscript Tools.

    Post by '80s Time Warp »

    Level 3 - Chapter 6 - (MacPherson) Strut Suspension

    Part 2


    ________________________________________________________________________________________________

    5-D] Part Setup


    Unless otherwise stated in the setup information for each part, all mechanical parts typically have the following main settings

    Render Level:
    • ◦Set at 3, unless part is very large or on clear display (Axle, Engine)

    Basic Settings:


    • ◦Enable Crushability and set to 0.0

    Information regarding Pivot Points (accessed under the hierarchy tab) will be in each section.

    ____________________________

    5-D-i]

    Wishbone Mount

    In addition to the basic structure data, the Wishbone mount will need a resilience value, similar to the Axle/Damper Mount covered earlier in the Live Axle Tutorial. For the '67 Rattler, which is a light sports car, this has been set as 1.0.

    The ‘Set As Mount’ command under ‘Tools’ -> ‘Car’ will need to be used twice for this part. Once for the Lower Strut (Wishbone) mount declaration, and once for the Upper Strut mount declaration. You will need to create a position helper at the pivot point of for both the upper and lower struts where they meet the wishbone mount.

    The Mount modifier will appear as follows


    Each Strut Mount will need to have two ‘Strut Mount’s set, one for the upper, and one for the lower strut.

    • The ‘Axle Wheel’ is the wheel for that corner.

    • The 'pivot axis' is the axis in which the wishbone pivots and should be set to Z.

    • The 'Mount point’ needs to reference the position helper for the relevant strut, and is the point where that part will meet the mount.

    Just to clarify for those who are uncertain, the 'lower strut' is the wishbone that connects to the bottom of the Strut Hub, and the 'upper strut' is the shock absorber that connects to the top of the Strut Hub.

    Make sure that each ‘Strut Mount’ declaration has the correct ‘Mount Point’ for the ‘Axle Type’, in other words – don’t use the position helper for the lower strut when setting up the upper strut mount.

    Lastly, the Wishbone Mount should be welded to its’ parent part. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    ____________________________

    5-D-ii]

    Strut Wishbone

    Setup of the Wishbone is fairly straightforward, and is almost identical to the setup for a wishbone for Double Wishbone Suspension. A Strut wishbone requires a position helper at both the wishbones Pivot point and its’ end point (where it meets the hub). These are highlighted below in white.


    Additionally, the Wishbones pivot point (accessed under the hierarchy tab) should be set to the point where the wishbone meets the wishbone mount, like below.


    In addition to the basic structure data, the Wishbone will need to be set as a ‘wishbone’ using the ‘Set As Axle’ Command under ‘Tools’ -> ‘Car’. The modifier will appear as follows.


    • The ‘Axle Type’ & ‘Axle Wheel’ will need to bet set accordingly,
      In this case it’s the ‘Strut Wishbone’ for the ‘Front left’ wheel. The Pivot axis needs to be set as Z to match the axis set for the wishbone mount.

    • The ‘Inboard Pivot Point’ needs to reference the point where the wishbone meets it’s mount. So select the relevant position helper, or reference the wishbone itself as it’s ‘pivot point’ should beset to that point.

    • The ‘Outboard Pivot Point’ is where the wishbone meets the Hub. So select the position helper at the point where the wishbone meets the hub.

    Lastly, the wishbone should be welded to their parent part. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part. Unlike (Double) Wishbone suspension, you do not need to set a weakness for this.

    ____________________________

    5-D-iii]

    Strut Hub

    Setup of the Strut Hub is similar to the hubs for the level one tutorial car, but as we have an actual model part, you do not need to assign a collision property. In addition to basic structure data, the appropriate ‘POINT_OF_SUSPENSION’ & ‘POINT_OF_STEERING’ must be assigned to match the wheel for that corner of the vehicle.

    As this is a strut hub, the pivot point for the Hub needs to be positioned so that if you were to draw a straight line in the local Y axis of the Shock Absorber/Upper Damper, it would lead directly to the Pivot point of the Hub. Below you can see the pivot points for the Strut Hub, Upper Damper and Coil Spring.


    Additionally, you will need to make use of the ‘Set as Hub’ tool under ‘Tools’ -> ‘Car’. Once this has been pressed, you should see a ‘Hub’ Part Modifier under the modifiers tab.


    • The ‘Hub Type’ will need to be set as ‘Strut hub’

    • The ‘Pivot Axis’ will need to match that of the wishbone and the wishbone mount (Z axis)

    • The ‘Axle Wheel’ will need to match the wheel for that corner, in this case – 'Front Left'

    • For the ‘Wheel Position’, select the matching wheel, in this case 'Wheel_FL'

    • The ‘Upper Pivot Point’ is where the lower half of the shock absorber meets the hub, so use the relevant position helper

    • The ‘Lower Pivot Point’ is where the wishbone meets the hub, so use the relevant position helper

    It seems that the 'Lower Pivot Point' is used as the point of rotation for when the hub rotates/steering.

    The Hub should be welded to the Wishbone and NOT its’ parent part. The weld does not have to have a weakness value set The weld vertex/vertices do NOT have to meet an actual vertex on the ‘Weld Partner’.

    ____________________________

    5-D-iiii]

    Brake Disc/Drum

    Setting up the Brake Disc/Drum is no different to how we set-up the brakes in the level 1 tutorial, but as we have an actual model part, you do not need to assign a collision property. In addition to basic structure data, the appropriate ‘POINT_OF_ROTATION’ must be assigned to match the wheel for that corner of the vehicle.

    The Pivot Point for the Brake Disc/Drum (accessed under the hierarchy tab) must have the same Y & Z Axis position as that of the Wheel Nodes, otherwise you may find the entire suspension system offset from where it should be in-game.

    The Brake Disc/Drum should be welded to its’ parent part – the relevant hub Mount. The weld vertex/vertices do NOT have to meet an actual vertex on the parent part.

    If you have modelled disc brakes, then the ‘Brake Calliper’ will only need basic structure data, and to be welded to it’s parent part – the Hub.

    ____________________________

    5-D-V]

    Wheels

    Setting up the Wheels is no different to how we set-up the wheels in the level 1 tutorial. These must be parented to the brake disc/drum, and also welded to their parent.
    Just another '80s Dreamer....
    Twitter Manifestation. - Mods for Max Damage.
    Please do not use my old/deadname.
    Locked

    Check who’s online

    Users browsing this forum: No registered users and 85 guests