-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: add skeleton animation & vertex aimation #286
Conversation
9b1dc9d
to
0831660
Compare
1629b74
to
5ff12bf
Compare
} | ||
|
||
var animator IAnimator | ||
if config.Type == ANIMATOR_TYPE_VERTEX { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will there be a "frame animator" in the future? That is to say, will we implement frame-animation with concept Animator
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now, we will not expose this concept to the users, they will not be aware of this implementation detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The users will notice that there's animator
(with type: skeletal | vertex
) in sprite config to support skeletal or vertex animations.
In the long term, is it in plan to move config of frame-animations to some "animator file", just like skeletal & vertex animation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the long term, is it in plan to move config of frame-animations to some "animator file", just like skeletal & vertex animation?
Yes, as discussed in the voice conference.
type AnimatorConfig struct { | ||
Name string `json:"name"` | ||
Type string `json:"type"` | ||
DefaultClip string `json:"defaultClip"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does defaultClip
play the role just like sprite.defaultAnimation
plays in frame-animation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And is there any alternative to animBindings
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the priority of sprite.defaultAnimation is higher than animator.defaultClip. Currently, this animation system is still in the experimental stage and is not intended to be made available to users. This PR is to support the development of Builder, which depends on skeletal animations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, this animation system is still in the experimental stage and is not intended to be made available to users. This PR is to support the development of Builder, which depends on skeletal animations.
Sure.
As there's no sample projects in this PR now, I'm not sure:
- Is it supported for one sprite to contain both some frame-animations and some skeletal-animations?
- How are we supposed do animation binding with skeletal-animations? For example, bind clip "dying" to behavior
die
? Do we useanimBindings: { die: "dying" }
in sprite config just like frame-animations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project file
06-Skeleton.zip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, this animation system is still in the experimental stage and is not intended to be made available to users. This PR is to support the development of Builder, which depends on skeletal animations.
Sure.
As there's no sample projects in this PR now, I'm not sure:
- Is it supported for one sprite to contain both some frame-animations and some skeletal-animations?
- How are we supposed do animation binding with skeletal-animations? For example, bind clip "dying" to behavior
die
? Do we useanimBindings: { die: "dying" }
in sprite config just like frame-animations?
@nighca
The skeletal animation at the current stage is not intended to be open to users, but is designed to facilitate the development of the "Training camp". If it becomes available in the future, we will add a frame Animator to ensure that skeleton animation is consistent with frame animation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in the voice conference, this PR is not intended for merging into the main
branch, as its APIs are not yet stable.
Similar to the trailhead_asset
branch of the builder, the "Training Camp" development will maintain dependencies on a standalone branch of spx.
4aa0b6d
to
29c2ce3
Compare
1: add vector3 2: add matrix4 (temp code for serialize) 3: add sprite prefab 4: add sprite skeleton 5: rename this => pself to remove compiler warning 6: add skeleton tutorial demo 7: skeleton animation: cpu skinning 8: draw mesh 9: render skin mesh with texture (add uv info && render order) 10: add sprite animator 11: integrating the skeletal animation system into SPX 12: move animator to anim dir 13: update animator path 14: add vertex animator 15: unify the JSON configuration to be in littleCamelCase format 16: remove useless property 17: add frame animator type 18: add time class 19: integrate the animator into SPX 20: If the animation fails to play, try playing the skeletal animation. 21: Move the animator, animation, avatar directories to the top-level directory, these files can be shared among different sprites 22: Set the animation directory as a subdirectory of sprite 23: Export Animator interface to builder
81ac242
to
8e32c02
Compare
project file
06-Skeleton.zip
config file : "assets/sprites/Tom/index.json"
skeleton animation
vertex animation