* Update docs * Fix
11 KiB
\page trackoverview Overview
Custom Track Overview
This guide is not all-encompassing but rather covers the utmost basics for track creation.
Dependencies
- Blender v4.3 or older.
- Harbour Masters Fast64 https://github.com/HarbourMasters/fast64
Configuration
Adding the surface
-
Select the empty and in the object panel select
Track Root -
The drivable surface must be a flat mesh. It cannot be a cube.
-
Select the plane and scale it to a reasonable size by pressing the
skey and dragging with the mouse.- Z coordinate -420.0f must have mesh under it for the players to spawn correctly.
- This is approximately -16.8 Y in Blender units (420 / scale of 25)
-
You will likely want the surface mesh to be a bit bigger. However, this size will meet the spawn requirements.
-
Delete the cube
You now have a valid surface for racers to drive on. Multiple surfaces, hills, bumps, cubes, walls, spheres, etc. are all applicable types of mesh to add to the track. The specifics of crafting the track will be covered in another guide. Just know that there are proper ways to connect mesh together so the racers do not fall through while traversing from one mesh to another mesh.
Adding a Path
-
Allows CPUs to follow the track
-
Allows game to track players progress as they navigate the track
-
Add a nurbs path or bezier curve
-
Select the path
-
Enter
Editmode (Press tab) -
Normals shows these arrows which tell us which way is forward.
Thus, the point marked as 1 is the first path point. This must be placed at 0, 0, 0. If it were to be placed at 5, 0, 0, it would have an unexpected offset in-game.
-
Move the other points farther forward so that they do not get in the way, and then set the first point at 0, 0, 0.
-
If you zoom out, this point should be placed at the very center of the plane. If it is not at the center, press
tabto switch toobjectmode, and move the whole path to 0,0,0. Then switch back toeditmode and place the first path point at 0, 0, 0 -
The point should now be at the center (presuming the plane is also centered at 0, 0, 0)
-
See the green Y in the compass at the top right corner? This shows the positive Y-axis. This is the direction players are facing when they spawn. As such, your path must go in this direction. If it goes in any other direction the CPUs will turn 90 degrees and drive off the track.
Path Point Alignment
-
Enter Quad View as this allows moving points from the top-down
-
Next enable Magnet mode (shift-tab) and Snap Target set to Face
-
Now you can drag using the all-axis mode (the white circle) and the points will snap to the mesh surface.
-
Next select that last point in the path and press
Eto extrude (add) another point to the path and place it farther forward. -
Continue adding new path points until you make a complete circle.
-
The average track has ~800 path points. There's no specific number required, just enough that the CPUs traverse smoothly.
- If using the Nurbs Path, do not worry about how many path points. Just that the line connecting the points is smooth.
- If using the bezier curve, ignore the line that connects the points. Only the points matter!
-
Note that the start/end points do not need to connect to each other or anything like that. Just make them close
-
If using the bezier curve you must place at least ten points behind the starting line in a straight line.
- The NurbsPath requires this as well. However, you don't actually have control over the number of points. So, just make sure there's 16.8 units of space behind the finishline.
Prepare for export
-
Drag and drop the mesh and path into the empty so that they are within it. This can be done at the beginning or prior to export, either is fine.
-
Hold shift while dragging an object --> place the cursor over the empty, and drop the object
-
Note that these objects have been named. This is not required.
-
All the objects that need to be exported, must be inside the empty.
Export
Mods Path
- This should be something like
desktop/mycoolmodsor similar. All your mods will go here.
Name
-
This will determine what folders your track will be placed in.
-
If you name your track
mytrackthen it will be placed indesktop/mycoolmods/tracks/mytrack/files_are_placed_here -
Select the empty or any object inside of the empty and click export. If it says Success! then you should see files in the track folder.
Packaging
The track is now ready for packaging and import into the game for your first test!
- Find the
desktop/mycoolmods/tracksfolder and place a mods.toml file beside the tracks folder. Place the following in it and save:
[mod]
name = "mymod"
version = "1.0.0"
-
Right-click --> Add To Archive and turn into a stored zip archive.
- This file should not be compressed.
-
If you wish, you may rename this file to mod_name.o2r or mod_name.zip
If you open the zip folder, you should immediately see the tracks folder and the mods.toml file. Inside tracks should be a folder with the name of your track, and some files inside of that folder.
If it does not contain any files similar to the below then something has gone wrong.
- If all checks out, go to your game executable
- Add a
modsfolder. Drag and drop your mod into the mods folder.
Game Test
-
Launch the game
-
Navigate away and back to the start screen and a debug menu should pop up. Use the left/right arrow keys to switch tracks. Custom tracks are placed at the end of the list.
-
Press Launch HM64 Labs to configure your track and place actors.
-
Navigate to the Track Properties winow to modify track name and settings
Extra info
-
Goto the object menu and select a surface type (asphalt, grass, etc.)
-
Stuff like buildings or walls should be separate meshes to not mess with the collision generator.
-
The track/pavement should be a separate mesh from the rest of the scene.
-
Any number of tracks may be placed in the tracks folder
-
After opening your track in the editor for the first time. A scene.json file is created in your tracks data folder.
- If something ever goes horribly wrong you could manually edit this file or back it up to restore it later.
-
If the game crashes when you try to play it. Then there is an issue with track path or mesh.
- The game generates the collision mesh automatically.
-
Lighting changes are not currently saving to the scene file yet.
Materials
- Youtube tutorials discuss how materials work.
- Fast64 often defaults to a CI8 palette texture, always change
FormattoRGBA-16 bitorRGBA-32 bitThe Colour Index (CI8) format can cause issues if not used correctly. It's easy to confuse this as directly below this box it saysRGBA 16-bitExample of incorrect texture format:
Example of correct texture format