You are here

Car Setup Tutorials For Trents Maxscript Tools.

Pages

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Car Setup Tutorials For Trents Maxscript Tools.
#1 Submitted: Sun, 02/08/2015 - 12:41

Carmageddon Reincarnation:

Car Setup Tutorials/s for 3ds Max

Primary Levels of guide are now content complete. Some additional resources are still under Construction. Syntax or formatting errors may still present.

Big Thanks to Trent & Errol for their hard work in getting Modding for Reincarnation going.
________________________________________________________________________________________________
This guide consists of three levels:

  • Level 1 will contain the basics on how to set up a simple car that will work reasonably well in-game. Basic UI assets will be included CONTENT COMPLETE
  • Level 2 will cover how to set up more advanced features; detachable & Jointed parts, breakable parts (Windows/lights), Lights, advanced UI Assets CONTENT COMPLETE
  • Level 3 will cover how to set up full mechanical & animated parts in all three supported suspension types to match the official CR Cars - CONTENT COMPLETE
  • Wheel Setup
    - Step by Step of how to set up wheels. Includes 'Required Assets' & notes on deflated tire models CONTENT COMPLETE

________________________________________________________________________________________________
Additional Resources (Not specific to Maxscript):

________________________________________________________________________________________________

Edited by: Mad Mike on 24/02/2016 - 09:52

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Thu, 03/03/2016 - 15:23

Level 1 - Preface/About:

This is a guide on how to set up a basic car for Carmageddon Reincarnation (CR) 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 July 24th)
  • Chapter 2 - Files, Formats and a breakdown of the paperwork for cars in CR
  • Chapter 3 (part 1), (part 2) - Rigging a basic car model with all the essential parts required for setup in CR + 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 CR
  • 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 CR. Minge 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.
________________________________________________________________________________________________

Edited by: Mad Mike on Thu, 03/03/2016 - 15:23

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Sat, 08/08/2015 - 12:26

Level 1 - Chapter 2

Breakdown of Files & Formats in Carmageddon Reincarnation:

________________________________________________________________________________________________

2-A] ZAD & ZIP Files:

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

However in CarMODgeddon (as of V1.1.0.7470 & up), all Mod content 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 Reincarnation, 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 Reincarnation, 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 Reincarnation, material properties are defined in MT2 files. MT2 Files are modified .XML files, and reference one of many preset shaders in Carmageddon Reincarnation. 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)

____________________________
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, 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 model, so 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 which tier a car is grouped in and requirements to unlock it. There are some other values, but you can just copy this from the Eagle R or Hawk R.
____________________________
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)

This file also defines any skins/paint jobs for the car, the statistics printed to the UI, and other optional settings, such as:

  • 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.
________________________________________________________________________________________________

Edited by: Mad Mike on Wed, 14/10/2015 - 19:13

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Thu, 04/08/2016 - 19:09

Level 1 - Chapter 3 (Part 1)

Rigging a basic car model with all the essential parts required for setup in CR

________________________________________________________________________________________________

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

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 Reincarnation, 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 wireframe should flash to indicate the link, repeat this for all hubs. If you accidently 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.

________________________________________________________________________________________________

Edited by: Mad Mike on Thu, 04/08/2016 - 19:09

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Mon, 17/08/2015 - 18:27

Level 1 - Chapter 3 (Part 2)

Rigging a basic car model with all the essential parts required for setup in CR

________________________________________________________________________________________________

3-H] Car Structure setup Overview

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

3-H-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-H-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-H-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
  • 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-H-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-H-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-H-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.

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-I] Car Structure Setup

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

3-I-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-I-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 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-I-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-I-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-I-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-I-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 in-game the tires will be offset from the rim.
________________________

3-I-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-I-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-I-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

________________________________________________________________________________________________

Edited by: Mad Mike on Thu, 03/03/2016 - 15:31

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Sat, 08/08/2015 - 13:01

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_Reincarnation\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

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’

________________________________________________________________________________________________

Edited by: Mad Mike on Sat, 08/08/2015 - 13:01

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Thu, 03/03/2016 - 15:50

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 ‘</STRUCTURE>’. 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] SystemsDamage.XML (XML editor required)

There are 8 sections (bodywork, engine, transmission, steering, fl_wheel, fr_wheel, rl_wheel, rr_wheel). 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.
________________________________________________________________________________________________

5-B] 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 the default camera distance setting for the chase camera.

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
hud_damage_levels = {
  0.2,
  0.4,
  0.6,
  0.8,
  1
}

You must remove the following, these do not apply to custom vehicles

  • 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 = 2
shipped = true
hud_damage_levels = {
  0.2,
  0.4,
  0.6,
  0.8,
  1
}

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-D] Vehicle_setup.CFG (XML editor required)

