Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Animation Aspect

From Qt Wiki
Revision as of 15:53, 16 January 2017 by Sean Harmer (talk | contribs) (Created page with "<big>Animation Aspect</big> '''Goals: Support as much animation computation in the backend as is reasonable''' * Frontend ** Configuration and control of animation clips **...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Animation Aspect

Goals: Support as much animation computation in the backend as is reasonable

  • Frontend
    • Configuration and control of animation clips
    • Animation Action State Machine (ASM) - see Level 3 below
  • Backend
    • Number crunching (keyframe interpolation) - see Level 1 below
    • Animation blend tree evaluation - see level 2 below

Issues

  • There is a problem with QTransform(and perhaps some others)
    • The animated scale, rotation, translation must be sent back from backend to frontend every frame wasting time and effort
      • Many times the values are not needed in the frontend
    • Solution 1, don’t animate transform or any other property, which is mirrored in frontend
      • - Not flexible at all, no reflection from animations to the user
    • Solution 2, take the hit, efficiency is the same as animating in frontend(minus optimized interpolation)
      • - Complex animations cause unnececcary work.
      • + Animation fully reflected to the user
    • Solution 3, optimize frontend-backend communication
      • ???
    • Solution 4, make such property's updates from the backend to frontend opt-in.
      • Only send property notifications when animations start/end by default
      • Add support to QNode for frontend to opt-in to property updates issued by the backend

Animation Framework Levels:

The following needs to be supported by any decent animation system these days:

  • Level 1: F-curve evaluation
  • Level 2: Animation Blend Trees
  • Level 3: Action State Machine + Animator component

Level 1 is pretty much what you would expect to find in an older animation system and maps well to what Antti has developed on gerrit. However, as good as this is it leaves a lot of work in the hands of the user. This is where Levels 2 and 3 come in.

Level 2 allows the user to specify blend trees for combining several animation clips together. Classic example is blending the clip for a walk cycle with the clip for a run cycle where the blend factor is controlled by a binding to the characters speed. The blend tree forms an AST that is evaluated by the animation aspect backend after the data form level 1 is evaluated.

Level 3 ...