-
Notifications
You must be signed in to change notification settings - Fork 27
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
Separate Armature from Animation #137
Comments
Refer to the glTF overview Armature (Skelet) is refered to as Skin, and Animation are the keyframes. |
We should probably add a |
We need to think about the animation keyframe data layout in memory due to #97 |
CFinalBoneHierarchy has a circular dependency on ICPUSkinnedMesh mostly due to joint and keyframe struct definitions. |
Armatures need bones with global UUIDs and keyframes can be separate per-bone. template<class BufferType>
class IAnimationKeyframes
{
public:
struct alignas(4) AnimationData
{
uint32_t keyframeCount;
uint32_t reserved; // the `keyframe.offset` should be here in the IGPUAnimationKeyframes
float timestamps[1]; // actually an unbounded array
};
struct alignas(4) Keyframe
{
uint16_t rotation[3]; // in EF_R16G16B16_SNORM (yes I know format does not exist)
uint16_t scale[3]; // in EF_R16G16B16_SFLOAT (yes I know format does not exist)
float translation[3];
};
private:
SBufferOffset<BufferType> animationdata;
SBufferOffset<BufferType> keyframes;
};
class ICPUAnimationKeyframes : public IAnimationKeyframes<ICPUBuffer>
{
};
class IGPUAnimationKeyframes : public asset::IAnimationKeyframes<IGPUBuffer>
{
}; Then The |
Figured out how to do it and allow for blends |
CFinalBoneHierarchy right now unifies two aspects of skinned animation which can be quite orthogonal to each other, the armature and the animation keyframes.
It would be good to split CFinalBoneHierarchy into asset::IArmature and asset::IAnimationKeyframes, naturally the keyframes would need to refer to an armature (same keyframes don't make sense with different armature).
The text was updated successfully, but these errors were encountered: