From ae401b28fad51b8b3d35c4a0e0e709af098c2114 Mon Sep 17 00:00:00 2001 From: guillaumeblanc Date: Wed, 22 May 2024 13:11:26 +0200 Subject: [PATCH] Documents sample --- samples/motion_blend/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/samples/motion_blend/README.md b/samples/motion_blend/README.md index 56f2081ce..3567860f2 100644 --- a/samples/motion_blend/README.md +++ b/samples/motion_blend/README.md @@ -2,9 +2,19 @@ ## Description +Motion blending extends the concept of animation blending to root motion. It blends the motion resulting from the motion extraction process, in addition to blending animations. + ## Concept +This sample is built on top of the animation blending sample. It blends three animations (walk, jog and run) and their corresponding root motions according to a single "speed" coefficient. + +It uses animation and motion tracks converted using *2ozz tools, relying itself on `ozz::animation::offline::MotionExtractor`. It uses animation.tracks.motion settings as described in the reference configuration. See motion playback sample for more details. + + + +At runtime, the position and rotation are sampled from the motion tracks each frame. They are accumulated to move the character transform (by delta motion each frame), allowing to continue moving when the animation loops. +The sample uses `ozz::sample::MotionAccumulator` and `ozz::sample::MotionSampler` utilities to help with the complexity of managing loops. + ## Sample usage ## Implementation -