Track exporter

Contents

edit

Track Exporter For Irrlicht Version

The new track exporter uses blender logic properties to specify certain attributes for objects, and ID properties to specify track-wide attributes. The logic properties can be found in the logic panel (F4). The ID properties menu is in the help menu (ID Property Browser).

Image:IdProperty.jpg

In this text the name 'property' will be used for logic properties, and ID property for ID properties.

edit

ID Properties for Tracks

version Version of the track. This can be used to make sure that the executable can already (or still) use this track.
groups, List of groups to which this track belongs.
description Description of the track, usually used to name the designer. This text is displayed in the track selection menu.
music The .music file to use for this track.
screenshot The name of the screenshot pictures to use. The screenshot is displayed in the track selection menu.
ambient-color Ambient light colour, either a "r g b" or "a r g b" value.
fog Set to non-zero to enable fog. If fog is enabled, the following properties will be used, too.
fog-color Either "r g b" or "a r g b" color values for the color of the fog.
fog-density Density of the fog.
fog-start Distance at which the fog starts.
fog-end Distance at which the fog ends.
edit

Main Track and Special Objects: The type Property

The type property is used to mark which objects are 'special', i.e. not part of the main track, and which are part of the main track. All objects that do not have the 'type' property defined to a value listed in this section will become part of the main track. All other objects will be exported as special objects or logic properties - e.g. animated objects or the start line of the race. See the following sub-sections for a full list.


edit

Objects to Ignore

If an object has the property 'type' set to ignore, it will not be exported at all. This can be used to keep certain objects as a template in the blender model for further work, without having them exported into the SuperTuxKart track.

edit

Items

Itema are created by adding an 'empty' (add->mesh->empty) structure in blender, and giving it a type property value of banana, item, nitro-small, or nitro-big. While the objects will not be displayed in blender, they will be exported correctly for SuperTuxKart.

edit

Water

Note: Due to an irrlicht bug currently a water node will cause a crash. This bug has already been fixed in irrlicht SVN and will work in the next release. But for now do not use this node - just export water nodes as part of the track.

An object with the type property set to water will be exported as a special water node. The node will be animated in SuperTuxKart. Certain additional properties will be added later on allowing you to specify parameters like wave height and length.

edit

Drivelines

All objects having the type 'maindriveline' or 'driveline' will be exported as drivelines. Drivelines are currently used to specify where to drive for the AI, and to draw the minimap which is displayed in the lower left corner of the race GUI. Full details about the new driveline system are on the separate new drivelines page.

edit

Animations

Objects can be animated using blender's IPO feature. These objects must have the 'type' value set to animation. All IPOs modifying the position (LOC-XYZ) and orientation of the object (ROT-XYZ) will be exporter to SuperTuxKart, and replayed in game. The object can have the additional property name set to the filename to use for the exported animated object (.b3d will be appended to this value). If this is not specified, the blender name is used. Note that the fps value is taken from the blender settings.

edit

Object

If an objects has the type property set to object the object will be exported as a separate b3d model, and loaded at the same location in SuperTuxKart. These objects take a 2nd property: name to specify the file name to use for the exported b3d model (.b3d will be appended to the name).

There are two reasons to export objects separately instead of as part of the main track:

edit

Physical or Movable Objects

A physical object is an object in the scene that can be affected by the player, i.e. pushed around (or push the kart around). The object will be approximated by a simple shape. Declare these blender objects to have type 'movable'. Additional properties:

edit

Animated Textures

Any objects that are part of the main track (i.e. no other special object listed here except objects of type object, see above) can mark one texture to be animated. The object must define the name of the texture in the property anim-texture, and should set the speed of movement by setting anim-dx and/or anim-dy. See the following example:

Image:AnimTexture.png

edit

Checks

SuperTuxkart is using 'check structures' for couting laps, and triggering events. At the moment two different structures are supported:

Check structures can be activated or deactivated, which applies to each kart individually (i.e. the same structure can be activated for some karts, and deactivated for others). When an activated structure is triggered (i.e. an activated check line is crossed), the structure becomes deactivated (for the kart that just triggered it). As one effect of triggering a check structure they can activate other check structures. As an example: Each track has to have one check structure used to count laps. But since the lap counting line will be deactivated, the player can not easily cheat by driving little circles crossing the lap line over and over again, since the line is then deactivated. So each track needs at least one more check structure elsewhere, which re-activates the new lap line. So the designer has so find (at least) one place in the track which needs to be crossed by a kart in order to have considered really driving on the track. You can also define a chain of check lines: check line 1 activates check line 2, which activates check line 3, which activates the new lap line (which re-activates the first check line). So karts have to cross the check lines in the right order in order to get a lap counted. Note that this system is meant to prevent cheating, i.e. bypassing a significant amount of the track, not to prevent shortcuts. If you want to prevent shortcuts, you either have to model the track appropriately (by putting objects, water, bananas, ...to prevent a kart from using the shortcut), or setting the physics parameters (i.e. making the terrain to cause a slow down of the kart so that it's not worth using this shortcut).

edit

Sun

One light can be defined for STK in blender (if you have more light, just set the 'ignore' type property in the other lights). The light position is exported as sun position for STK. The following additional properties are used:

Property name Value
color A "r g b" or "a r g b" color value for the light of the sun.
specular The specular color of the sun.
diffuse The diffuse color for the sun.
edit

Summary of Properties

Property Description
typeignore Do not export this object.
typebanana Create a banana at this place (use for an empty object).
typeitem Create an item at this place (use for an empty object).
typenitro-small Create a small nitro container at this place (use for an empty object).
typenitro-big Create a big nitro container at this place (use for an empty object).
typewater Export as special irrlicht water node (not working at this stage due to irrlicht bugs).
typemaindriveline Export mesh as main driveline.
typedriveline Export mesh as driveline.
typeanimation An object that is animated using IPOs.
name Specifies the name to use for the exported b3d file.
typeobject Export object as separate b3d file.
name Specifies the name to use for the exported b3d file.
typemovable Export object as separate b3d file and make it movable in stk.
name Specifies the name to use for the exported b3d file.
shape Shape of the object. Must be 'cone', 'box', or 'sphere'.
mass Mass of the object.
ambient-color a r g b Specifies the ambient colour to used
anim-textureTexture name Name of the texture to animate.
anim-dx Animation speed in X direction.
anim-dy Animation speed in Y direction.
typelapA check line that will trigger a new lap to be counted.
typecheckA general check structure
activate Name of the blender object of a check structure to activate.
toggle Name of the blender object of a check structure to toggle (from active to inactive and vice versa).
inner-radius For check-spheres only: Inner radius for maximum new ambient light.
color For check-spheres only: New ambient light color.
Retrieved from "http://supertuxkart.sourceforge.net/Track_exporter"

User Tools