Vous êtes sur la page 1sur 53

LFS TUTORIAL

How to make a car mod for Live For Speed.

29-01-2010
Index
1. Required Software:.......................................................................................................................... 3
2. Separating parts into multiple objects ............................................................................................ 4
3. Applying materials in 3dsmax. ...................................................................................................... 24
4. 3ds to MTR with Zmodeler 1.07b .................................................................................................. 28
5. LFS Car Importer ............................................................................................................................ 31
6. Scale and Rotate a car in Zmodeler ............................................................................................... 33
7. How to make a wireframe with 3dsmax ....................................................................................... 37
8. Making Textures ........................................................................................................................ 42
9. Adding new parts in a child model and making materials. ........................................................... 48
10. Transparent Textures (windows)............................................................................................... 51
Appendix 1: Container Scale values ...................................................................................................... 52

29-01-2010
1. Required Software:

Zmodeler 1.07b

ZModeler 1.07b is a freeware software of Zanoza. ZModeler has third‐party


support which can be used to build plugins. The MTR export filter is a third‐party
export filter. There are a couple of things you should know before start your
project: ‐The MTR filter uses the viewport of this ZM version which means that
the front viewport is the front of your car and the default 3d mesh position is in
the quadrant 4 of cartesian plan (x e ‐Z); ‐You have to know how to use this
software because I won't discuss any t ool usage.

LFS Car Importer

LFS Car Importer is freeware software created by MagnoT. This tool is


necessary to successfully import car models to Live For Speed (Patch Z
currently). It not only imports cars but lets you manage several things related
to LFS car models. Although the user version of the present build is limited I
didn't encounter any problems to create a LFS car modification. It might
support previous version of LFS. This software is at disposure free of charge. It
was developed and licensed to users under the name 'LFS Car Importer'. The
user, as Licensee, cannot redistribute or sell it. This software does not offer
danger to the final user. It does not collect any kind of data or information. I'm
not responsible for bad usage.

Adobe Photoshop

Adobe Photoshop, or simply Photoshop, is a graphics editing program


developed and published by Adobe Systems. It is the current market leader for
commercial bitmap and image manipulation software, and is the flagship
product of Adobe Systems

NVIDIA DDS plug-in

The NVIDIA DDS plug-in supports the DXTC texture compression format and
allows you to open and save .dds files in RGB format. It reads and writes .dds
files in compressed or uncompressed forms, provides support for per -MIP color
fading, MIP-corrected normal mapping, and more.

Autodesk 3ds Max

Autodesk 3ds Max, formerly 3D Studio MAX, is a modeling, animation and


rendering package developed by Autodesk Media and Entertainment. It has
modeling capabilities, a flexible plug-in architecture and is able to be used on
the Microsoft Windows platform. It can be used by video game developers, TV
commercial studios and architectural visualization studios. It is also used for
movie effects and movie pre-visualization.
2. Separating parts into multiple objects

Step1: Import 3dmodel into 3dsmax.

Step2: remove ALL unnecessary parts from the car. This means all parts from
the model that are not visible ingame for example: engine, suspension, parts
inside the boot etc.

Select 1 object  right mouse button  hide unselected

Go to the modifier selection menu on which is visible on the right.


You can select poly by clicking on it using select object.
CTRL + DRAG MOUSE = select poly
CTRL + ALT + DRAG MOUSE = deselect poly
or select the poly’s 1 by 1.
I selected all parts that I want removed. Engine,wipers,suspension. After you
deleted them you will keep a nice and clean model .

A car has a lot of different materials. I will now explain how to make different
objects for every material. This makes it eas ier to assign the materials later.

First we go make a new object with the windows.


Use the element selection tool to select de the windows.
After selecting the windows click detach (located in the edit geometry menu).
After every detach I recommend you hide unselected!

Use the element selection tool to select the left side. Detach and fill in the
object name.
Use the element selection tool to select the right side. Detach and fill in the
object name.

Use the element selection tool to select the top of the car. Detach and fill in the
object name.
I now have a few parts left but I want them to have the same material later so I
will just rename the object so I know what it is (in this example I named my
object ‘BLACK’).

