How to make a 3D model of a car

Selecting a 3D model for a car

Currently, next to the default model of the 3D car, there are new 3 models of cars.
 
Name Polygons Vertexes Texture
futura 7243 5031 No
indy 12829 6514 Yes
porshe 8643 5256 No

The car are defined 3DS files. The files resides in the directory 3ds/model_name.
Seen the number of polygon, you will understand that you need a fast PC to get it smooth.
Also, it seems to be quite faster on KDE that Windows, even if the code is the same...

For a Object Oriented driver

In the constructor of your car, you can set choose the model by setting the member m_sModel3D

ex:

   Tutorial1::Tutorial1()
    {
      m_sName = "Tuto 1";
      m_sAuthor = "Lucky Luke";
      m_iNoseColor = oBLUE;
      m_iTailColor = oBLUE;
      m_sBitmapName2D = "car_blue_blue";
      m_sModel3D = "futura";
    }

For a C imprementation of a driver.

In drivers.cpp, in the list of the drivers, you can change the model of the car by changing your driver line like this.

OLD:  new DriverOld( Vector, oRED, oRED, "car_red_red", NULL,      "Vector" ),
NEW:  new DriverOld( Vector, oRED, oRED, "car_red_red", "futura",  "Vector" ),


Making your own 3D model

A car is simply 2 3ds files.

- car_body.3ds ( 3ds/model_name/car_body.3ds )
- wheel.3ds ( 3ds/model_name/wheel.3ds )

The 3ds loader of rars supports the following features:
- texture cordinates loading
- Only textures in TGA format (compressed or not)
- transparency

Example: the car "futura"
 
Here is the car "futura" in a modeler.

If you wish that your car react normally during the collisions, follow the following rules:

If you look the car from the top,
- the center of the car is at X=0, Z=0
- the size in Z axis = 200 (-100 to 100)
- the size in X axis = 100 (-50 to 50)

On the Y axis, the car is just above 0.

 

The car body is the car without the wheel.
- filename 3ds/futura/car_body.3ds
The wheel defined for the right side.
- 3ds/futura/back_right_wheel.3ds
- 3ds/futura/front_right_wheel.3ds

The center of the 3D model of the wheel is not 0,0. But the place where the wheel will be shown in the car.

3DS is maybe the best known 3d file format. There are a lot of programs that allow to create 3ds files or to convert other 3d formats to 3ds.

Here is a list of some of them.

Modelers
- Anim8or freeware program on Windows ( http://anim8or.8m.net/ )
  Very good 3d modelerer - but it is not easy to apply textures. (Freeware)
- AC3D: shareware available on Linux/Windows ( http://www.ac3d.org/ )
  ( Shareware : Price 39.95$)

3D Converters
- 3DWin : 3d convertor ( http://www.stmuc.com/thbaier/ )
    The non- registered version does not convert materials and textures ( Shareware : Price 39 Euro)
- 3Dexploration ( http://www.xdsoft.com/explorer/ )
   By far the best 3d convertor I know. Fully functional during 30 trials day (Price 249$)
- Crossroad 3d ( http://home.europa.com/~keithr/Crossroads/index.html )
   Another 3 convertor. No convertion of the textures. (Freeware)

Models
- There are a lot of freeware 3D models of car available on the web, that could be converted very easily.

This is a short limited list in comparison with what you can find on the net. For examples, here is a specialized site
- http://www.3dlinks.com