Bike Creation Guide

From PiBoSo Documentation
Jump to: navigation, search

Getting Started

  1. Download the bike template.
  2. Extract the template folder to your MX Bikes/bikes/ directory.
  3. Rename the extracted folder to the name of your new bike. Keep it short, without spaces.
  4. Rename the .ini file to the same as your folder name
  5. Rename the .cfg file to the same as your folder name
  6. Edit the .cfg file and change the ID at the top to the same as your folder name
  7. Edit the .ini file and change the names to whatever you want - this is used for the bike select menu. Short_name is used in the results data in the pits.

Now you should be able to see your bike name ingame, using the template model.

Replacing Models

Naming

The bike model is made up from a few different .edf files:

  • model.edf: The entire bike model, plus LODs.
  • model_shadow.edf: The mesh used to cast shadows. Should be textured completely untextured white and low detail.
  • model_cockpit.edf: The cockpit model, used in first-person view. Should be higher detail.
  • model_temp.edf: A temporary mesh used when joining online sessions, to prevent lags when new player join. Should be the same or lower detail than the shadow model, again with no texture.

To export a new entire bike .edf file, you should name the bike part objects as follows:

chassis - bike frame, engine & bodywork
steer - steering + upper forks
fsusp - front suspension (the lower fork)
rsusp - swingarm

Refer to the template objects for placement and naming of the levers / controls. The levers must be linked to steer and the pedals must be linked to chassis. If you are using the .blend file, you can simply parent your meshes to the objects in the file, and then delete the template meshes.

Export .fbx

Now export an fbx file (to your working folder, NOT in your MXB bike directory). Now run the FBX2EDF converter, click Load and locate your fbx file.

Create .edf file

  1. Open export_script.ini. You'll want to change the path to your MXB bike directory. Usually this will involve changing only the folder name from 'template' to the one you chose in step 1. Unless you have installed MX Bikes to a different directory than default. Save the .ini file.
  2. Now in FBX2EDF, you'll need to type in the full path to the ini file into the box at the top (just below Load). For example: C:/My New Bike/export_script.ini
  3. Click the Save button, and select model.edf in the bike folder you named in step 1.
  4. Click the OK button and check the command prompt to check for errors (ignore 'no matching parent' errors).

If everything is well, you should be able to see your bike model ingame. You'll need to repeat this process to export the lods, cockpit, temp and shadow models.

Physics

Now you should load your bike in BikeEd and adjust the points to match your geometry. See the BikeEd section for details. You can use EngineEd to adjust the torque / power of the engine.

Sounds

Copy all the .wav files from one of the standard bikes folders, or alternatively use your own.

Mud Layers

Create a text file with the same name of the texture, and extension ".lyr" (for example: bike_parts.lyr) and then fill it like this:

numlayers=1
layer1
{
numframes = 3
frame0=bike_parts_mud1.tga
frame1=bike_parts_mud2.tga
frame2=bike_parts_mud3.tga
}

The mud textures should go from cleaner to dirtier. They must have an alpha channel to control opacity as they will be applied on top of the base texture, with the same texture UVs.