Suggested Animation assets (Animated properties sets)

Florian

Active Member
Contributor
Architecture
*Current situation*
Currently terasology has md5 animation assets that can be used to animate the location and rotation of skeltal mesh bones.

Skeletal mesh animations also always effect all bones, it is not possible to have 2 animations animate the same skeltal mesh. The MD5 animations have always keyframes for all frames, which makes some animations take unnecessary space.

It is not possible to animate the scale of bones, which is a useful thing to animate when you use meshes in spell like effects.

It is also not possible to animate propeties of particle systems. It is for example not possible to animate the spawn rate of particle systems.

*Suggested target situation*

Aspect 1.) A new asset type gets introduced that represents an animation. The animation stores a map from a property identifier to an animation curve for that property.

Aspect 2.) For serialization I would suggest we use our own protobuf based format, as animation data can be come quite a lot (usually more than vertex data or textures). This makes it possible to generate not just java classes for deserialization, but also python code for Blender so that it is easy to write an exporter.

Aspect 3.) The attribute identifier has 3 parts: bone name, component module name component name and attribute name. The specified property will be animated when the animation gets played.

Aspect 4.) skeletal mesh component gets a map attribute from bone name to prefab. The specified prefab gets used to construct the bone and may have for example a particle system in addition to the usual components like location.

Aspect 5.) The animation asset has also a name and play chance attribute. Variations of animations can be added by simply giving new animation assets the same animation name.

Aspect 6.) The animation curves could be created with Blender. It is possible to make custom attributes in Blender and it is also possible to animate them.

Currently I don't have the time to implement such a thing, but I think it would be great addition for terasology as it would make it possible to create really advanced effects and animations.
 
Last edited:

Immortius

Lead Software Architect
Contributor
Architecture
GUI
*Current situation*
Skeletal mesh animations also always effect all bones, it is not possible to have 2 animations animate the same skeltal mesh. The MD5 animations have always keyframes for all frames, which makes some animations take unnecessary space.
This is certainly true for the current implementation, but technically not in general. You can implement it so that you restrict which bones an animation affects, to play different animations on different bones (e.g. walk on legs hierarchy, attack on torso hierarchy), or combine animations in a weighted manner (50% walk, 50% run) although I don't know how well that works in practice

Aspect 1.) A new asset type gets introduced that represents an animation. The animation stores a map from a property identifier to an animation curve for that property.

Aspect 2.) For serialization I would suggest we use our own protobuf based format, as animation data can be come quite a lot (usually more than vertex data or textures). This makes it possible to generate not just java classes for deserialization, but also python code for Blender so that it is easy to write an exporter.

Aspect 3.) The point identifier has 5 parts: bone name, component module name component name attribute name, index. The specified property will be animated when the animation gets played.

Aspect 4.) skeletal mesh component gets a map attribute from bone name to prefab. The specified prefab gets used to construct the bone and may have for example a particle system in addition to the usual components like location.

Aspect 5.) The animation asset has also a name and play chance attribute. Variations of animations can be added by simply giving new animation assets the same animation name.

Aspect 6.) The animation curves could be created with Blender. It is possible to make custom attributes in Blender and it is also possible to animate them.

Currently I don't have the time to implement such a thing, but I think it would be great addition for terasology as it would make it possible to create really advanced effects and animations.
This looks like a sensible approach to me. It isn't incompatible with MD5 animations, but allows for additional uses. I would suggest you could take bones out of it and instead target... named sub-entities in an entity hierarchy, although this would require some fiddling with the current components.
 
Last edited:
Top