Exporting creature animations from Blender - emd4600/SporeModder-FX GitHub Wiki

In this tutorial, we'll show you how to create new animations for Spore. Animations are the different movements that creature can do. The animations will be created in Blender, and you will need to install the SporeModder Blender Addons.

Spore animations use skeletal animation (also known as rigging), but it doesn't work like you usually see it. Animating in Spore is more complex because you don't know the skeleton beforehand: you don't know how many hands your creature will have, or where the mouth will be,... . For this reason, when you animate in Spore, you only use certain bones and then apply special properties (as we will see in this tutorial) to generalize the animation for all creatures.

Here you have an example of an animation exported for Spore: a fortnite dance. In Blender, it has many bones, but you will see only a few of them are exported to Spore. https://mega.nz/file/ydEWlDbC#aJR_4BLyaJ_rztC2s5M2bzeQCmf7QBWK8AaPam1wMp4

To be able to use the animations you export, you must add a tlsa file in your mod and add entries for your animations. See this tutorial: how to use Spore animations

Once you have configurated the animation in Blender, you can export it by clicking on the menu File > Export > Spore Animation (.anim_t):

Introduction: basic concepts

  • Spore uses meters as its units. A creature is roughly 1 or 2 meters tall. When you create an animation, you must keep this in mind and try to scale the armature in Blender so that it's a similar height (for reference, the default cube is 2 meters tall).

  • The front direction of the creature (where the creature is "looking to" by default) is the -Y axis; this means +X is the left, -X the right, +Y the back. In Blender there's a small axes diagram to know where your camera is looking at:

Here the X arrow is pointing to the left side of the creature and Y towards the back of the creature.

  • In Spore animations, one second is 30 frames. This is different from rw4 part animations (where it is 24 frames), so be aware.

  • A creature is composed of bodies, which are the different parts, limbs and spines of the creature. A body is the smallest unit that can be animated: an animation is just a list of bodies and how they should move. You can see the bodies of a creature using the blocksmode cheat (each block is a body):

  • A channel is the equivalent to a bone in Blender, but here a channel represents one or more bodies (or sometimes none). The bodies a channel represents are selected depending on certain criterias established by you: select all the left hands, select all the eyes, select the spine closest to the mouth,...

So to export an animation from Blender to Spore, you will choose bones from the skeleton and assign them a channel. If you have a complex animation, such as the example provided, you will see that only a few bones have channels defined (the rest are just ignored).

Creating channels

To add a new channel:

  1. Select the armature object and go to Edit Mode (by pressing the Tab key)
  2. Select the bone you want to add as a channel.
  3. In the Properties panel (usually on the right side of the screen), go to the armatures tab:
  4. Scroll down until you find the Spore Animations panel. There, click on Add Channel:

You will see the bone is added to the list, and a few subpanels appear:

Primary

Defines which bodies will be moved by this channel. This is done by applying certain filters. More than one filter can be used: when that is the case only bodies that match all the filters will be selected.

  • Capability Type: decides which type of bodies are chosen: the main ones are grasper (hands), foot, mouth, eye, root (the spine that is closest to the center of the creature), and creature frame (moves the whole creature).

  • Left/Right (X): If used, only the bodies on a certain side of the creature will be selected. Setting it to Left will only select those bodies that are in the left half side of the creature (i.e. those with positive X), similar with Right and Center. There are also options Local Left, Local Right and Local Center: here, it first finds all the bodies of the specified capability, and then it only selects those at the left half side of the space comprised by only those bodies. Front/Back (Y) and Top/Bottom (Z) work similarly.

  • Extent: Can be used to select only one of the bodies that are valid so far. This will be the left-most body, the top-most body, ...

  • Limb Modifier: If used, this will select a spine/limb body and not the part itself. Most of its values are unknown, but for example combining capability Mouth with limb modifier Closest Spine will choose the spine body that is closest to the mouth.

Secondary

Sometimes, you need the movement to be relative to another object: move the hand towards the mouth, grab a stick, punch another creature in the eye,... How this is used is still a bit unknown and the results may not look as expected

Movement

