The Car Editor Guide by Fredizzimo
This is the guide how to use the car editing plug-ins released by me for Zmodeler. It is very similar to the 3D studio max version but there are some differences, so read this guide carefully.
Installation and requirements:
You will need Zmodeler v1.06f or later. The archive consists of three files and the installation requires some manual steps. Copy the RallyTrophyTools.zmp file to the ZModeler\plugins directory, the RTImporter.zmf to ZModeler\filter directory. The ZThe dll file, stlport_vc6.4.5.dll goes to the main ZModeler directory. ZModeler must not be running when copying the files.
Next start ZModeler, if you get any error messages, you have probably done something wrong or the plug-in isn't working on your computer, in that case contact me.
The plug-in consists of two parts one general importer that let's you import just one model from any bmf file, and the other utility part that is the core of the plug-in. It lets you import and export a complete car and it also has some other helper functions. The importer plug-in should show up as a file type when choosing import from the file menu, you should have the choice "RT files (*.bmf)" The utility plug-in will show up on the menubar, as a button, RT Car utilities.
Basic functionality:
Let's begin with the utility functions as those are the most important.
"Import/Export¡KImport car" This button does what it says, imports a car from the game. Note however that you should have the whole car exported with BZF Manager, or at least all BMF files and textures, before doing this. For more information on that refer the BZF Manager documentation. You will now be asked to browse for a car folder, this is the actual car folder, car_01, car_02 and so on, not the Exported data folder or cars folder for example. If everything goes well a car should be imported into ZModeler :-)
"Import/Export¡K Export car " Once again it does what it says, duh! And same instructions as for import, select a car folder. This function will also check that you have the required models and materials in your scene, look below for more details on that. Also remember to import the files with BZF manager after exporting from ZModeler, or you will not see the car in the game :-).
The show hide buttons makes it easier to look at the car and show only the things you want to see. The whole car model contains a lot of models that should never be seen together in the game, and that's the reason why these buttons exists.
"Materials¡KCreate def. mat." If you start making a car from scratch you should always start with this button. It creates a default set of materials, so you don't have to create them by hand, look at the materials section below for more details. This function asks you to select a texture directory. This is the same as the car directory you want to export the car to, when it's finished. The reason why it asks this is, if it can't find the textures it will not display the materials properly while working either. If you want to change that directory later, you have to change the texture path for each material, so be careful what you choose here.
This is also a button that you shouldn't use if you imported a car and want to continue editing on that. The submaterials generated will probably be in a different order and all you material ids will be wrong. So you would have to reassign them, to make the car use the correct materials again.
"Materials¡KSet emissive" The emissive color is missing in the material properties in zmodeler, so I had add this to allow changing of it. Click the button and select the material you want to change. A color selection dialog will appear. Select the color you want and click ok.
There will also be a Tools¡KPivots¡KShow Pivots, in the main menu. When clicking on that you will see the pivot points of each object. I had to add this, as zmodeler 1.06f only has tools to move and rotate the pivot points and no tools that let you show them ƒ¼ .
Now finally the functionality of the import plug-in. As I said earlier, this let you import a single model from any bmf file. This is good if you are doing a car from scratch and want some models from another car, or if you want to combine models from different cars. When you select a bmf file with the models you want to import, a dialog will popup, which lets you select the models you really want. It will also import the material from the bmf file, if it doesn't already exist in the scene. If the material exist in the scene it will use that material instead.
Basic file structure:
A car model uses four different bmf files, model.bmf, collision.bmf, rain_drop.bmf and wipers.bmf and some textures. The model.bmf file contains all graphical models, except the wipers animation. Collision.bmf contains the collision model, rain_drop.bmf the raind_drop models, and finally wipers.bmf the wipers animation. More about the models below. You don't need to know more about this for making cars as the exporter and importer handles this automatically, you will however need to know this, so that you know what to import with BZF Manager, and what to distribute when you release the cars.
General instructions for modeling:
You should read this section carefully, as the game will not work if you have the wrong model structure for the cars or if you do anything else in the wrong way. I will not give you any polygon counts you should aim for, as you can import the default cars and test it out yourself. And it highly depends on the target machine you are aiming for. But a general guideline is of course to have as few polygons as possible. The scale is that one unit in zmodeler is 1m in real life.
One of the most important things to notice is that most objects have local co-ordinates, the pivot point. This is important for rotations mostly, and I will explain further were you should set the pivot point, when going through model by mode. The pivot point can be moved and rotated by the display¡Klocal axis functions on the menubar. If you don's set the pivot points, the parts will probably rotate around the wrong axis, and it will not look good at all.
Car model structure:
Some models are required others are optional, but the game doesn't read any other models than the following models. So you have to follow these guidelines for model naming. Note that all names are in lowercase, I'm not sure if it actually does matter, but to be safe just name all your models in lowercase. Note that some of the "required" models might actually be optional, as I have done this list myself, without the official specs, but it will never be the other way, that an optional model is required.
-"body" (required)
This is the main model for a high detailed car (except hood and trunk, if you have separate models for them). The pivot point must be at the co-ordinates(0,0,0) with the z-axis pointing forward and the y-axis pointing up. BugBear made the car bottom touch the zero-plane, so I suggest you do the same. I think the reason why they did it this way is that it will prevent the cars from bottoming out when the suspension gets fully compressed. Everything in the ini-files is calculated from the pivot point, so that alone is a good reason to keep the pivot point at zero.
-"body_crash" (required)
This is the model of the crashed body. Parts of the body model can be replaced with this one, so it's important to keep them in sync. Especially the number of faces are important(actually the game cares about the vertices too, but the plugin generates the vertices from the faces, so you only need to care about the face count). And faces should be at roughly the same place in both models. So I suggest that once you have made the main model, you make a copy of that, and then only move vertices, not add or remove any to make the crash model. Keep the pivot at (0,0,0) here too.
-"body_lod" (required)
This is the low detailed car model. Note that the low detailed car doesn't have separate hood and trunk models. And the most obvious thing for this model is of course that it should have as few polygons as possible, to make it possible to use it on lower specs computers. Keep the pivot at (0,0,0) here too.
-"hood" (not required)
The hood model is a separate model for the hood. This is because the hood is moveable when damaged. This is also the reason why you should set the pivot point properly for this model. Otherwise it will not rotate properly. The hood rotates around the x-axis, so it's important that you have that axis placed at the hinges. The way the z-axis is pointing affects what is negative and what is positive rotation in the car ini files. But positive and negative are actually different for hood and trunk¡K Things got messy? No problem, just set so that the z-axis always is pointing forwards and adjust the values in the car.ini instead. You can test the rotation, by doing a rotation around the local axis for the whole object (make sure you don't have "affect pivot only" selected). For hood a positive rotation around the x-axis means positive in the ini, and for trunk a negative rotation means positive in the ini.
-"hood_crash" (required if you have a hood model)
If you have a hood model you will need the hood crash model too. Same as hood and same rules as the body_crash model too.
-"trunk" (not required)
Same rules as for hood
-"trunk_crash" (required if you have a trunk model)
Same rules as for hood_crash
-"indicator_rpm" (required)
This is the rpm indicator for incar view. The default position should be at halfway between max rpm and min rpm. Also remember to set the correct values in the car.ini file. The indicator rotates around the z-axis, so that should point forward with y-axis up and x-axis to the left.
-"indicator_speed" (required)
Same as for indicator_rpm
-"interior_hi" (required)
This is the incar view as showed from inside, so when making this model you can ignore the things behind the driver seats, but instead you should make the dashboard and thinks like that more detailed. And yes this model doesn't care about the pivot :-)
-"interior_lo" (required)
This is the interior when viewed from outside, as you will never see it so good it doesn't need to be that detailed. And this model doesn't require any special things for the pivot either.
-"steering_wheel_hi" (required)
This is the steering wheel as seen from incar view. Here the pivot is extremely important if you want a smooth rotation of the wheel, and not like it's on a broken axle¡K The wheel rotates around the z-axis. The y-axis should point upwards, and x-axis to the left. The z-axis should be like it was the real axis of the wheel.
-"steering_wheel_lo" (required)
Same as steering_wheel_hi, but for outcar view.
-"tire_fl" (required)
The front left tire. The positioning of the tire goes along with the positioning of the body. So to follow what BugBear did and to prevent the car from bottoming out, place the tire so that the bottom touches the zero plane. This is extremely important to get right as it affects if the car is bottoming out or not. The actual relation between the tire and the body is this(I believe): The engine places the tire where it should be, the suspension is attached to the pivot point. In the 3D model the body is placed as there was no suspension holding it up, as it was directly attached to the wheel with the suspension fully compressed. Now the engine calculates the suspension length, and the body is moved upwards relative to the tire with the same amount. The pivot is also extremely important here, as this affects the physics too, the axis the wheel turns around, and also the axis of rotation. The wheel rotates around the x-axis, so that should point to the left, y-axis up and z-axis to the front.
-"tire_fr (required)
Front right tire, same rules as tire_fl
-"tire_rl" (required)
Rear left tire, same rules as tire_fl
-"tire_rr" (required)
Rear right tire, same rules as tire_fl
-"tire_fl_lod" (required)
Front left tire for low detailed car, same rules as tire_fl
-"tire_fr_lod" (required)
Front left tire for low detailed car, same rules as tire_fl
-"tire_rl_lod" (required)
Front left tire for low detailed car, same rules as tire_fl
-"tire_rr_lod" (required)
Front left tire for low detailed car, same rules as tire_fl
-"wipers" (not required)
This is the wipers model, when no wipers animation is displayed (a dry stage). This object is replaced with the wiper animation (see below frame01, frame02 and so on) when you drive in rainy conditions. This object is not required but highly recommended.
-"shadow_tire_fl" (required)
This is the first "helper" object. It represents the shadow of the front left tire, and should be a quite lowpoly "tube". It should be placed at the same place as the tire, and be slightly smaller than that. I don't think the pivot is really important here, but set it the same as the tire centre.
-"shadow_tire_fr" (required)
Same as shadow_tire_fl, but front right tire instead
-"shadow_tire_rl" (required)
Same as shadow_tire_fl but rear left tire instead
-"shadow_tire_rr" (required)
Same as shadow_tire_fl but rear right tire instead
The following objects are real helper objects and not displayed directly but used as a position for lights and exhaust. The size is and shape shouldn't be that important but BugBear uses a cube with the dimensions 6x6x6, so I think you should use that too. Set the pivot point to the center of that cube and z-axis to the front, x-axis to the left and y-axis up.
-"light_front_left01" (required)
This is the position of the left front light.
-"light_front_left02" (not required)
If the car has extra front lights use this.
-"light_front_left03" (not required)
Same as above
-"light_front_right01" (required)
The position of right front light.
-"light_front_right02" (not required)
Use this if the car has extra front lights
-"light_front_right03" (not required)
Same as above
-"light_rear_left" (required)
This is the position of the left rear light
-"light_rear_right" (required)
Same as above but for the right rear light
-"light_reverse01" (required)
The position of the first reverse light.
-"light_reverse02" (not required)
The position of the second reverse light, if any
-"light_brake_left" (required)
The position of the left brake light, unfortunately there are only two brake lights so, cars with three brake lights can't get the third one displaying properly ƒ¼
-"light_brake_right" (required)
The position of the right brake light
-"ext_pipe01" (required)
The position of the first exhaust pipe. It's used as a base for displaying the exhaust.
-"ext_pipe02" (not required)
The position of the second exhaust pipe, if any.
-collision
This is the collision model, used for the physical calculations. This should be roughly the same size and shape as the car if you want to make a realistic car. But keep in mind that many polygons can affect the game speed, so don't make this model too high poly, if you want this car to be drivable on all machines. But also try making it matching the car shape as closely as possible. I believe that the game physics doesn't handle concave corners too well, so try to make only convex corners, or at least nearly convex ones. [edit by KenKunen]-Following on from Spikey(BugBear)'s advice and from testing by myself, car collision models should be a max of 40 polygons, less if possible though this is dependent on the shape of the car.. any more will make the game physics engine start to behave in very bizzare ways !!
-rain_body" (required)
This model determines where the raindrops should fall, so that they fall nicely on the car :-) You only need to model the surfaces that are pointing upwards, the model don't need to be double sided either. But you probably want to make this more detailed than the main model, to get a nice looking effect. BugBear has doubled the number of polygons for this model, compared to the normal body model.
-rain_hood" (not required)
Same as above, but for the hood
-rain_trunk" (not required)
Same as above, but for the trunk
-rain_window" (required)
Same as above but for the window
-frame00 (required), fame01, frame02¡K..
This is the wipers animation used when driving a rainy stage. You should aim for about 7-10 frames for a complete animation. Note that you can tweak the speed and other visual effects for the raindrops in the car.ini file. I have put frame00 as the only required one, as that will display stationary wipers even in the rain.
General instructions about materials:
Material also plays an important role when making new cars. Some of the materials are very important for crashed models or lit lights and so on. The material naming is not as strict as the naming for the models. You are allowed to insert your own materials and give them your own names, but there are a few required materials. Another restriction you have is that you are forced to use the default set of textures, as the BZF manager can't import new files, only existing ones. You are however free to change the structure of the texture to whatever you want.
Some of the material properties in zmodeler are ignored when exporting. So, you will need to know which material properties you can play with and change, so that they have an effect in the game. Some material properties are decided by the name. The game only uses one texture per model so you should only set the primary texture. The helper object materials generally doesn't need a texture, more about that later.
The most important thing to control is the alpha channel functionality, if it's used for environment mapping or for transparency. If you set Alpha parameters type to blend the alpha channel is used for transparency, otherwise for environment mapping. For good looking transparent materials in zmodeler, set the src. blend to src. alpha and dst. blend to inv. src alpha.
No other material property is used in the game, except the self-illumination, that you can set using the set emissive tool as I explained earlier. Some materials have to be self-illuminative if you want to see them at night, they are glowing slightly.
You set some additional material properties using the material names. A material name starting with #E1 means that it's environment mapped. In a similar way a name ending with dust means that it can be dusty, when you are driving.
You should however rarely need to change any existing material, or add a new one if you use the create default materials button in the plug-in. This will create the materials described in the next section.
Car material structure:
Required outside eniviroment mapped materials
-"#E1 window front", "windows.tga", transparent, not self-illum
This is the front window material as seen from the outside, this is a very important material as it controls if the windows shows broken or not. For a broken window the texture is changed to "windows_damaged.tga"
-"#E1 window leftside", texture="windows.tga", transparent, not self-illum
Same as #E1 window front, but the left window
-"#E1 window rightside", texture="windows.tga", transparent, not self-illum
Same as #E1 window front, but the right window
-"#E1 window back", texture="windows.tga", transparent, not self-illum
Same as #E1 window front, but the rear window
-"#E1 headlight_left", texture="lights.tga", transparent, not self-illum
Same as #E1 window front, but this is for the left headlights. The texture for broken lights is lights_damaged.tga. The lightslit.tga and lightsbraking.tga textures are also used for the lights, when they are lit respective when you are braking.
-"#E1 headlight_right", texture="lights.tga", true, not self-illum
Same as #E1 headlight_left, but the right headlight
-"#E1 rearlight_left", texture="lights.tga", transparent, not self-illum
Same as #E1 headlight_left, but the left rearlight, including brake and reverse lights
-"#E1 rearlight_right", texture="lights.tga", transparent, not self-illum
Same as #E1 headlight_left, but the right rearlight including brake and reverse lights
Outside materials(not required)
"#E1 body", "body.tga", not-transparent, not self-illum
The material used for the car body, where it shouldn't get dusty(the roof mainly), and parts under the hood and trunk.
"#E1 body dust", "body.tga", not-transparent, not self-illum
The material used for the car where it should get dusty, not this material is used for the hood and trunk as well.
"tire", "tire_intermediate.tga", not-transparent, not self-illum
This is the material for the non-transparent parts of the tires.
"tire alpha", "tire_intermediate.tga", transparent, not self-illum
The material for the transparent parts of the tires
"wipers", "wipers.tga", transparent, not self-illum
The material used for the wipers, it's also used for the wipers animation(frame00, frame01¡K)
"sparelights", "lights.tga", not-transparent, not self-illum
This material is used for sparelights, the covered lights, and it's therefore not transparent.
//Required inside winows material when wieved from inside
"windows", "interior_windows.tga", transparent, not self-illum
This is the window material as viewed from incar view (interior_hi). Unfortunately the game doesn't use a different material for the front and side windows, which means that if you damage the front window the side window gets damaged too, even if it's not damaged from outside views. The texture is replaced with interior_windows_damaged.tga, when they are broken.
Inside materials when viewed from inside(not required)
-"cockpit", "interior_hi.tga", not-transparent, not self-illum
This is the material you should use for the cockpit when viewed from inside(interior_hi)
-"indicators", "steering_wheel.tga", transparent, not self-illum(50%)
This material is self illuminating, so that you can see the indicators when driving in dark.
-"steering wheel hi", "steering_wheel.tga", transparent, not self-illum
This material is used for the steering wheel. The lowpoly model of the steering wheel usually use the interior lo material, but you could of course use this one for that too.
-"meters", "meters.tga", not-transparent, not self-illum(50%)
This is the material for the meters, unlike the indicators, this material is not transparent.
Inside materials when viewed from outside(not required)
-"window front", "windows.tga", transparent, not self-illum
This material should be used for the for the front window in the interior_lo model.
-"window leftside", "windows.tga", transparent, not self-illum
Same as window front but the left window instead
-"window rightside", "windows.tga", transparent, not self-illum
Same as window front but the right window instead
-"window back", "windows.tga", transparent, not self-illum
Same as window front but the rear window instead
-"interior roof", "windows.tga", not-transparent, not self-illum
This material is usually used for the roof in the interior_lo model
-"interior lo", "interior_lo.tga", not-transparent, not self-illum
This material is used for everything else in the interior_lo model.
Helper materials(not required)
Helper materials should not be showed in the game, but I suggest that you assign the following materials to the helper objects, to be really sure of that.
-"metal", "", not-transparent, not self-illum
Used for metal helper objects, the exhaust and shadow tire
-"lights", "", not-transparent, not self-illum
Used for all lights helper objects
-"rain_drop", "", not-transparent, not self-illum
Use for the raindrop models
-"collision", "", not-transparent, not self-illum
Use for the collision model
Required changes that needs to be made to the car.ini files
After making your model you will need to make some changes to car.ini or you will get some very big glitches. Note that the coordinates works in a different way in the game than in zmodeler. All coordinates in the game are z-pointing forwards, x pointing to the right and y pointing up, so the z and y coordinates are swapped.
InteriorSpeedMax, and InteriorRPMMax, set these two values so that they match the meters you have in you car model
CenterOfMass, this is an offset from the pivot point of your body, so there's a possibility that you have to change this. Of course you should probably change mass and moment of interia too for realistic physics, but that's another story.
Drive lights
DriveLightLocation. Set this to the same position as your drive lights, again this is relative to the pivot point of your body, that's why you should have the pivot at 0,0,0, so it's easy to get positions from the model.
Camera/Driver locations
BumperLoc, InteriorLoc, DriverLoc, CoDriverLoc, and HoodLoc, those should be changed to match your model, again relative to the pivot.
Trunk/Hood
Change these if you want to, more instructions in the models section
Wipers
This section should match your wipers animation for nice rain effects
Tires
TireWidth, TireRadius, should match your tires in the model
Final words
These things are only guidelines with things that I have found out. Very few of the things presented here are based on facts we have got from BugBear, most is found out by testing and using common sense. Therefore I want to point out that some of the things I say here might not be correct. So if you find any errors, please report them, so other modelers don't have to repeat them. I have probably missed a lot of important things too, and the same applies here report things you find out.
Hope you enjoy the plugin, and we get many new cars :-)
Here's some useful links for people thinking of making new cars
3D modelling tutorials:
http://www.raz.ro/tutorials/masina/car1.htm
http://www.3dcafe.com/asp/tutorials...i/modelaudi.asp
http://zmodeler.nfscheats.com/docs.html
http://strat.m4driving.sm/tutorials.shtml
http://www.3dluvr.com/grid/tut3D/tut3d.htm
Car Blueprints:
http://www.suurland.com/
Car Specs:
http://www.carfolio.com/