Now we go detach parts from the front bumper. Lights, grill, left,right,front.
Use the element selection tool to select the lights in the front bumper. Detach
and fill in the object name.

Use the element selection tool to select the grill in the front bumper. Detach
and fill in the object name.
Use the element selection tool to select the left side of the front bumper. Detach
and fill in the object name (this is important because if you want to be able to
make a skin later).

Use the element selection tool to select the left side of the front bumper. Detach
and fill in the object name.
All what is left is the bumper front. So we rename the object. And we are done!

We’ll be doing the same thing for the rear bumper.


Detach the lights,left,right,back, licence plate if you have one.

Use the element selection tool to select lights in the rear bumper. Detach and
fill in the object name.
Use the element selection tool to select right side of the rear bumper. Detach
and fill in the object name.

Use the element selection tool to select left side of the rear bumper. Detach and
fill in the object name.
Now look if there are poly’s on the inside of the bumper. Use the element
selection tool to select inside of the rear bumper. Detach and fill in the object
name. If the inside of the bumper is not visible in game you can choose to
delete it.

Now all we have left is the back itself. Change the object name from the r ear
bumper and we are done!
Now we start working on the boot. Check if the boot has poly’s on the inside of
the boot. You can delete these because they are not visible in game.

Use the element selection tool to select back of the boot. Detach and f ill in the
object name.
If your model contains a spoiler . Use the element selection tool to select the
spoiler on the boot. Detach and fill in the object name.

Now all we have left is the top of the boot. Rename the object and we are done
with the boot!
Next step. Detach parts from the chassis. First Use the element selection tool to
select the exhaust. Detach and fill in the object name.

If you have side indicators use the element selection tool to select the
indicators. Detach and fill in the object name.
I now have a few parts left but I want them to have the same material later so I
will just rename the object so I know what it is (in this example I named my
object ‘BLACK’).

Lights are different then other parts. It’s important you delete the LEFT lights.
In chapter 2. We will explain why.
In this model there is a 3d headlight with glass in it. Use the element selection
tool to select the glass. Detach and fill in the object name.

If you have side indicators use the element selection tool to select the lights.
Detach and fill in the object name.
Use the element selection tool to select the front light indicator. Detach and fill
in the object name.

Now use the element selection tool to select the front lights frame. Detach and
fill in the object name.
Next step. Rear lights!
If you have a rear light indicator use the element selection tool to select the
indicator. Detach and fill in the object name.

All what we have left is a rear light. Rename the object and we are done with
the rear lights!
Mirrors are different then other parts. It’s important you delete the LEFT
mirror.

Now use the element selection tool to select the mirror glass. Detach and fill in
the object name.
All what we have left is the mirror. Rename the object and we are done with
the mirrors!

Now save the model as ’.max’ file


3. Applying materials in 3dsmax.

Open the XR_Materials.max file that came


with this tutorial (file  open).
This max file contains a full set of materials
that you need to create a mod for XR.

Now merge the .max file you made in


chapter ‘1. Separating parts into multiple
objects’ with the XR_Materials.max.
file  merge.

click the button that says ALL.


And hit OK
Open the Material editor by
clicking on the Material Editor
button in the toolbar.

The window that appears is called the material editor in this case it contains
all materials you need for the XR.

Select objects with the object select tool


from the toolbar.

First to make sure we don’t forget any materials hit CTRL + A.


Select XR_PLAIN_SHINY3 0 a
from the material editor and
click Assign material to
selection
Your model will now look like this.

Next step assigning all the materials to the objects.


you do this by selecting an object, selecting the material in the materia l editor
and then clicking Assign material to selection.

Part Material
windows XR window 0 a
All black shiny parts XR PLAIN_SHINY3 0 a
All silver shiny parts XR PLAIN_SHINY 0 a
Glass material (mostly used for lights) XR PLAIN_GLASS M a
Mirror glass XR S_MIRROR M a
Back side body XR BACK 0 a
Top side body XR TOP2 0 a
Front side body XR FRONT 0 a
Left side body (what I use) XR Top_spoiler_XRT 0 a
Right side body XR RIGHT 0 a
Front light XR front_light_R M a
Brake light XR rear_light_R M a
Indicator light XR rear_light_R1 M a
Reverse light XR rear_light_R2 M a
Indicator light side XR INDICATOR_SIDE 0 a
Back license plate XR S_PLATE1 0 a
Front license plate XR S_PLATE 0 a
At the end your car will look like this.

Now we are done with 3dsmax and are going to export the model so we can use
it with Zmodeler. To do this we export the file to .3ds
(File  Export  save as ‘3d studio (* .3ds)’)
4. 3ds to MTR with Zmodeler 1.07b

In this chapter we will


import the car from
3dsmax into Zmodeler
1.07b. At the end export
it to MTR.

Launch zmodeler1.07b
import the .3ds file you
made in chapter 2.
file  import

Our imported 3ds file in Zmodeler:

Now enable the buttons like show in the image below.

Button names :

- Horizontal plane modify


- Vertical plane modify
- Objects
- Pan view the view ( press ALT + DRAG to pan)
- Rectangle easy selector
Now open the Zmodeler material
editor. (View  material editor, or
press E)

The materials are different than


those we assigned in 3dsmax.
What we have to do now is fix the
material names so they are the
same as in 3dsmax

Example :
XR PLAIN_SHINY3
to
XR PLAIN_SHINY3 0 a

There is a standard format for


material names.

Car Material Mirror End tag


XR PLAIN_SHINY 0 a
Mirror:
0 = not mirrored
M = mirrored
i = interior (part will change side when you change the driver position)

Lights and Mirrors are


always mirrored !!

the material names will now


be like this 

to make sure nothing goes


wrong I recommend you
rename <default material> to
XR PLAIN_SHINY3 0 a

If you are done changing


materials
click Apply changes and then
OK
Next step: Save the file as MTR.
Download Magnots LFS Car importer! Inside the .rar you will find a MTR.zmf.
place this file in …\Program Files\ZModeler\Filters.

Give your file a


name and save it
as LFS RAW (*.mtr)
5. LFS Car Importer

Start LFS Car Importer.


Open XR.vob
this file can be found in
the LFS/DATA/veh
directory.

Select the object from


the Object list.
Our model will only use
Main.

Import the MTR file


(Action  Import
external 3d model).

Then Save the file


(File  Save).

------------------------------------------------------------------------------------------------
Frequently Asked Question:
Importing fail\n Bad file

Reason:
- wrong material names
- too much polygons (high polygons car)

Solution :
- wrong material names
* open the materials editor in
Zmodeler1.07b 'View -> Materials
Editor' and edit your Materials.

- Too much polygons (high


polygons car)
* this means that your vehicle is
too complex. You can check how
much polygons your model
contains in Zmodeler1.07.
Load your model in Zmodeler and
Select all parts. Open Attributes
'Edit -> Attributes. Look at the
number of paces on the 'attribute'
tab. (like below).

The only way to solve this problem is to reduce the number of paces on your 3d
model. The maximum number of faces is 16.000!

------------------------------------------------------------------------------------------------

Start LFS and test your car!!

Your car will now look like this. As you can see the car is TOO SMALL and in the
WRONG DIRECTION.
In chapter 5 we will explain how to fix this.
6. Scale and Rotate a car in Zmodeler
In the last chapter we saw that the car was facing in the wrong direction.
There also was a problem with the size of the car in game. In this chapter I’ll
explain how to change the car size and direction.
The only way to make the car size correct in game is by a trial error method.
But to make this a little easier we have a template for the XRT.

Start Zmodeler 1.07b and open XRT_TEMPLATE.z3d.


You’ll see the original XRT model in Zmodeler.
Merge the z3d file with your own car with this template.
(File  Merge or press ‘CTRL + M’)
As you can see the car is facing in the wrong direction and is too small. First
we will change the direction. Go to the Main Toolbox  Modify  Mirror. We
only want to mirror it Horizontal so we select the Horizontal plane modify
only!.

Select all parts and click on your model.

you car is now mirrored!. And facing the other direction.

In 3dsmax we placed the mirror on the right. But if you look at the TOP-view in
Zmodeler it is on the left. So again we have to mirror it.
Select all parts and click on your model.

Now the car is the same as we made it in 3DSMAX.

------------------------------------------------------------------------------------------------
Frequently Asked Question:
My Car parts are flipped

Go to the Main Toolbox


 Modify  Reorient.
Select all parts and
click on your model to
Reorient the model.

Your car model is


reoriented and back to
normal.
We will now change the size of the model
Go to the Main Toolbox  Modify  Scale
Select all parts. Then you can change size by dragging with the mouse. Hold the
SHIFT key to perform 3dscale. If you want to scale only horizontal of vertical

you can do this by changing the plane modify .

This is the first attempt to make it fit. Like I said it’s a trial error method.

good enough for now ;)


7. How to make a wireframe with 3dsmax

This is the model we are going to make a wireframe for:

Step 1 select the object you want to make a wireframe for. In this case the
left side of the car:
Step 2: Open the modifier list and select Unwrap UVW
(Like show in the image on the right  ).

Step 3: Click ‘+’ in front of Unwrap UVW and select Face


and select all poly’s

Step 4: Click the Planar button + Align X, Y or Z button


according to your view. In this case we choose Align X.

Watch the yellow square to see if you have the right align!

Step 5: click the Edit button


Step 6: the Edit UVW’s window will appear. Like shown in the image below.
Go to Tools  Render UVW Template

Original
dimensions for an
XRT SKIN

Change the Width and Height


and fill in the correct
dimensions
Enable Invisible Edges
Step 7: Click the Render UV Template button and save your render
8. Making Textures
The most difficult texture to make is the
texture for the rear lights. So we will do
this now.

We have 3 rear lights. A brake, reverse


and indicator light.

I made a wireframe for the rear lights in


3dsmax (chapter 7 explains how to make
a wireframe).

The size of the texture must be valid.


Check Appendix 1: Container scale values

A lot of materials are linked together in


LFS car importer they all use the dds
texture file XR_interior1.dds

Go to the data/dds folder in your


LFS game directory and search
for this file. Create a copy and
change the file name. Then in LFS
Car Importer change the texture
name as well. (I renamed my
copied XR_Interior1.dds to
S14_Interior1.dds)
Now copy your texture in the dds file
(S14_Interior1.dds).

now we go apply this texture in game


using lfs car importer.

STEP 1: DDS

look at the dds file and look at the


texture direction. This is the texture
transform.

Texture transform = Texture transform = Texture transform =


ROTATE CW DEFAULT ROTATE CCW

STEP 2: Texture Transform

Go to Edit  Texture transform


and select the setting for your
texture

In my example the texture


transform = default.
STEP 3: Offset

The offset changes


when you change the
texture transform.

In the image on the


right you can see the
axel values for texture
transform = default

See appendix 2 for


more examples.

Minimum and maximum values for X and Y.

Texture Top left Top right Bottom left Bottom right


transform
X Y X Y X Y X Y
Default 0 -512 512 -512 0 0 512 0
Rotate CW 0 0 0 512 512 0 512 512
Rotate CCW -512 -512 0 -512 -512 0 0 0

For my rear lights the texture transform is ‘default’ and


the texture is located in the bottom left corner. So it’s
located at offset 0, 0.
STEP 4: Size.

Size works the same as the offset. But now


the width and height are important.
My texture width in the example is 256 and
height 192.
Because the texture transform is default
my values will be
x = 512
y = -192

click the APPLY button

STEP 5: Viewport

The viewport for this part is back. The


viewport tells you on which side to put the
texture. This is a rear light texture so the
viewport is back.

Save the file

STEP 6:
You have to make 2 MTR files in Zmodeler1.07b . (only rear lights need this
MTR1).

MTR 1: With all rear lights 1 material.


MTR 2: With separated materials for rear lights.

MTR 1: With all rear lights 1 material.


Rename all rear lights to REAR_LIGHT_R!

Renamed materials

Export the MTR file (REAR_LIGHTSFIX.mtr).


MTR 2: With separated materials for rear lights.
This is the original MTR file with the separated rear light materials:
rear_light_R, rear_light_R1, rear_light_R2. (You should still have this)

STEP7: Import and FIX


Start LFS car importer and import you mtr1 (where all rear light materials are
the same).

Select rear_light_R from the material list. Go to Edit  Fix material.

Save the file (File  save) and Test it in game


as you can see it works perfect  . Now you can make the texture on top of the
wireframe.

Now you can import the MTR 2, the one with the separate materials. Save and
test. Now the lights work separate, Reverse, brake and indicator.

STEP 8: Change the color if needed

You can change the


standard color in
LFS car importer.

Edit  Change
color
9. Adding new parts in a child model and making materials.

I mentioned earlier that the maximum number of


polies is 16.000. If you reach the poly limit you can
choose to place extra parts on a child model.

Child model is an extra model in a VOB file. For


example in the XR.vob there are child models for
the wipers, shift gator, seats, seatbelts and more.
Few important to know about childs:

- Car skins don’t work (XRT_SKIN.jpg)

- Can’t be damaged in game.

- No ALPA Channels

- Windows don’t work (the drivers head will


be invisible

I’m going to add a new part to the car, in a child


model.
I made my name in 3d text in 3dsmax. Exported this
as a 3DS file and imported this in Zmodeler.

I gave the material of my


3dmodel the material name
XR RENE 0 a.
Hide all unnecessary parts. In my case I only keep the RENE 3dtext model.

Export this
object only to
a new MTR
file.

Open LFS car


importer and
look at the
Object list.

You can
recognize
what a
childmodel is for by looking at the texture names and dds files. Example Child
#7 contains ‘wiperblade’. Conclusion this child is for a wiper. We d on’t need
this anymore so we are going to replace this with our own model.

I named my material
XR RENE 0 a.
It’s not in the material list
so I have to add a new
material. Select material
top from the material list.
Go to Edit  Copy
Material.
Then go to Edit  Past
Material.

I changed the texture name, removed the dds and clicked apply.
Now we have a new material with the name RENE. I have all materials that are
required for my new part that I want to add to my car.
Import the new MTR. And test it in game.

Adding parts like this allows you to add extra parts when you have a high poly
count. Using this for the interior is recommended.
10. Transparent Textures (windows)
Windows and other transparent
textures are a special type of dds.

If you want to make a transparent


DDS file you have to make this
transparent in Photoshop.

File  Save as  DDS

To get transparent dds files to work


in Live For Speed you must end the
dds file name with ALPHA
for example ‘customwALPHA.dds’.

Besides that it’s


important to
keep the alpha
(transparent)
functionality of
the dds file.
Select DXT3 to
keep this alpha layer.
Appendix 1: Container Scale values

Valid X & Y values:

Container Scale (px)


256 512 1024 2048
252 504 1008 2016
248 496 992 1984
244 488 976 1952
240 480 960 1920
236 472 944 1888
232 464 928 1856
228 456 912 1824
224 448 896 1792
220 440 880 1760
216 432 864 1728
212 424 848 1696
208 416 832 1664
204 408 816 1632
200 400 800 1600
196 392 784 1568
192 384 768 1536
188 376 752 1504
184 368 736 1472
180 360 720 1440
176 352 704 1408
172 344 688 1376
168 336 672 1344
164 328 656 1312
160 320 640 1280
156 312 624 1248
152 304 608 1216
148 296 592 1184
144 288 576 1152
140 280 560 1120
136 272 544 1088
132 264 528 1056
128 256 512 1024
124 248 496 992
120 240 480 960
116 232 464 928
112 224 448 896
108 216 432 864
104 208 416 832
100 200 400 800
96 192 384 768
92 184 368 736
88 176 352 704
84 168 336 672
80 160 320 640
76 152 304 608
72 144 288 576
68 136 272 544
64 128 256 512
60 120 240 480
56 112 224 448
52 104 208 416
48 96 192 384
44 88 176 352
40 80 160 320
36 72 144 288
32 64 128 256
28 56 112 224
24 48 96 192
20 40 80 160
16 32 64 128
12 24 48 96
8 16 32 64
4 8 16 32
0 0 0 0