This subpanel defines how the movement is translated into creatures. This is important to ensure that the animation looks good on different creatures.

  • Scale Mode: Can be used to scale the movements (make the larger/smaller) depending on the size of the creature. If you use this, you will usually set it to Creature Scale, which makes the movements proportional to the dimensions of the creature (large creatures get large movements, small creatures get small movements; consider that the movement you do in Blender is for a creature of size 1). The other value, Limb Length, will scale the movements depending on the distance from the body to the closest spine (which is approximately the length of the limb, if the body is on a limb).

  • Relative Position: Makes the translation movements (that is, changes of position) be relative to the rest pose. If it is unchecked, the movement will be absolute. That is: if checked, movements are like "move 1 unit to the left"; if not checked, movements are like "move to the (1, 0, 0) position", which is the same for all creatures.

  • Relative Rotation: Similar to the position, but this is for changes of rotation.

  • Ground Relative: This can only be used in relative position mode. This will make movements in the vertical (Z) axis be relative to the ground (which in Blender is Z=0, but in Spore depends on the shape of the ground). For example, you want to use this if you want to touch the ground with the hand, since the hand might be at different heights for different creatures.

  • Secondary Directional Only: Only if Secondary is used. If checked, the direction of the movement changes (to be relative to the secondary bodies), but the scaling of the movement will not.

  • Rotation Relative to Secondary: Only if Secondary is used. Aims the rotation towards the secondary object, so that it looks at it.

Extra

The options here aren't very relevant or known, so most of the time you can ignore them

Rigblock Deforms

Certain parts, such as mouths or hands, have special animations, called deforms: open/close the mouth, show scared eyes,... These animations are modified here. They are only available for certain capability types, and they are different for each one (hands have some animations, mouths have others,...)

For every deform there are two possible values, that go from 0.0 to 1.0:

  • Value: The "progress" of the deform animation. This changes from deform to deform: for mouths' ClsdOpen, 0.0 is the mouth completely closed and 1.0 is completely open; for hands' Point, 1.0 is pointing with the finger,...
  • Weight: How much the deform is applied; 0.0 means it is not applied at all. This is useful since there can be more than one deform at the same time.

These two values can be animated over time. You can keyframe them by hovering with the mouse and then pressing the I key (you will see it becomes yellow). Doing this at different times of the animation will make them change over time.


Animation Events

Animations can also trigger multiple events: sounds, effects,... An event is associated with a channel (where it is spawned) and a moment in time (when it is spawned). For example: at the keyframe 30, spawn an effect in the left hand.

To add a new event:

  1. In the timeline, move to the keyframe when you want to spawn the effect (you can change it later too)
  2. Select the armature object and go to Edit Mode (by pressing the Tab key)
  3. Select the bone that will spawn the event. The bone must have a channel associated (you can change it later too)
  4. In the Properties panel (usually on the right side of the screen), go to the armatures tab:
  5. Scroll down until you find the Spore Animation Events panel. There, click on Add Event:

A lot of properties will appear once you select an event.

  • Name is very important, as it is the name of the sound or effect file that will be played (not all effect types require a name though).

  • Channel is the channel that will spawn the event,

  • Play Frame the moment at which it will be spawned; keep in mind that sounds and effects keep playing depending on how long the audio or the effect is.

  • Type is also very important, as it defines which kind of event is used. Certain event types will show extra parameters that can be configured. The main types are:

    • Sound
    • Effect
    • Footstep: plays the footstep effect and sound, which depends on the type of ground. With this one, the name doesn't matter.
    • Event Control: notifies the game of certain things that must happen (for example, when to "hit" the creature,...)
    • Stop: Stops another event that is being played. The name doesn't matter; it will stop all events that have the same Event Group
    • Game Message: Sends a game message that can be listened with the ModAPI SDK, allowing you to execute code. The message data is received as a https://emd4600.github.io/Spore-ModAPI/struct_anim_1_1_animation_message.html
  • Probability: If it's not 1.0, the event will be spawned randomly (sometimes yes, sometimes no) with the given probability.

  • Archetype: If it's not 'None', then the event will only be played if the creature has a certain type (which sometimes it's the archetype, sometimes it's something else). This can be used to make different sounds or effects for different archetypes.

Events have something called sources, which is where they are emitted from. By default, their source is the associated channel, which means that the event will be spawned one time for each body in the channel. For example, if the channel is "all hands" and your creature has two hands, two effects will be spawned. Position Source, Rotation Source, Scale Source allow you to change what position/rotation/scale the effects use.


Creating variations

Sometimes it's hard to make a single animation that fits all creatures. To fix this, Spore allows you to specifiy multiple animation files in a single TLSA, and let you specialize each one of them for certain creatures; for example, one animation for creatures with hands and another for creatures without.

Basically, Spore will check every animation in the TLSA entry in order; if certain conditions aren't met, it will discard it and go to the next animation. The possible conditions are:

  • General requirements: You can enable them in the Animation Events panel. There are three conditions:

  • Channel requirements: You can make an animation require a specific channel. If the creature doesn't have any body that is selected by the channel (for example, the creature doesn't have mouths), then it will be discarded. You can do this in the channel properties, checking the option Require.