New Blender Tutorial
Last update july 8th 2011
This tutorial will show you how to model a simple track for SuperTuxKart.
Keep this in mind, however :
- This tutorial is not intended at people who have never used Blender, if you are a total beginner I suggest searching for online tutorials or buying/borrowing a good blender book, and spending a few weeks getting used to blender. That's what it takes!
- This tutorial covers only the modeling; other pages will explain how to make the drivelines, add collectibles and export the track.
Making a model for the road
Let's start by making a small road segment. You can start with a plane, or any other shape that looks like the road you wish to build. I generally add it at (0,0,0), no idea if it matters. Orient the road segment along the X axis (you could orient it along another axis but X is the default so that's easiest for us). Add UV texturing to this small road segment if you wish.
You may end up with something that looks like :
Extruding the road
Then add a new curve by pressing Spacebar >> Add >> Curve >> Bezier Curve. Give a name to this curve, for instance "road_path"
Select the road segment. In the "Edit" buttons, add two modifiers to the road segment. First add an array modifier, then a curve modifier.
In the top combo of the array modifier, select "fit to curve length", and in the "ob" field under, enter the name of the curve (in this example "road_path"). Check the "merge" button.
In the "curve" modifier, enter next to "Ob" the name of the curve (in this example "road_path")
You may not see much yet; but now scale the curve up, and you should see the track segment automagically follow the track curve!
Note : the segment and curve objects may not like to have scale/rotation applied to them. If you get weird results, select both the curve and the model segment, then press Ctrl+A and select "Apply Scale and Rotation to Object Data"
You may then enter edit mode on the curve and edit the curve to make a road pattern. If you wish to make the road go up and down, as opposed to being just flat, press down the "3D" button in the curve's edit buttons) You may also tweak the resolution of the curve with "DefResolU"
If you want the road to close (by a closed curve instead of having two separate ends), select menu "Curve >> Toggle Cyclic" or use keyboard shortcut "C")
Tweak the curve points so that the curve length is an exact multiple of the size of your road segment so that the road closes nicely (TODO: some blenderhead should offer a better way to make the road close properly as I can't believe it doesn't exist)
Your road will now look like :
Now, to make the ground around the track, we have two options.
If the road is e.g. a small mound (think canyon track), you can simply add the ground under the road.
If the road is flat, like in this example, it's better to fill the ground between the road. Duplicate your road object (Sift+D) so that we don't lose the original road curve if we ever want to modify it, then move the duplicate into another layer (shortcut: M key) so that the to duplicates don't get mixed up, and move to this layer. Then click on the "apply" modifier of both modifiers. We now have the road as a mesh.
Go in edit mode; there you can simply start creating lines/faces (use extrude "E" and make face/line "F")
You can then UV-texture the terrain too when you're done.
Then you may add trees, and/or other types of scenery - I won't describe this part much because any blender modelling tutorial on the net can help you with that :) Make sure to see the other articles to learn how to make moving textures, animations, and other visual goodies.