SuperTuxKart

From OpenStreetMap Wiki
(Redirected from Supertuxkart)
Jump to navigation Jump to search
An area of Rostock converted from OpenStreetMap into a SuperTuxKart 3D game layout

SuperTuxKart is a free, open-source racing game. This page is about generating 3D levels for the game, using OpenStreetMap data.

Preparations

information sign

This is not a one-click solution to get a full adventure track of your area. It still needs a lot of rework to get a realistic and fun to drive track. Besides that, there are still problems in the workflow as texture export.
  1. Enrich desired area with 3D tagging and micromapping in general. For example, tag trees using natural=tree
  2. Download OSM2World (SVN recommended) and practice using small OSM areas. Therefore, loading small parts (less than a district recommend) using JOSM and reopen the .OSM file with O2W
  3. Install Blender3D >2.65a and learn basic editing
  4. Install SuperTuxKart Modelling Addon for Blender from SVN

Export

  1. Use JOSM editor to download a certain area.
  2. Store this dump as .OSM file
  3. Open it with OSM2World (in Texture mode!) again and wait for processing finished
  4. Export to single .OBJ file
  5. Since Blender doesn't seem to export the textures correctly if they cannot be found, you have to copy all textures from OSM2World to the same folder as where you exported the .OBJ file

Game Editing

To understand how you model STK tracks with Blender in general, please read the Track Maker's Guide. This will add some menus to the scene and object panels.

  1. Fire up Blender 3D and enable the STK Addons in Preferences
  2. Import the .obj
  3. If you go to the Texture shading mode, you should see the textures appear in the scene

Basic settings

Open the Scene panel and move down to the SuperTuxKart Scene Properties group. Now:

  • Check the Is a SuperTuxKart track checkbox
  • Set a name/designer for your track
  • Set "Sky Type" to plain color and pick one

Driveline

At least the current version of STK crashes if you don't provide a valid driveline for the AI karts. To do this:

  1. Add Line (across the desired track) at the middle of the lap and at object panel - STK properties tag it as "checkline" and give it a name
  2. Create a closed single way of faces as described in https://supertuxkart.net/Making_Tracks
  3. Tag it in Panel - STK Properties as "Driveline (main)" and let it activate the first line you edited

Fixes

At scene panel, open the group SuperTuxKart Image Properties. There open all the Tree textures one after another, and set their "Compositing type" to "Alpha blend". Otherwise your trees will have some black outlines.

Testing

Save the Blender file and in the Scene panel choose Track Exporter -> Export. After a few seconds, the plugin should report a fine export.

Now you need to copy all generate files to your STK track directory. For me this is for example:

/usr/share/games/supertuxkart/tracks/test1/
graph.xml
materials.xml
mensa_stk.b3d
quafs.xml
scene.xml
track.xml

Next you need to copy all textures from OSM2World into the same directory. Now start STK and pick the new track for testing.

Case study Rostock

For Geoforum MV 2013 we micromapped a suburb of Rostock and created an 3D print from an certain area (university campus within the Südstadt district). Thus we used the processes, described above.

See also

Thanks for all the support of the STK community (esp. WillemS and Auria):