Tracks
Blocks in Blender.
A track is a Blender file, and building one is picking blocks from a panel and pressing Add. No SDK, no separate editor, and one command to export.
A grid, a level, a quarter turn.
Every road piece fills one or more 32 metre cells and sits on an 8 metre level, turned only by quarter turns. Block ends meet exactly or not at all, and the exporter rebuilds every block from its description and places it with exact arithmetic, so the seams share bit-identical vertices. A wheel can never fall through a seam because there is no seam to fall through.
A block is a shape, a road type, a surface and a special, and every combination works on every shape.
- Shapes
- Straights, turns of one, two and three cells, banked turns, wallrides, S-bends, slopes, kickers, landings, loops, dead ends and transitions between road types.
- Road types
- Tech: flat asphalt between kerbs and low barriers. Dirt: between rounded banks. Sausage: a gentle hump with no edges, or with a barrier along each edge. Pipe: the top of a round pipe whose sides fall away. Bobsleigh: an ice channel whose walls curve up to vertical, whole or with one open side. Platform: the whole cell, open at the sides.
- Surfaces
- Asphalt, concrete, kerb, dirt, gravel, grass, sand, snow, ice, wet, metal, wood, plastic, water. Each has its own grip along and across the road.
- Specials
- The start (exactly one per track), checkpoints, the finish, and the pads: turbo, super turbo, rocket booster, super rocket booster, rocket booster down, reset, grip, spring and overdrive.
- Scenery
- A blimp, a hot air balloon, towers, a wind turbine, a crane, containers, silos, a ferris wheel, grandstands, a big screen, flags, bales, trees, rocks and tyre stacks, in six themes. Everything collides as the surface its material is named after, so a car can land on a rock or glance off a tower to cut a corner.
- Fog
- Distance fog by colour, start, end and strength, set on the scene and carried into the game. The sky is never fogged, so a pale fog washes the scenery out and keeps the road sharp.
Pick a block. Press Add.
The NetRacer add-on puts a tab in the sidebar of Blender's 3D viewport. Select a block and Add puts the next one on its open end. Replace swaps the selected blocks for the chosen one, Paint changes only their road type, surface and special, and Pick copies a block's choices back into the panel. Blocks can also be dragged in from the Asset Browser, where the whole library has pictures, and Connect moves a dropped block onto the nearest open road end.
Check track
Lists every block that does not fit and says whether the road runs from the start to the finish. With strict layout off, the default, those are warnings and the map exports with the blocks exactly where you put them, so you can tilt a platform by hand or pile blocks up. Strict layout on, the export refuses until they line up.
Test drive
Saves, exports and starts the game on the map, hosting it locally. Add stadium puts the stadium round the track, and Scatter scenery fills it from a seed while keeping every piece off the blocks and off the racing line, so a jump never flies into one.
Setting up, from a checkout of the game:
scripts/install_blender_addon.sh # once: the add-on and the block library
scripts/new_map.sh my_track # data/maps/my_track/map.blend: stadium, start, finish
blender data/maps/my_track/map.blendOr write the track down.
A build.py beside the map can lay the blocks instead of a hand in Blender. Each call adds a block on the open end of the last, and save puts the stadium round it and writes the Blender file.
t = K.Track('my_track', cell=(0, 0), heading='N', level=1)
t.add('straight', special='start')
t.add('turn2_right', road='sausage', surface='ice')
t.add('loop_big_right')
t.add('straight', special='finish')
t.save(arena='Stadium')Exporting, either way:
scripts/build_map.sh my_track # quick unlit export
scripts/build_map.sh my_track --bake # Cycles lightmap bakeThe client's --host-map path/to/map.blend runs the same export before hosting. For a block track the exporter also writes the racing line from the start to the finish, which the game's scripted test drivers follow.
What the game insists on.
- One start
- Exactly one start marker. A run begins there after the countdown.
- Checkpoints in any order
- Numbered checkpoints can be taken in any order, and the finish counts once all of them are collected. A gate counts for anything that passes through it, however high.
- No reset zones
- Nothing but the driver respawns the car. Leave the map and it stays where it landed with the clock running.
- Surfaces are material names
- A drivable material must be named after one of the surfaces. Anything else fails the load with the material named, so a track can never ship with a surface the physics does not know.
- Author time
- A medals file beside the map carries the author's time in milliseconds. Gold, silver and bronze derive from it.
Built something? Post the Blender file or the exported map in the NetRacer Discord, which is also where to ask when a block will not connect or an export refuses. Tracks people share there are how the official set will grow.