Legacy:Separate or Animated Objects

If a blender objects has the type property set to object the object will be exported as a separate b3d model, and loaded in SuperTuxKart, a so called track object.


There are a few reasons for creating track objects:

  • You want to animate an object - either using IPOs to change the location/orientation of an object, and/or a skeletal animation to change the shape of the object. Skeletal animations will be part of the b3d model that is exported, IPOs modifying the position (LOC-XYZ), orientation (ROT-XYZ) and scale of the object will be exported to SuperTuxKart, and replayed in game. So for example if you want to have someone walking, you would need a skeletal animation for moving the limbs, and a matching IPO based animation to change the location and orientation of this object.
  • You want an object to be movable around by the player
  • The same objects are used very often in the track (e.g. a tree to create a forest). Make sure that each of those objects has the additional name property defined, and all have the same name (this way only one file is exported).
  • They have transparent elements. In the 3D world, transparent elements must be rendered sorted from farther object to closest object, otherwise the compositing is incorrect. If a transparent item is "glued" to the rest of the track, irrlicht cannot sort it individually. Therefore, for transparent items, using separate objects makes it possible to properly sort them.
  • They are used in a library node
  • They use a per object effect like
    • Glow outline: will add an outline around the object. Should be reserved for object that might be interactive like a checkpoint or a goal. For instance items use it.
    • Refraction/reflection: Everything under the object will look distorted. Useful for a water material.

All track objects allow you to specify the file name to use when exporting them separately by setting the name property (.b3d will be appended to the name).

If the name property is not set, the blender object name will be used for the filename.

If an object has an armature and you want to move this object around the track, set type object on the mesh, and no special type on the armature; then you can move the armature around in Object mode and add keyframes

When preparing the mesh and armature make sure they both have a rotation of (0,0,0) to avoid problems (after the rigging is done, though, you can move the object around. Just make sure the "rest position" of both of them is non-rotated). We're working on resolving these issues but for now please bear with limitations of the exporter.

If you need to fix an already rigged model, it's not too late, you can do the following : reset the rotation on the armature to (0,0,0), unparent the mesh from the armature (select Keep transformation), invoke apply rotation on the mesh, reparent the mesh and armature. Then you can rotate the armature again

At this time, a mesh and its armature need to have their centers at the same point

Track objects can have different physical properties, which also affects what kind of animations can be used for them. The physical properties are set using the 'interaction' property - it defines how a kart and this object will interact with each other :

Ghost (no interaction)

There is no interaction between the track object and a kart. The kart can drive straight through the track object, and is not affected at all, neither is the track object. So the object is a kind of ghost.

Those objects can be animated with an IPO and/or a skeletal animation.

This is useful for 'eye candy' where the karts can't drive (e.g. a plane in the sky, or rotating wings of a wind turbine, or a house outside of the track; to create a secret and well hidden entrance to a different part of the track; for plants that are not supposed to stop a kart, ...). The advantage is that these objects do not increase the work for the physics, since they don't exist for the physics.

Static interaction

With IPO animation

These objects can not be moved by the kart, karts will just 'run into a wall'. The objects can also have a skeletal animation. Example for this kind of object would be animals, trains, ... crossing the track (IPO and perhaps skeletal animated), or eye candy into which the karts can potentially run into. This kind of object must have a shape defined (property shape), which must be one of 'box', 'sphere', 'cone{X,Y,Z}' or 'cylinder{X,Y,Z} (one of X,Y,Z defining the orientation of the cone or cylinder) at the moment. This is the shape our physics engine will use to simulate the object in the physics.

Other (simple) shapes can be added on request, but the important point is that objects in the physics world must be simple, it would be too slow to (e.g.) simulate all triangles of a tree. Instead the shape will be approximated by e.g. a cone.

Without IPO animation

Similar to the track objects mentioned above karts will be stopped when they hit this kind of object. No skeletal animations are supported for this objects at this time. Examples would be road blocks used for different versions of the same track, or trees (if it should be faster not to include them in the main track).

Move interaction

This interaction indicates that the object can be moved by the kart - it can be pushed around, and might be affected by explosions etc. Examples would be road cones, road blocks (that can be moved aside). These objects must have a shape defined (see static objects with IPO above), and should define the 'mass' property (in kilograms; the default mass of a kart is 225 kg). These objects can also have skeletal animations, but might not have an IPO animation.