Difference between revisions of "Making Karts: Kart Attachments and Effects"

(Created page with "Karts can have a number of attachments to achieve special effects. This page describes how to add them to your kart. == Headlights == All new karts should have headlights of...")
 
(Finish headlights)
Line 13: Line 13:
 
Probably most karts will not need this special procedure. Provided that the headlights are attached to the kart and the kart does not have any special skeletal animations, the headlights will not become visibly "detached" from the kart. If, however, your kart uses special animations like Sara the Racer's bike, you will need this procedure. Most karts lean when turning via STK's built-in IPO animation which will automatically move headlights too, but for Sara the Racer, the motorbike has its own skeletal leaning animation in addition to this. Thus, if the headlight is not attached to the bike, it will become separated when turning and look ugly. The solution to this is to attach the headlight to a bone.
 
Probably most karts will not need this special procedure. Provided that the headlights are attached to the kart and the kart does not have any special skeletal animations, the headlights will not become visibly "detached" from the kart. If, however, your kart uses special animations like Sara the Racer's bike, you will need this procedure. Most karts lean when turning via STK's built-in IPO animation which will automatically move headlights too, but for Sara the Racer, the motorbike has its own skeletal leaning animation in addition to this. Thus, if the headlight is not attached to the bike, it will become separated when turning and look ugly. The solution to this is to attach the headlight to a bone.
  
Select the first headlight you would like to attach
+
<gallery mode=packed widths=400 heights=330>
 +
File:Sara_headlight_1.png
 +
File:Sara_headlight_2.png
 +
</gallery>
 +
 
 +
Select the first headlight you would like to attach, make it a a child object of the armature which it should follow, then go to the '''Object''' section of the Properties window, choose "Bone" for '''Parent Relation''' and select the bone it should follow immediately below, as shown in the screenshot above. Then, in the SuperTuxKart Object Properties panel, set the headlight object as a "Headlight" object type. You can also set the color of the light emitted.
 +
 
 +
=== If your headlights are static (non-moving) ===
 +
 
 +
If your headlights don't need to move besides normal tilting of the kart (which is handled by STK in code), it is much simpler to add headlights. All that's needed is to position the light cone where you want it and mark it as a headlight in the SuperTuxKart Object Properties panel. You can also choose a color of the light emitted.
 +
 
 +
== Santa Claus Hats & Easter Bunny Ears ==
 +
 
 +
TODO

Revision as of 01:47, 17 October 2017

Karts can have a number of attachments to achieve special effects. This page describes how to add them to your kart.

Headlights

All new karts should have headlights of some sort unless it absolutely makes no sense for your kart. This doesn't mean you have to use traditional headlights—Gnu, for example, bears antique oil lanterns instead of normal headlights, which wouldn't go well with a flying carpet.

For most karts, with the exception of Gnu, the headlights are integrated into the kart model and the object specifically marked as a headlight in Blender is actually a fake light cone, since SuperTuxKart does not support real cone lights.

To add headlights, you can copy the light cone from one of the other karts in the media repo and add it to your kart where you want it. Be sure to apply the any rotation and scaling you make in object mode with Ctrl+A. You can duplicate this mesh in object mode with Shift+D. The origin of the headlight (the small yellow dot) will be the location of the actual light on the kart. You can change the origin with Ctrl+Alt+Shift+C. From here, there are two courses of action depending on the design of your kart:

If your headlights are attached to the character or an animated kart

Probably most karts will not need this special procedure. Provided that the headlights are attached to the kart and the kart does not have any special skeletal animations, the headlights will not become visibly "detached" from the kart. If, however, your kart uses special animations like Sara the Racer's bike, you will need this procedure. Most karts lean when turning via STK's built-in IPO animation which will automatically move headlights too, but for Sara the Racer, the motorbike has its own skeletal leaning animation in addition to this. Thus, if the headlight is not attached to the bike, it will become separated when turning and look ugly. The solution to this is to attach the headlight to a bone.

Select the first headlight you would like to attach, make it a a child object of the armature which it should follow, then go to the Object section of the Properties window, choose "Bone" for Parent Relation and select the bone it should follow immediately below, as shown in the screenshot above. Then, in the SuperTuxKart Object Properties panel, set the headlight object as a "Headlight" object type. You can also set the color of the light emitted.

If your headlights are static (non-moving)

If your headlights don't need to move besides normal tilting of the kart (which is handled by STK in code), it is much simpler to add headlights. All that's needed is to position the light cone where you want it and mark it as a headlight in the SuperTuxKart Object Properties panel. You can also choose a color of the light emitted.

Santa Claus Hats & Easter Bunny Ears

TODO