This will need to be edited to reference the desired external assets (wheels, engine sounds, VFX, Driver). The main amendments required are to change the wheels & skin sections.

5-D-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-D-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] 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-F] Loading the car into CarMODgeddon using MINGE

Before testing out your new car, I strongly recommend enabling the ‘script_log’, this was previously enabled by default in the Pre-Gold versions of Carmageddon Reincarnation. To Enable the Script Log:

  • Create a new Folder called ‘Diagnostics’ in your Carmageddon_Reincarnation Folder
    (…\Steam\SteamApps\common\Carmageddon_Reincarnation)
  • In steam, Right Click on Carmageddon Reincarnation 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. Select ‘Package Mods’ -> ‘Package Carmageddon Mod’
  2. Browse to the folder where the car was exported to
  3. Set ‘Mod Type’ as Vehicle
  4. Fill in the Meta Data as desired (Author, Website, Vehicle Name)
  5. Press ‘Package Mod’
  6. Once the mod has packaged, enable the car under the ‘vehicles’ section, save and exit.

________________________________________________________________________________________________

Edited by: Mad Mike on Thu, 03/03/2016 - 15:50

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Sun, 02/08/2015 - 16:27

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

Edited by: Mad Mike on Mon, 03/08/2015 - 13:18

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Wed, 26/08/2015 - 18:58

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 Reincarnation.
________________________________________________________________________________________________

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 – “simple_norm_spec_env_base”
  3. Windows & Lights Materials – “simple_norm_spec_env_base_A”
  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”

________________________________________________________________________________________________

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):

  • <Texture Alias=”Side1_DiffuseColour2″ FileName=”mt_body_diffuse”/>
    // Regular Texture colour

  • <Texture Alias=”Side1_Normal_Map2″ FileName=”mt_body_normal”/>
    // Adds ‘3d effect’ details, useful for badges, crumples, panel lines, bolts & weld seams

  • <Texture Alias=”Side1_Spec_Map2″ FileName=”mt_body_specular”/>
    // Determines specularity/reflectivity, diffuse of this texture is reflection colour, alpha channel determines intensity

  • <Texture Alias=”Side1_DiffuseColour1″ FileName=”mt_body_damaged_diffuse”/>
    // Damaged Texture colour (usually has crumples &/or scratches overlayed)

  • <Texture Alias=”Side1_Normal_Map1″ FileName=”mt_body_damaged_normal”/>
    // Adds ‘3d effect’ details, used to add effect of crumples in bodywork

  • <Texture Alias=”Side1_Spec_Map1″ FileName=”mt_body_damaged_specular”/>
    // 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

  • <Texture Alias=”Side2_DiffuseColour” FileName=”mt_body_diffuse”/>
    // Backfacing diffuse texture, if you don’t have one, then just reference regular texture here

  • <Texture Alias=”Side2_Normal_Map” FileName=”mt_body_normal”/>
    // 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

  • <Texture Alias=”Side2_Spec_Map” FileName=”mt_body_specular”/>
    // 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 “<DoubleSided Value” to “FALSE”. Below are some examples (taken from the Monty Carnage) of the 6 main textures (specular maps alpha channel shown separately). I don’t have a unique back-facing texture, so the “Side1_” textures are used in its place.

Spoiler: Regular Body Textures
“Side1_DiffuseColour2"

”Side1_Normal_Map2"

”Side1_SpecMap2" (shown without transparency)

”Side1_SpecMap2" (transparency/alpha channel)

Spoiler: Damage Body Textures
“Side1_DiffuseColour1"

”Side1_Normal_Map1"

”Side1_SpecMap1" (shown without transparency)

”Side1_SpecMap1" (transparency/alpha channel)

_________________________________

2] Exterior trim or Interior Materials – “simple_norm_spec_env_base”

“simple_norm_spec_env_base” is used for almost all non-paint materials on the official cars. It takes in 3 textures.

  • <Texture Alias=”DiffuseColour” FileName=”cr_trim_diffuse”/>
    // Base Texture colour
  • <Texture Alias=”Normal_Map” FileName=”256_flat_normal”/>
    // Adds ‘3d effect’ details, useful for badges, crumples, panel lines, bolts & weld seams
  • <Texture Alias=”Spec_Map” FileName=”cr_trim_specular_2″/>
    // Determines specularity/reflectivity, diffuse of this texture is reflection colour, alpha channel determines intensity

_________________________________

3] Windows & Lights Materials – “simple_norm_spec_env_base_A”

“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”

See section ‘2’ above.
_________________________________

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.
<DoubleSided Value="TRUE"/>
_________________________________

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

Default material created by the Maxscript, and the simplest material available in-game. This only takes in a diffuse texture and doesn’t support transparency or any form of specular or normal maps.
________________________________________________________________________________________________

Edited by: Mad Mike on Wed, 26/08/2015 - 18:58

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Sat, 08/08/2015 - 13:18

Wheel Setup Tutorial

CONTENT COMPLETE
________________________________________________________________________________________________

Overview of wheels

In Carmageddon Reincarnation/CR. 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 CR, 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 CR. 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
  • Go to 'Package Mods' -> 'Pack CarMODgeddon Mod'
  • Browse to the folder you saved your wheel in
  • 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'.
_____________________________________

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'.
________________________________________________________________________________________________

One last note

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

Edited by: Mad Mike on Sat, 08/08/2015 - 13:18

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Mad Mike's picture
Velociraptor Fister
Kickstarter Backer
Posts: 1060
Submitted: Wed, 13/01/2016 - 14:28

'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
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)
car:SetCMPosZ(0) // Position of Centre of Mass (Z Axis)
car:SetFrontDownforce(20) // Downforce on front wheels in Kg(An Air Dam would increase this IRL)
car:SetRearDownforce(20) // Downforce on rear wheels in Kg (A Rear Wing would increase this IRL)
car:SetFrontRoll(0.3) // Maximum Roll between Left and Right Wheels (Front)
car:SetRearRoll(0.3) // Maximum Roll between Left and Right Wheels (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 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
car:SetHandBrakeStrength(10) // Strength of Parking/Hand-Brake 
car:SetTorqueSplit(65) // Percentage of Torque sent to rear wheels
car:SetLSDThresholdF(10) // Limited slip Diff threshold for front axle
car:SetLSDThresholdR(10) // Limited slip Diff threshold for rear axle
car:SetLSDThresholdM(10) // Limited slip Diff threshold for middle axle?
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, should affect top speed and stability at high 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) // Not Sure, haven't tweaked these 
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
car:SetMaxRevs(8000) // Maximum Engine RPM when limiter disabled
car:SetLimitRevs(true) // Enables Governor/Limiter of engine RPM
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)  
car:SetTorqueCurve(20, 180, 262, 294, 320, 294, 262, 208, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
car:SetStabilityGripChange(0.4) // Not Sure, haven't tweaked these 
car:SetStabilityThreshold(0.5) // Not Sure, haven't tweaked these 

__________________________
Other Notes:

  • Gear Ratios are the same on all official cars, top speed is altered mainly by changing number of gears
  • Not entirely sure of the gear ratios, more specifically which ones are used first. A 10:1 ratio for first gear? when the ratio for first gear in a real early '60s Caddy (4 Speed Hydramatic) was 3.97:1
    - Apparently Gear Ratios are in the following order: R, N, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • 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
(As of August 03rd)

  • f_diesel_exhaustsmoke02
  • f_diesel_exhaustsmoke03
  • f_diesel_exhaustsmoke04
  • f_yankv8_exhaustsmoke01
  • f_yankv8_exhaustsmoke02
  • f_yankv8_exhaustsmoke03
  • f_yankv8_exhaustsmoke04
  • f_yankv8_exhaustsmoke05
  • f_exhaustsmoke01
  • f_exhaustsmoke02
  • f_exhaustsmoke03
  • f_exhaustsmoke04
  • f_exhaustsmoke05
  • f_exhaustsmoke06
  • f_exhaustsmoke07
  • f_megawootexhausts
  • f_siamesedreamexhaust
  • f_venomexhaust

__________________________

Available Engine Sounds
(As of December 22nd 2015)

  • engine Camaro
    Hot Rod V8 Sound
    used by Twister & Subpressor
  • engine firetruck
    Volvo F12 Firetruck Diesel Sound
    used by Plow, Lumberer, Bear, APC, BlitzKrieger
  • engine jeep
    1980s Jeep CJ7 Sound (I6 or V8)
    used by Caddy, Towmeister, Stiffshifter, Crazor, Razorbill, Tropikill
  • engine Maserati
    Modern Maserati V8
    used by Eagle R, Tez Eagle, Hawk R, Annihilator, Cleaver, Countslash, De'Gory Un, 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 fearari
    Exotic V12 Sound
    Used by Shredlight

__________________________

Available Driver Models
(As of December 22nd 2015) 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

__________________________

Available Horns
(As of August 03rd):

  • 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

__________________________

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

________________________________________________________________________________________________

Edited by: Mad Mike on Wed, 24/02/2016 - 09:50

One man... Alone... Wrecking opponents in the Automobile he loves
Twitter Manifestation, Mods for Max Damage

Pages