Skip to content

Skeletal animation #4

@Sigmarik

Description

@Sigmarik

The ability to import, play, blend and modify skeletal animations.

The feature is rather massive and could require a separate subsystem to manage animations.

Animation behaviour classes for individual pose management would probably do the trick, but the classic approach of interpolation spaces is also worth considering.

Animation behaviour draft:

struct AbstractAnimator {
    virtual ~AbstractAnimator() = default;

    virtual void solve(Pose& pose) const = 0;
};

struct LinearPlayback : public AbstractAnimator {
    void solve(Pose& pose) const override;

    void set_animation(const Animation& animation);
    void set_playback_time(double time);

    . . .
};

<template class Dot = glm::vec2>
struct BlendSpace : public AbstractAnimator {
    void solve(Pose& pose) const override;

    void set_playback_time(double time);
    void set_blend_position(const Dot& position);
    void add_animation(const Animation& animation, const Dot& position);

    . . .
};

struct InverseKinematicsSolver : public AbstractAnimator {
    void solve(Pose& pose) const override;

    void set_target(const glm::vec3& target);
    void set_root(const Armature::BoneId& root_id);

    . . .
};

Metadata

Metadata

Assignees

Labels

featureFeature requestgraphicsRelated to the graphics engine

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions