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: Difference between revisions
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 **...") |
Sean Harmer (talk | contribs) (Added description of high level ASM) |
||
Line 37: | Line 37: | ||
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 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 ... | Level 3 provides high-level control over the animations and switching between them. This takes the form of the Action State Machine. Each state in the SM contains the root of a blend tree from level 2. When that state is active, the corresponding blend tree gets evaluated by the backend. When transitioning from one state to another, the backend can evaluate the transition by using an additional lerp node at the root of a blend tree where the children are the blend trees of the source and destination states respectively. |
Latest revision as of 15:37, 17 January 2017
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
- The animated scale, rotation, translation must be sent back from backend to frontend every frame wasting time and effort
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 provides high-level control over the animations and switching between them. This takes the form of the Action State Machine. Each state in the SM contains the root of a blend tree from level 2. When that state is active, the corresponding blend tree gets evaluated by the backend. When transitioning from one state to another, the backend can evaluate the transition by using an additional lerp node at the root of a blend tree where the children are the blend trees of the source and destination states respectively.