Single and multiplayer racing simple game. Tech Info: Library used: OpenGL, PhysX, Devil, Boost, Fmod Language: C++

Post tutorial Report RSS Makeing your own car for Supra Torque

This tutorial is for those who like Supra Torque and want to customize it. This is first of tutorials that i want to made giveing all of you chance to make Supra look totaly different. Game is fully modable :)

Posted by on - Intermediate Starting a mod

All right lest start :)

First thing you have to do is download Supra Kit 1 for car moding and adding.

Kit1 contain:

- Model Converter from *.3ds to *.gmf

- Material Creator

- Reference Model

- Update need to add your cars

If you download Kit unpack and lest have fun:

1. Make some car model (i put some reference model showing rotation and scale of model)

There are some rules i have to know:

- Model cannot obtain wheels! (they have to be done separately)

- All Alpha blended object (windows, light glass) have to be the last in quene of model objects

2. Now save it as *.3ds

3. Do not close your 3d editor you have to know how your groups of model are set

4. Open Material Creator:

There are 4 sections:

- Red Describe all objects for model e.g tutorial model mazda6 have 7 groups

creating groups is simple write name and press add or go to AutoAdd section and put global group name and put quantity then press

create you should get someting like that: (Say you enter mygroup and 7 ) mygroup0, mygroup1 , mygroup2 etc.

- Blue is texture loader simply press load and put here all textures you will use in this model :) (Only Diffuse tex! no specular ,

bump etc)

- Green contain text label when you should enter folder that will obtain textures that you load (its global so if you put your

textures in game folder to data/textures/mycar/ enter the same here)

- Exit button, should i describe it? :D

- Create button , when you are ready press it put name of your material and create it!

Yellow part - contain created materials and some options for them like shader effect.

Here i have to describe what is SHADER_TYPE :

- Game have own script language and this program only generate some ready scripts i made some ready shaders you can use for your

car. If you want to make your own unique shader and material wait for next tutorial. It will be for more advanced people who know

how to use GLSL and not afraid to lern supra script language :) (i will make some documentation for it)

About effects:

TREE - why its here? im not remember but its good to generate material for vegetation :)

LIGHT - simple material diffuse tex + per pixel light

BUMP - bump mapping mateiral if you have normal map use this shader ( name your normal map like that: if diffuse tex is

mydifftex.png the normal map should be like that: mydifftexnm.png)

CAR_EFFECT - like LIGHT effect but include enviroment cube mapping for car

CAR_EFFECT2 - same that CAR_EFFECT but use normal map (how to name your normalmap is describe in BUMP )

Ok lest make our own Material: (made from reference model)

Go to texture section press load and load all textures ( back1, carbon, front3 and so on..) then go to

Yellow section put name of your material select SHADER TYPE from listbox and select texture that will be use with this material then

press ADD button do so long as you make all useful material you will need

Now goto mesh section named Auto ADD type mesh and type quantity to 7 pres Create

Now How to assign material to mesh:

- Simply select name of mesh klicking on it and material then press ASSING button if you will pressing meshes names you should see

names of effects and texture names on te center are changeing

when you are ready press generate (name of material should be same as model name)

We are almoust home! :)

Now copy your model to converter folder, then run it , press OPEN select your model then press SAVE button type name of that you

want ot get after converting and wait . When console will close process should be done and you will se your converted model.

Do the same with whell :) make it , create material etc...

Now copy all models to: "data/models/" directory in game

materials go to: "data/materials/"

When you done install patch (simply copy it and overwrite files if necessary)

Navigate to data/scripts folder now you have to copy one of scripts for cars e.g. "FiatPunto.scp"

rename it to your script name for example: "mycarscript.scp" and put it back to script folder.

Open your mycarscritp.scp in notepad or other text editor you should see something like that:

[carscript]

