Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeletal animation #4

Open
Sigmarik opened this issue Feb 27, 2024 · 0 comments
Open

Skeletal animation #4

Sigmarik opened this issue Feb 27, 2024 · 0 comments
Assignees
Labels
feature Feature request graphics Related to the graphics engine

Comments

@Sigmarik
Copy link
Owner

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);

    . . .
};
@Sigmarik Sigmarik added graphics Related to the graphics engine feature Feature request labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request graphics Related to the graphics engine
Projects
None yet
Development

No branches or pull requests

2 participants