Postion -3.25 -0.8 0.83
MassCenter -0.5 -0.9 0.0
Mass 1120
WheelRadius 0.52
FrontWheel 1
BackWheel 1
Damping 150000.0
ShockAbsorb 1900000.0
BreakFrontBias 0.7
wheelpositions
2.0 -0.5 -1.34
2.0 -0.94 -1.34
2.0 -0.5 1.34
2.0 -0.94 1.34
-2.23 -0.5 -1.4
-2.23 -0.94 -1.4
-2.23 -0.5 1.4
-2.23 -0.94 1.4
WheelFrontPos 2
WheelBackPos -2.23
ConvexBodySize 3.8 1.7 1.2
transmissionEfficiency 1.58
motorForce 9000
differentialRatio 1.55
MaxSteringAngle 0.6
FrictionToFront 1.0
FrictionToSide 1.0
Drift 1
Smoke 1
Trials 0
CamDistance 8.9
CamHeight 1.9
gearDesc custom
6
-4.7
5.2 4.0 3.1 2.4 1.9 1.4

motorDesc custom
3500
6800
7000
1400

6

2000.0 1033.0
2400.0 774.0
3600.0 995.0
4600.0 1225.0
5300.0 900.0
6400.0 770.0

StartAngle 15.0
CarName punto
WheelName whell5

This is heart of your car all right what those values do:

Postion -3.25 -0.8 0.83 //Position of blow back effect durning change gear (lighr from the exhaust)
MassCenter -0.5 -0.9 0.0 // mass center of the car
Mass 1120 .. // mass of the car
WheelRadius 0.52 //radius of your whell
FrontWheel 1 // is there transmission for the front wheels
BackWheel 1 // same but for back wheels
Damping 150000.0 // suspension damping
ShockAbsorb 1900000.0 // suspension shock absorb (bigger damping and shock give you hardness suspension)
BreakFrontBias 0.7 // break wheel power for front and back wheel eg here is 30% to front and 70% to back
wheelpositions // position of wheels
//front wheels
2.0 -0.5 -1.34 // when suspension is on top
2.0 -0.94 -1.34 // and bottom
2.0 -0.5 1.34
2.0 -0.94 1.34
//back wheels
-2.23 -0.5 -1.4
-2.23 -0.94 -1.4
-2.23 -0.5 1.4
-2.23 -0.94 1.4
WheelFrontPos 2 // value from wheel
WheelBackPos -2.23 // value from wheel
ConvexBodySize 3.8 1.7 1.2 // you can experiment setting up ow convec box body size but better dont touch this...
transmissionEfficiency 1.58 // how god transmision you have its something like turbo multipler
motorForce 9000 // not used
differentialRatio 1.55 // effective ratio of gear box (bigger giving better acc but lower max speed)
MaxSteringAngle 0.6 // turn angle of front wheels in radians
FrictionToFront 1.0 // const Static Friction can be bigger than 1
FrictionToSide 1.0 // const Dynamic Friction should not be bigger than 1
Drift 1 // not used
Smoke 1 // disable enable smoke from wheel
Trials 0 // not used
CamDistance 8.9 // dinstance of cam from car
CamHeight 1.9 // Heigh of cam
gearDesc custom // gear box configuration
6 // how many gears
-4.7 //reverse ratio
5.2 4.0 3.1 2.4 1.9 1.4 //front gears ratios

motorDesc custom // describe motor of car
3500 //min rpm to gear down
6800 //min rpm to gear up
7000 //max motor rpm
1400 //min motor rpm

6 //linear curve of motor this store 6 multiple values

2000.0 1033.0 //values are left: rpm and right: motor momentum in Niutonometers
2400.0 774.0 //as you can see if rpm will be 2400 engine will generate 774 Nm
3600.0 995.0
4600.0 1225.0
5300.0 900.0
6400.0 770.0

StartAngle 15.0 // start angle of Y axis if im not wrong it is not used :)
CarName punto // name of your car model here you should put name of model you reated
WheelName whell5 // name of wheel you wanna use

When you customize your script save it
Now go to "data/cars.txt"

You should see this:

[begin]
[end]

this file is created specialy for those who wanna put their cars in to game:

no simple write:

[begin]

scriptname youruniquecarname

[end]

Why is so implortant to write youruniquecarname ? Becouse you can do someting like that:

[begin]

mycarscript mycar1
mycarscript mycar2

[end]

This give you 2 same cars in Menu :)

Do not forget you must write only script name without extension!

You are Done! Play game using your own car :)

Im will be glad if all of you who create their own cars put here links to them that other gamers can use them :)

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: