[Soc 2009 submitted -Add Animation blender & IK together]
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
[Soc 2009 submitted -Add Animation blender & IK together]
Latest updated April 14, improved example for animBlend.This example hasn't rolling artifact as I modified BlendMask's translation and rotation chosing schema, so OgreMain.dll is different.
April 11, new additional details and more plan A&B consideration.
Maybe this project about animation seems very ambitious, for example, IK had been tried several times and AnimationTree and BlendTree are always in
demanding list. Here I want to clear all these doubt and considerations.
First and most important, I have cognized my communication issue, and am trying to overcome it totally.
Second, I think already existing stuff on animation in Ogre is enough to give it well workable solution for users.
Third, my proposal's framework is extensible for further specific extensions, other developers can add new BlendNode with more powerful blending algorithm,
add new IK algorithm and behavioral API, add PATH-finding using motion graph etc.
Btw, some lessons learnt from @jarek108 he is the gsoc 2007 student who dealt with animation. He actually planned too much and always designing
the gameplay and then he hadn't enough time to focus on his real work. I chose the agile developing style, I will go through my project by examples progressively.
April 8, a workable example of AnimNodeBlendPerBone .
User can control the weight interactively between 0. and 1. to "Run" or "Walk" animatiom of jaiqua.
video is here
http://www.youtube.com/watch?v=q1G1LGwsr60
the code is in the attachment
just copy them to the skeletalAnimation example include and src folder, and add the files to the SkeletalAnimation project.
Press key "I" and "O" to increase and decrease the weight for "Run" and "Walk" animation.
Abstract:
This project is aiming to create BlendTree class for animation blending: TecnoFreak(http://www.ogre3d.org/forums/viewtopic.php?t=45260) provides code and he can help a lot. And then IK support will be added as blending skeletion animation with procedural animation: noche's IK with Ogre(http://www.ogre3d.org/forums/viewtopic.php?f=4&t=35712) is a great work and it is a patch for Ogre, I should have to change its interface for blendNode( component of BlendTree).Maybe it seems to be an assembling work so far, but there are some problem beyonds them.
Proposal detail:
There are three basic tasks and two further ones.
• Blending by posture only works well for similar ones, so good blending postures must be selected first , my motion graph metric function (posture distance calcuation can do this),see my tutorial of animation http://www.ogre3d.org/forums/viewtopic. ... 17#p336616
• Weights must be assigned carefully for Blending multiple animation in BlendTree to each animation or even each bone, this really effect the result animation's reliability.
• Connecting successive animations must concern timing, for example, transition or blending run to/and walk animation must match the foor step because the speed of each animation is not the same.
• IK is only applied to arm/leg's end part and only when there are environment interaction, otherwise IK's opps will show totally over skeletal animation
• Motion graph can be used as long as some SceneManager problems be solved.
Schedule
The main classes need to be added for AnimBlending.
(click for full size)
Task 1 Blend without timing(already completed)
April 20 -- April 26
The fundamental class for animation blender and for further extension to IK controller.
AnimNode class: this class is the original class which can handle Animation, that is to hold animationTrack , TickAnimation and GetPosture, though the way varies according to different AnimBlendNodes.
AnimNodeBlendBase class: the basic animNode that can blend different animation channel, one animation channel means an result blendBuffer output from one child of this BlendNode.
AnimNodeBlendperbone: a hierarchical blend algorithm go through a skeleton's bones.
You can reference to attachment for code detail.
Task 2 Blend with timing
While blendperBone(there may be blendmask, each bone has specific weight and effect) or by posture is blending animationTrack in space at exactly the same time,
BlendCrossFader, BlendBySpeed, BlendDirectional and BlendKeyFrames are concerned about timing seriously.
Basic method:
BlendTree can blend two different animations with different time duration, no time wrapping is carried on, for we don’t want to change any time stepping in each animations. This is done as follows: assume animation1 has keyframes k10(t0),k11(t1) ,k12(t3) animation2 has keyframes k21(t2) k22(t4), t1,t2,t3,t4 is timestamp, and t0 < t1< t2 <t3 <t4, we first create a new dummy animation ---- animation3, which will be the blended animation for final use. At t1, there is only k11 in animation1, we need the corresponding keyframe in animation2, so called k21’, we use dual quaternion linear to create the k21’ = DLB(t1; k20,k21), k31 = DLB(w;k11,k21’), w is the weight between animation1 and animation2.
April 27 – May 20
BlendCrossFader: This is used when transition occurs, the most event in MotionGraph synthesis.Blenders can benefit from contact information and posture similarity table calculated from MotionGraph.
The most difficult issues are: Choosing which timestamps in successive animation to blending, the blending duration time, the overlayed parts and the weight changing function, for example maybe a sine/cosine is chosed.
May 21 – May 31
BlendDirectional: This is a hard stuff assuming you want to get result without foot-sliding. It is also the reason while IK or other interpolation algorithm(like Geostatistical Motion Interpolation) is needed.
Here we need motiongraph to give local coordinate system translation information to blending.
June 1 – June 10
Blendbyspeed: Culculating the translation of root and the blending weight between different moving animation to archieve a good looking BlendbySpeed weights.
June 11 – June 30
BlendKeyFrames: Most animators are used to using keyframes to author animation, this blendNode is for this. Users can select different preprovided keyframes or animation snapshot to edit a keyframe sequence, then the animation system will using all of already developed AnimNodeBlend and motiongraph to generate a final animation.
Task 3 IK Controller, this is roughly summizing and enhancing work, and behavioral API adding
July 1 – July 15
Summarize all existing work of IK in Ogre
http://www.ogre3d.org/forums/viewtopic. ... 9&start=25
http://www.ogre3d.org/forums/viewtopic.php?f=13&t=29911
http://www.ogre3d.org/wiki/index.php/SoC2007_Animation
Try existing IK(http://www.ogre3d.org/forums/viewtopic.php?f=4&t=35712) in Ogre first, and polish them,
then forget about them(too many concern may slow new thought and developing process), add API
July 16 – July 31
BlendIKNode: Add IK for grab, lookat and step action.
The action is fired by trigger system. For example, if there is a belle, the player will lookat her by head turning ( there is also body bones' change) while running.
Here we set the IKBone to the end Acitve Bone( assuming we use CCD IK algorithm) -- head, and there are also whole body restriction that will prevent the player leaving its running path.
We can do this in nearly two functions and one API. setActiveBone and setIKType( LookAt), API is actor->addNewTrigger(new belle);
August 1 – August 10
Assemble all together, polish code, write document and complete tutorial.
Future Extensions
A good editor for
Something to clarify, last year I was too focusing on my code, thus take less time to make my code marketing. Therefore doubts on my work's practicability arise, whether it is correct or it is helpful for users' daily work.
Motion synthesis support interactive control of actor and scripted animation, and AI can be added to actor as an extension.
April 11, new additional details and more plan A&B consideration.
Maybe this project about animation seems very ambitious, for example, IK had been tried several times and AnimationTree and BlendTree are always in
demanding list. Here I want to clear all these doubt and considerations.
First and most important, I have cognized my communication issue, and am trying to overcome it totally.
Second, I think already existing stuff on animation in Ogre is enough to give it well workable solution for users.
Third, my proposal's framework is extensible for further specific extensions, other developers can add new BlendNode with more powerful blending algorithm,
add new IK algorithm and behavioral API, add PATH-finding using motion graph etc.
Btw, some lessons learnt from @jarek108 he is the gsoc 2007 student who dealt with animation. He actually planned too much and always designing
the gameplay and then he hadn't enough time to focus on his real work. I chose the agile developing style, I will go through my project by examples progressively.
April 8, a workable example of AnimNodeBlendPerBone .
User can control the weight interactively between 0. and 1. to "Run" or "Walk" animatiom of jaiqua.
video is here
http://www.youtube.com/watch?v=q1G1LGwsr60
the code is in the attachment
just copy them to the skeletalAnimation example include and src folder, and add the files to the SkeletalAnimation project.
Press key "I" and "O" to increase and decrease the weight for "Run" and "Walk" animation.
Abstract:
This project is aiming to create BlendTree class for animation blending: TecnoFreak(http://www.ogre3d.org/forums/viewtopic.php?t=45260) provides code and he can help a lot. And then IK support will be added as blending skeletion animation with procedural animation: noche's IK with Ogre(http://www.ogre3d.org/forums/viewtopic.php?f=4&t=35712) is a great work and it is a patch for Ogre, I should have to change its interface for blendNode( component of BlendTree).Maybe it seems to be an assembling work so far, but there are some problem beyonds them.
Proposal detail:
There are three basic tasks and two further ones.
• Blending by posture only works well for similar ones, so good blending postures must be selected first , my motion graph metric function (posture distance calcuation can do this),see my tutorial of animation http://www.ogre3d.org/forums/viewtopic. ... 17#p336616
• Weights must be assigned carefully for Blending multiple animation in BlendTree to each animation or even each bone, this really effect the result animation's reliability.
• Connecting successive animations must concern timing, for example, transition or blending run to/and walk animation must match the foor step because the speed of each animation is not the same.
• IK is only applied to arm/leg's end part and only when there are environment interaction, otherwise IK's opps will show totally over skeletal animation
• Motion graph can be used as long as some SceneManager problems be solved.
Schedule
The main classes need to be added for AnimBlending.
(click for full size)
Task 1 Blend without timing(already completed)
April 20 -- April 26
The fundamental class for animation blender and for further extension to IK controller.
AnimNode class: this class is the original class which can handle Animation, that is to hold animationTrack , TickAnimation and GetPosture, though the way varies according to different AnimBlendNodes.
AnimNodeBlendBase class: the basic animNode that can blend different animation channel, one animation channel means an result blendBuffer output from one child of this BlendNode.
AnimNodeBlendperbone: a hierarchical blend algorithm go through a skeleton's bones.
You can reference to attachment for code detail.
Task 2 Blend with timing
While blendperBone(there may be blendmask, each bone has specific weight and effect) or by posture is blending animationTrack in space at exactly the same time,
BlendCrossFader, BlendBySpeed, BlendDirectional and BlendKeyFrames are concerned about timing seriously.
Basic method:
BlendTree can blend two different animations with different time duration, no time wrapping is carried on, for we don’t want to change any time stepping in each animations. This is done as follows: assume animation1 has keyframes k10(t0),k11(t1) ,k12(t3) animation2 has keyframes k21(t2) k22(t4), t1,t2,t3,t4 is timestamp, and t0 < t1< t2 <t3 <t4, we first create a new dummy animation ---- animation3, which will be the blended animation for final use. At t1, there is only k11 in animation1, we need the corresponding keyframe in animation2, so called k21’, we use dual quaternion linear to create the k21’ = DLB(t1; k20,k21), k31 = DLB(w;k11,k21’), w is the weight between animation1 and animation2.
April 27 – May 20
BlendCrossFader: This is used when transition occurs, the most event in MotionGraph synthesis.Blenders can benefit from contact information and posture similarity table calculated from MotionGraph.
The most difficult issues are: Choosing which timestamps in successive animation to blending, the blending duration time, the overlayed parts and the weight changing function, for example maybe a sine/cosine is chosed.
May 21 – May 31
BlendDirectional: This is a hard stuff assuming you want to get result without foot-sliding. It is also the reason while IK or other interpolation algorithm(like Geostatistical Motion Interpolation) is needed.
Here we need motiongraph to give local coordinate system translation information to blending.
June 1 – June 10
Blendbyspeed: Culculating the translation of root and the blending weight between different moving animation to archieve a good looking BlendbySpeed weights.
June 11 – June 30
BlendKeyFrames: Most animators are used to using keyframes to author animation, this blendNode is for this. Users can select different preprovided keyframes or animation snapshot to edit a keyframe sequence, then the animation system will using all of already developed AnimNodeBlend and motiongraph to generate a final animation.
Task 3 IK Controller, this is roughly summizing and enhancing work, and behavioral API adding
July 1 – July 15
Summarize all existing work of IK in Ogre
http://www.ogre3d.org/forums/viewtopic. ... 9&start=25
http://www.ogre3d.org/forums/viewtopic.php?f=13&t=29911
http://www.ogre3d.org/wiki/index.php/SoC2007_Animation
Try existing IK(http://www.ogre3d.org/forums/viewtopic.php?f=4&t=35712) in Ogre first, and polish them,
then forget about them(too many concern may slow new thought and developing process), add API
July 16 – July 31
BlendIKNode: Add IK for grab, lookat and step action.
The action is fired by trigger system. For example, if there is a belle, the player will lookat her by head turning ( there is also body bones' change) while running.
Here we set the IKBone to the end Acitve Bone( assuming we use CCD IK algorithm) -- head, and there are also whole body restriction that will prevent the player leaving its running path.
We can do this in nearly two functions and one API. setActiveBone and setIKType( LookAt), API is actor->addNewTrigger(new belle);
August 1 – August 10
Assemble all together, polish code, write document and complete tutorial.
Future Extensions
A good editor for
Something to clarify, last year I was too focusing on my code, thus take less time to make my code marketing. Therefore doubts on my work's practicability arise, whether it is correct or it is helpful for users' daily work.
Motion synthesis support interactive control of actor and scripted animation, and AI can be added to actor as an extension.
You do not have the required permissions to view the files attached to this post.
Last edited by westine on Tue Apr 14, 2009 4:32 pm, edited 22 times in total.
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
Re: [Soc 2009 submitted - More powerful animation blending]
Thanks - the number of tasks here seems quite ambitious for the time available, do you think it's realistic? Your motion synthesis work last year was really interesting, and will certainly be a reference for future work, but didn't get to a stage I'd consider to be practically usable by a non-expert, which is why it isn't merged into the trunk. Therefore for this year I think it's more important to concentrate on what can be delivered in this area that is both stable, well documented and usable by the general public. I would prefer if less top-level tasks were covered, but those that were done were polished and usable by a wider audience, such that they can be confidently merged into the main development branch.
Which parts of your proposal do you think fit into that category?
Which parts of your proposal do you think fit into that category?
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Re: [Soc 2009 submitted - More powerful animation blending]
This is the most part you want, I think,Sinbad.sinbad wrote: Therefore for this year I think it's more important to concentrate on what can be delivered in this area that is both stable, well documented and usable by the general public. I would prefer if less top-level tasks were covered, but those that were done were polished and usable by a wider audience, such that they can be confidently merged into the main development branch.
Which parts of your proposal do you think fit into that category?
Task 2 BlendTree
April 19 – April 26
Blend posture, can reference TecnoFreak and Unreal Engine, this is per bone or node, but using dual quaternion
April 27 – May17
BlendTree can blend two different animations with different time duration, no time wrapping is carried on, for we don’t want to change any time stepping in each animations. This is done as follows: assume animation1 has keyframes k10(t0),k11(t1) ,k12(t3) animation2 has keyframes k21(t2) k22(t4), t1,t2,t3,t4 is timestamp, and t0 < t1< t2 <t3 <t4, we first create a new dummy animation ---- animation3, which will be the blended animation for final use. At t1, there is only k11 in animation1, we need the corresponding keyframe in animation2, so called k21’, we use dual quaternion linear to create the k21’ = DLB(t1; k20,k21), k31 = DLB(w;k11,k21’), w is the weight between animation1 and animation2.
May 18 – May 31
BlendTree can blend multiple animation as user add new animation to one BlendTree node.
It will certainly make blend per bone and posture,blend by speed and directional,interpolation crossFade or PosturesSequence work even should I not use dual quaternion, but using nlerp or slerp.
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Re: [Soc 2009 submitted - More powerful animation blending]
I have reviewed nearly all topics in Ogre communities in recent years, there are mainly two demands collected from all these quests: blending and transition.
http://www.ogre3d.org/forums/viewtopic. ... on#p329115 per blending
http://www.ogre3d.org/forums/viewtopic.php?t=37732 animation transition
Blending by posture per bone, is now done in Ogre
you can see the bone is blended by weight in the order of NodeTrackList, but the NodeTrackList is not in the skeleton hierarchical order, which means
head is first blended before its parent node hip. This will cause the blended result unnatural.
According to transition, this is the most problems users ask in Ogre forums when they are trying to connect multiple animations. In the Ogre's skeleton animation example, second animation's starting position and orientation is calculated in advance but not on the fly. This is what my motion graph did.
I record each animation's local coordinates when the original animations are loaded. The motion graph transitions occur, auto posture alignment is applied to character's root node. Which slow down my process of motion graph last summer is the bounding box and SceneManager but not the motion graph itself.
I should say the Entity SceneNoe and AnimationState control of character animation can be wrapped more intuitive for novice.
Below is my last year's code for initialization motion graph
http://www.ogre3d.org/forums/viewtopic. ... on#p329115 per blending
http://www.ogre3d.org/forums/viewtopic.php?t=37732 animation transition
Blending by posture per bone, is now done in Ogre
Code: Select all
void Animation::apply(Skeleton* skel, Real timePos, Real weight,
Real scale)
{
// Calculate time index for fast keyframe search
TimeIndex timeIndex = _getTimeIndex(timePos);
NodeTrackList::iterator i;
for (i = mNodeTrackList.begin(); i != mNodeTrackList.end(); ++i)
{
// get bone to apply to
Bone* b = skel->getBone(i->first);
i->second->applyToNode(b, timeIndex, weight, scale);
}
}
head is first blended before its parent node hip. This will cause the blended result unnatural.
According to transition, this is the most problems users ask in Ogre forums when they are trying to connect multiple animations. In the Ogre's skeleton animation example, second animation's starting position and orientation is calculated in advance but not on the fly. This is what my motion graph did.
I record each animation's local coordinates when the original animations are loaded. The motion graph transitions occur, auto posture alignment is applied to character's root node. Which slow down my process of motion graph last summer is the bounding box and SceneManager but not the motion graph itself.
I should say the Entity SceneNoe and AnimationState control of character animation can be wrapped more intuitive for novice.
Below is my last year's code for initialization motion graph
Code: Select all
ent = mSceneMgr->createEntity(modelname, modelname+".mesh");
// Add entity to the scene node
mSceneNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
mSceneNode->attachObject(ent);
ent->ExecuteMotionGraph("mg");
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Re: [Soc 2009 submitted - More powerful animation blending]
I have changed my proposal a lot, which discards qual quaternion, this method is more helpful for skinning so far.sinbad wrote:Thanks - the number of tasks here seems quite ambitious for the time available, do you think it's realistic? Your motion synthesis work last year was really interesting, and will certainly be a reference for future work, but didn't get to a stage I'd consider to be practically usable by a non-expert, which is why it isn't merged into the trunk. Therefore for this year I think it's more important to concentrate on what can be delivered in this area that is both stable, well documented and usable by the general public. I would prefer if less top-level tasks were covered, but those that were done were polished and usable by a wider audience, such that they can be confidently merged into the main development branch.
Which parts of your proposal do you think fit into that category?
This time my objective is make more powerful blending and Ik support totally be a basic functionality of Ogre, after that users can by directly writing code, using editor(TecnoFreak is a good example) or the best way I look forward ----- a scene manager including cinematic design to play animated actors.
The main work is BlendTree, IK will be also added as a plus.
BlendTree will be integrated into motion graph as nodes, and BlendNode in BlendTree is motiongraph edges.
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
Re: [Soc 2009 submitted - Animation blending & IK controller]
Thanks.
Even after this follow-up, I think the main concern we have is that it's hard for us to fully understand the benefits that you're proposing, and to judge how they will be delivered. That's probably down to two things - the specialised nature of the subject, which you seem to be better versed in than most of us, and the language barrier (I think this is actually the main issue). Last year we took a chance on the communication issue, the code you produced was very interesting, but I don't think anyone except you fully understood how to use it, and I don't think you really explained it very well to the rest of the community (most people in your old thread just seemed confused) - the communication problem. Since you didn't stick around in the community after the summer to follow up on that and help take the project through to practical usage, the code has basically sat in the branch since then waiting for someone to learn how to take it forward. Our main concern is that we don't want to repeat that this year, since the goal of GSoC is a dual one - to create usable code and to encourage new long-term committers to get involved. Therefore while I don't think anyone doubts your technical ability, we're very concerned about the communication issue and being left in the same 'limbo' situation after the summer.
Even after this follow-up, I think the main concern we have is that it's hard for us to fully understand the benefits that you're proposing, and to judge how they will be delivered. That's probably down to two things - the specialised nature of the subject, which you seem to be better versed in than most of us, and the language barrier (I think this is actually the main issue). Last year we took a chance on the communication issue, the code you produced was very interesting, but I don't think anyone except you fully understood how to use it, and I don't think you really explained it very well to the rest of the community (most people in your old thread just seemed confused) - the communication problem. Since you didn't stick around in the community after the summer to follow up on that and help take the project through to practical usage, the code has basically sat in the branch since then waiting for someone to learn how to take it forward. Our main concern is that we don't want to repeat that this year, since the goal of GSoC is a dual one - to create usable code and to encourage new long-term committers to get involved. Therefore while I don't think anyone doubts your technical ability, we're very concerned about the communication issue and being left in the same 'limbo' situation after the summer.
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Re: [Soc 2009 submitted - Animation blending & IK controller]
So much thanks to you, Sinbad. You definitely point out the short slab of my wooden barrel --- the communication issue. If you didn't make it, I will further code and paste some interesting result of Blending and go forward. Originally I think code is more than words, and when I make it practical useful, there needs no more explanation. It seems this style of mine working should change to more audience closer one. I should make it clear what is really needed and then follow my work step by step.sinbad wrote:Thanks.
Even after this follow-up, I think the main concern we have is that it's hard for us to fully understand the benefits that you're proposing, and to judge how they will be delivered. That's probably down to two things - the specialised nature of the subject, which you seem to be better versed in than most of us, and the language barrier (I think this is actually the main issue). Last year we took a chance on the communication issue, the code you produced was very interesting, but I don't think anyone except you fully understood how to use it, and I don't think you really explained it very well to the rest of the community (most people in your old thread just seemed confused) - the communication problem. Since you didn't stick around in the community after the summer to follow up on that and help take the project through to practical usage, the code has basically sat in the branch since then waiting for someone to learn how to take it forward. Our main concern is that we don't want to repeat that this year, since the goal of GSoC is a dual one - to create usable code and to encourage new long-term committers to get involved. Therefore while I don't think anyone doubts your technical ability, we're very concerned about the communication issue and being left in the same 'limbo' situation after the summer.
Now regarding to the two things you are considering. First, maybe animation and the related stuff such skinning and IK, is not as popular as rendering for most users. In graphics engine, rendering is always the first necessary requirement. Animation is only considered when people needs more fun mainly in games. But I should say rendering if no specialised ones such as NPR and translucent is required, making student focus on their rendering process mainly some equation to be represented in GLSL. Last summer, I had used so much time on skeleton exporter and skin matching, which distracted me from my main work. In consequence, I didn't have too much time to explain what I am on. But all code in motiongraph.cpp is in demand, I use it
http://www.youtube.com/watch?v=XrxBW1zc-cc
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
Re: [Soc 2009 submitted -Add Animation blender & IK together]
Animation is definitely something we're interested in - like I say the issue is evaluating the practical way this project might pan out. That video you posted for example - I have no idea what I'm looking at there. What I see is some pretty jerky animation of a stick man running backwards and forwards in a way which doesn't appear (superficially) to provide anything we can't already do with the existing animation system - in fact the existing animation system would be smoother The same went for the videos you made of last years work - it all looked interesting but no-one really understood the practical significance of it. You haven't really managed to 'sell' it to anyone, particularly since you were not around after the summer.
Re your comment about 'code being more than words' - I'm afraid I disagree. Communication is absolutely paramount to GSoC and to open source in general - after all the best code in the world is no use unless people know how to use it, and in particular with open source, can see how to extend / adapt it in the future. It is actually better to sacrifice the cleverest code in favour of better documentation, maintainability and general understanding by the community, because over time the extra 'smarts' can be iterated into it. It's actually better to have slightly less clever code that everyone understands, than ultra-clever code that no-one except the original author does, because that author may not be around later. This is the crux of the problem with your application right now - it's sad that much of it is not really your fault (although you could have helped your case by sticking around after the summer last year), it's the language barrier that's clearly the main problem, but we have to make a judgement based on all factors - and clever code is just one of them.
Re your comment about 'code being more than words' - I'm afraid I disagree. Communication is absolutely paramount to GSoC and to open source in general - after all the best code in the world is no use unless people know how to use it, and in particular with open source, can see how to extend / adapt it in the future. It is actually better to sacrifice the cleverest code in favour of better documentation, maintainability and general understanding by the community, because over time the extra 'smarts' can be iterated into it. It's actually better to have slightly less clever code that everyone understands, than ultra-clever code that no-one except the original author does, because that author may not be around later. This is the crux of the problem with your application right now - it's sad that much of it is not really your fault (although you could have helped your case by sticking around after the summer last year), it's the language barrier that's clearly the main problem, but we have to make a judgement based on all factors - and clever code is just one of them.
-
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
Re: [Soc 2009 submitted -Add Animation blender & IK together]
Pictures may be as good as words. I agree with sinbad that documentation and communication is really important. I fairly understand what you are proposing. Out of everything, my feeling is that animation is one of the areas Ogre can improve the most in. By that I mean both in power and ease of use, so I'm definitely interested in your proposal. Your first diagram was a good start, but you could use more diagrams and pictures to explain what you mean.
Game Development, Engine Development, Porting
http://www.darkwindmedia.com
http://www.darkwindmedia.com
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Re: [Soc 2009 submitted -Add Animation blender & IK together]
Thanks for your sincerely reply, I wake up to find that I have the language barrier problem and even worse I don't strive to help other understand my words.
Besides, I haven't make my work totally releasable.
Here are the steps I should do to make up for my duty.
Besides, I haven't make my work totally releasable.
Here are the steps I should do to make up for my duty.
Any way, my application will be continuously polished as I think this summer is a good chance to make Ogre's animation system really as powerful as rendering system.sinbad wrote:The video has no blender but just motion graph drived, so there is the jerky animation.Animation is definitely something we're interested in - like I say the issue is evaluating the practical way this project might pan out.
That video you posted for example - I have no idea what I'm looking at there. What I see is some pretty jerky animation of a stick man running backwards and forwards in a way which doesn't appear (superficially) to provide anything we can't already do with the existing animation system - in fact the existing animation system would be smoother
The aim of adding blender is to enhance the transition smoothness between successive animations. I also have tried to using exsiting animation system on Ogre, it blends bonenode one by one, which is smoother but unnatural, and the find good timing for transition in successive animation is very labor-intensive.
Firstly, I am very sorry for my lack of subsequent work on my project after summer. Although there are really personal reason, I had been hunting job from December to February ---- I will work for Bank of China after this summer as an IT Architect.This job will be pretty decent and I will have more free time to continue my favorite graphics stuff. And from August to November last year I was busy with hexahedral mesh generation, I had mentioned this to tuan kuranes, even more, I asked help from him. This is the reason why I haven't make as great as Noman for my less time contribution to Ogre.The same went for the videos you made of last years work - it all looked interesting but no-one really understood the practical significance of it. You haven't really managed to 'sell' it to anyone, particularly since you were not around after the summer.
Maybe I have a language error again on this sentence, I said "Originally" meaning I don't aggre this since your second latest reply had edified me.Re your comment about 'code being more than words' - I'm afraid I disagree..Communication is absolutely paramount to GSoC and to open source in general - after all the best code in the world is no use unless people know how to use it, and in particular with open source, can see how to extend / adapt it in the future. It is actually better to sacrifice the cleverest code in favour of better documentation, maintainability and general understanding by the community, because over time the extra 'smarts' can be iterated into it. It's actually better to have slightly less clever code that everyone understands, than ultra-clever code that no-one except the original author does, because that author may not be around later. This is the crux of the problem with your application right now - it's sad that much of it is not really your fault (although you could have helped your case by sticking around after the summer last year), it's the language barrier that's clearly the main problem, but we have to make a judgement based on all factors - and clever code is just one of them
I should hang these words on my desktop, it is one of the most helpful precept I have received since I wrote my first program.
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
Re: [Soc 2009 submitted -Add Animation blender & IK together]
I am really looking forward to seeing this, Westine - go for it!
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Re: [Soc 2009 submitted -Add Animation blender & IK together]
@Praetor, @jacmoe Thank you, your encouragement gives me much strength.
See class diagram of BlendTree and BlendNode for animation, and its relation with Actor and SkeletalMesh in my proposal.
class Actor // a wrapper class on skeleton , mesh and its AnimationSet, it is also the proxy of Controller and AnimBlender
{
SkeletalMesh
AnimTree
OtherInfo: Position, Orientation, Speed, Velocity and emotion that will be useful for some specific AnimBlendNode and MotionSynthesis
}
class skeletalMesh is the facade of mesh, skeleton and animationSet in Ogre.
class AnimNode is the base class for Animation blender, Keyframing animation sequence and further procedural animation( IK controller).
class AnimNode
{
virtual TickAnim() = 0;
virtual GetBoneTransform() = 0;
}
class AnimNodeBlendBase is the base class for AnimBlender, the fundamental task of a AnimNodeBlend is heirarchically going through its Children
in the parent to child order, calculating the weight assigned to each leaf node.
Note: the leaf node of AnimBlendTree is AnimNodeAnimation, AnimNodeAnimation is also a subclass of AnimNode, it inherits TickAnim and GetBoneTransform functions.
AnimNodeBlendXXX are classes to do specific blending according to the impulse it feed, such as directional angles in AnimNodeBlendDirectional;
speed of Actor in AnimNodeBlendBySpeed.
AnimNodeBlendPerBone blend each bones in the sleleton with weight assigned to different AnimNodeAnimation, but there can be BoneWeightMask, or
even BoneController such as Limb, Head and FootPose Blender that can archieve Grab, LootAt and StepPoints action.
See class diagram of BlendTree and BlendNode for animation, and its relation with Actor and SkeletalMesh in my proposal.
class Actor // a wrapper class on skeleton , mesh and its AnimationSet, it is also the proxy of Controller and AnimBlender
{
SkeletalMesh
AnimTree
OtherInfo: Position, Orientation, Speed, Velocity and emotion that will be useful for some specific AnimBlendNode and MotionSynthesis
}
class skeletalMesh is the facade of mesh, skeleton and animationSet in Ogre.
class AnimNode is the base class for Animation blender, Keyframing animation sequence and further procedural animation( IK controller).
class AnimNode
{
virtual TickAnim() = 0;
virtual GetBoneTransform() = 0;
}
class AnimNodeBlendBase is the base class for AnimBlender, the fundamental task of a AnimNodeBlend is heirarchically going through its Children
in the parent to child order, calculating the weight assigned to each leaf node.
Note: the leaf node of AnimBlendTree is AnimNodeAnimation, AnimNodeAnimation is also a subclass of AnimNode, it inherits TickAnim and GetBoneTransform functions.
AnimNodeBlendXXX are classes to do specific blending according to the impulse it feed, such as directional angles in AnimNodeBlendDirectional;
speed of Actor in AnimNodeBlendBySpeed.
AnimNodeBlendPerBone blend each bones in the sleleton with weight assigned to different AnimNodeAnimation, but there can be BoneWeightMask, or
even BoneController such as Limb, Head and FootPose Blender that can archieve Grab, LootAt and StepPoints action.
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
Re: [Soc 2009 submitted -Add Animation blender & IK together]
I'm not seeing a class diagram in the proposal, did you upload it somewhere else? If you can't get it to upload on the GSoC page, then attach it here.
I think I understand your pitch a little better now, but it would really help understand if you laid out a concrete example of how it might be used at the user end, and how that translates through the proposed layer down to the existing animation classes.
Please try to use this week to explain and illustrate your proposal as clearly as you possibly can. Assume that we know nothing about animation research beyond what is already contained in the core OGRE source, and try to 'sell' us your idea. We will have to decide based on these discussions whether we think the communication on this project can work this year (both between mentor and student, and between student and the rest of the community), so it's important to explain as much as possible.
I think I understand your pitch a little better now, but it would really help understand if you laid out a concrete example of how it might be used at the user end, and how that translates through the proposed layer down to the existing animation classes.
Please try to use this week to explain and illustrate your proposal as clearly as you possibly can. Assume that we know nothing about animation research beyond what is already contained in the core OGRE source, and try to 'sell' us your idea. We will have to decide based on these discussions whether we think the communication on this project can work this year (both between mentor and student, and between student and the rest of the community), so it's important to explain as much as possible.
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Re: [Soc 2009 submitted -Add Animation blender & IK together]
@sinbad Thank you .sinbad wrote:I can see it, is it the internet jamming, here is the URL:I'm not seeing a class diagram in the proposal, did you upload it somewhere else? If you can't get it to upload on the GSoC page, then attach it here.
I think an example in one week is probably possible, I will try my best as possible as I can.I think I understand your pitch a little better now, but it would really help understand if you laid out a concrete example of how it might be used at the user end, and how that translates through the proposed layer down to the existing animation classes.
Please try to use this week to explain and illustrate your proposal as clearly as you possibly can.Ok, I should develop all based on existing core Ogre, and I think a tutorial is the best way for novice of a new area, though an entire tutorial will be compleled all through the developing process, I will strive to make a introduction first.Assume that we know nothing about animation research beyond what is already contained in the core OGRE source, and try to 'sell' us your idea.I do need communication too.We will have to decide based on these discussions whether we think the communication on this project can work this year (both between mentor and student, and between student and the rest of the community), so it's important to explain as much as possible.
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
Re: [Soc 2009 submitted -Add Animation blender & IK together]
Ok thanks, I see it now.
A worked example is I think the only way for us to judge your proposal fully. The results of your update are a proposal that is really far too short to properly evaluate - the almost one word milestones really just increases our concern (at least, my concern but I think I speak for the other mentors too) about whether communication / collaboration on this project is going to work.
A worked example is I think the only way for us to judge your proposal fully. The results of your update are a proposal that is really far too short to properly evaluate - the almost one word milestones really just increases our concern (at least, my concern but I think I speak for the other mentors too) about whether communication / collaboration on this project is going to work.
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Re: [Soc 2009 submitted -Add Animation blender & IK together]
I have already made out a workable example using three days, it's really a good experience.sinbad wrote:Ok thanks, I see it now.
A worked example is I think the only way for us to judge your proposal fully. The results of your update are a proposal that is really far too short to properly evaluate - the almost one word milestones really just increases our concern (at least, my concern but I think I speak for the other mentors too) about whether communication / collaboration on this project is going to work.
To show my proposal is well suited for Ogre, in this example I have used AnimationBlender(http://www.ogre3d.org/wiki/index.php/AnimationBlender)'s thinking logic,
Tecnofeak's heirarchical way and blendMask for bone( this time is set rootspine's weight to ZERO.)
You can reference this article for more detail, it is very straightforward. http://www.gamasutra.com/features/20030 ... l_01.shtml
Proposal has been updated entirely and details are being added continuously.
Thank you for your notification about communication, next is the first chapter of my animation system tutorial.
You do not have the required permissions to view the files attached to this post.
Last edited by westine on Sun Apr 12, 2009 4:55 am, edited 1 time in total.
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Tutorial of animation system
My first tutorial is to tell users and developers the basics of an animation system, how an extension to exsiting system could done in a step by step way.
It is dynamical, I will explain and discuss with all of you while develop every thing you really required.
Maybe the most demand of a practical animation system is an AnimationTree which is popular in most game engines, and this one had been required several time since my last motion graph stuff was proposed.
First of all, the animation tree is probably like
The posture in the centre is commanly an "idle" animation, which is always played while there is no other event coming.
The postures around it is animations that will be switched into when there is some event like running, firing coming from users' input or AI system.
Nearly most game use this style of animation strategy, including Crysis , Prince of Persia and Gear of War, you can play them to feel.
Although this is a straightforward way to give gameplay, it needs much smoother and flexibler transtions between animations.
Then here is the BlendTree extension.
As you can see, the main structure is the same, it is a tree, though blendTree is multiple layered. Each node in the big tree can be of different function
specified for different transition type.
The AnimBySpeed is dynamically changing weight to its children as the speed of the controlled character changes. The AnimBlendDirectional node turns around according the character's current orientation, and the perBone one is adjusting bone action by users' input(usually from shortcut-key).
It is dynamical, I will explain and discuss with all of you while develop every thing you really required.
Maybe the most demand of a practical animation system is an AnimationTree which is popular in most game engines, and this one had been required several time since my last motion graph stuff was proposed.
First of all, the animation tree is probably like
The posture in the centre is commanly an "idle" animation, which is always played while there is no other event coming.
The postures around it is animations that will be switched into when there is some event like running, firing coming from users' input or AI system.
Nearly most game use this style of animation strategy, including Crysis , Prince of Persia and Gear of War, you can play them to feel.
Although this is a straightforward way to give gameplay, it needs much smoother and flexibler transtions between animations.
Then here is the BlendTree extension.
As you can see, the main structure is the same, it is a tree, though blendTree is multiple layered. Each node in the big tree can be of different function
specified for different transition type.
The AnimBySpeed is dynamically changing weight to its children as the speed of the controlled character changes. The AnimBlendDirectional node turns around according the character's current orientation, and the perBone one is adjusting bone action by users' input(usually from shortcut-key).
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
Why motion graph and how should we use it
This time I would like to explain what is a motion graph and what is its role in character animation.
Most time in a FPS game, the actor is controlled by users interactively. Which next action to take is decided by our input, fire, run, jump and so on. Even some newest games including Gears of War, there is environment triggers that will cause specific action, such as hiding and climbing a wall.
All of these features can be done by AnimationTree or BlendTree by adding as many as motion clips to nodes, for trigger system can do the rest transiting work.
Here is an assumption that Transition can be done between any pairs of motion clips.
This assumption is somewhat true in two other preconditions.
First, the Blending algorithm is powerful enough to give smooth transition from source motion to target motion.
Second, the trigger system can always chose a good target motion to switch to.
Unfortunately, these two preconditions can not always be satisfied.
For the first one, current blending algorithms as far as I know can only blend similar motions well, especially when there are large amount of dynamical action
in displacement and complex posture change. There is no guarantee for this situation while we can not restrict the game player's controling input sequence.
There is a demand for automatically transition motion selecting.
For the second one, if we have even the powerful enough blending algorithm to blend motion clips smoothly, there is behavioral consideration for character animation. Actually here we defaultly think the blending algorithm blending algorithm does have AI.
Take an example, and this is maybe one of the most requirement examples of motion graph than previous motion assembling techniques.
From http://graphics.cs.cmu.edu/projects/int ... on_graphs/
Here the lady steps the a sequence of pillars. This can not be down by jumping one by one, for the pillar's top is too small, using jump she is tend to slide out.
And walk with the same step length is also a good way. Then here, there is only walking style motion, common blending (without motion graph) cannot do anything about it. And trigger system also can not select accurate motions in this detail degree.
Maybe, someone will think of IK in this case. Yes, IK is for this suitation true, but only IK is unnatural, this is the reason I want to add IK into blending.
Then, motion graph has its role.
It helps prepair enough motion clips for blending algorithm and chose good transition points in motion original or blended.
Most time in a FPS game, the actor is controlled by users interactively. Which next action to take is decided by our input, fire, run, jump and so on. Even some newest games including Gears of War, there is environment triggers that will cause specific action, such as hiding and climbing a wall.
All of these features can be done by AnimationTree or BlendTree by adding as many as motion clips to nodes, for trigger system can do the rest transiting work.
Here is an assumption that Transition can be done between any pairs of motion clips.
This assumption is somewhat true in two other preconditions.
First, the Blending algorithm is powerful enough to give smooth transition from source motion to target motion.
Second, the trigger system can always chose a good target motion to switch to.
Unfortunately, these two preconditions can not always be satisfied.
For the first one, current blending algorithms as far as I know can only blend similar motions well, especially when there are large amount of dynamical action
in displacement and complex posture change. There is no guarantee for this situation while we can not restrict the game player's controling input sequence.
There is a demand for automatically transition motion selecting.
For the second one, if we have even the powerful enough blending algorithm to blend motion clips smoothly, there is behavioral consideration for character animation. Actually here we defaultly think the blending algorithm blending algorithm does have AI.
Take an example, and this is maybe one of the most requirement examples of motion graph than previous motion assembling techniques.
From http://graphics.cs.cmu.edu/projects/int ... on_graphs/
Here the lady steps the a sequence of pillars. This can not be down by jumping one by one, for the pillar's top is too small, using jump she is tend to slide out.
And walk with the same step length is also a good way. Then here, there is only walking style motion, common blending (without motion graph) cannot do anything about it. And trigger system also can not select accurate motions in this detail degree.
Maybe, someone will think of IK in this case. Yes, IK is for this suitation true, but only IK is unnatural, this is the reason I want to add IK into blending.
Then, motion graph has its role.
It helps prepair enough motion clips for blending algorithm and chose good transition points in motion original or blended.
-
- Google Summer of Code Student
- Posts: 62
- Joined: Sun Apr 01, 2007 12:12 pm
A smoothy transition
Now it's time to do the right thing ----- create good transition using AnimNoeBlend.
Last week I make a simple example of AnimNodeBlendPerBone, this one has two biggest problems:
1、jaiqua rolls left and right //this is because I did anim1->getAnimState()->setBlendMaskEntry(33,0) to
make the translation of jaiqua's SpineRoot ZERO, but meanwhile the rotation of the SpineRoot is also ZERO, so there seems to be rolling
NB, one person can not keep his spineRoot the same orientation when he walks.
2、there are jerks at run and walk animations' start and end points.
The first problem will be solved when we use Motion graph's calculated local displacement of translation and orientation.
The second one requires time wrapping, this is more complex than the first one.
We do it step by step below.
Last week I make a simple example of AnimNodeBlendPerBone, this one has two biggest problems:
1、jaiqua rolls left and right //this is because I did anim1->getAnimState()->setBlendMaskEntry(33,0) to
make the translation of jaiqua's SpineRoot ZERO, but meanwhile the rotation of the SpineRoot is also ZERO, so there seems to be rolling
NB, one person can not keep his spineRoot the same orientation when he walks.
2、there are jerks at run and walk animations' start and end points.
The first problem will be solved when we use Motion graph's calculated local displacement of translation and orientation.
The second one requires time wrapping, this is more complex than the first one.
We do it step by step below.
-
- Gnoblar
- Posts: 8
- Joined: Thu Mar 10, 2011 7:59 pm
Re: Why motion graph and how should we use it
This is my biggest weakness man. I have been troubleshooting with motion in BlendTree for the past three weeks trying to figure out why my animation looks like a flipbook and not a pixar movie, and I'm getting quite frustrated. What would be a common mistake that leads to the process looking rigid?? i need a starting point....It is really important to me that my animation draw the eye of our consumers so we can increase our conversion rate. We have been running all kinds of YouTube downloader software and are coming up empty to this point as far as getting exactly what we want..unless what you want is perfect HD, haha!westine wrote:This time I would like to explain what is a motion graph and what is its role in character animation.
Most time in a FPS game, the actor is controlled by users interactively. Which next action to take is decided by our input, fire, run, jump and so on. Even some newest games including Gears of War, there is environment triggers that will cause specific action, such as hiding and climbing a wall.
All of these features can be done by AnimationTree or BlendTree by adding as many as motion clips to nodes, for trigger system can do the rest transiting work.
Here is an assumption that Transition can be done between any pairs of motion clips.
This assumption is somewhat true in two other preconditions.
First, the Blending algorithm is powerful enough to give smooth transition from source motion to target motion.
Second, the trigger system can always chose a good target motion to switch to.
Unfortunately, these two preconditions can not always be satisfied.
For the first one, current blending algorithms as far as I know can only blend similar motions well, especially when there are large amount of dynamical action
in displacement and complex posture change. There is no guarantee for this situation while we can not restrict the game player's controling input sequence.
There is a demand for automatically transition motion selecting.
For the second one, if we have even the powerful enough blending algorithm to blend motion clips smoothly, there is behavioral consideration for character animation. Actually here we defaultly think the blending algorithm blending algorithm does have AI.
Take an example, and this is maybe one of the most requirement examples of motion graph than previous motion assembling techniques.
From http://graphics.cs.cmu.edu/projects/int ... on_graphs/
Here the lady steps the a sequence of pillars. This can not be down by jumping one by one, for the pillar's top is too small, using jump she is tend to slide out.
And walk with the same step length is also a good way. Then here, there is only walking style motion, common blending (without motion graph) cannot do anything about it. And trigger system also can not select accurate motions in this detail degree.
Maybe, someone will think of IK in this case. Yes, IK is for this suitation true, but only IK is unnatural, this is the reason I want to add IK into blending.
Then, motion graph has its role.
It helps prepair enough motion clips for blending algorithm and chose good transition points in motion original or blended.
-
- Gnoblar
- Posts: 2
- Joined: Wed Oct 30, 2013 8:45 am
Re: [Soc 2009 submitted - Animation blending & IK controller
hello westine where can I find the file "motiongraph.cpp"westine wrote:So much thanks to you, Sinbad. You definitely point out the short slab of my wooden barrel --- the communication issue. If you didn't make it, I will further code and paste some interesting result of Blending and go forward. Originally I think code is more than words, and when I make it practical useful, there needs no more explanation. It seems this style of mine working should change to more audience closer one. I should make it clear what is really needed and then follow my work step by step.sinbad wrote:Thanks.
Even after this follow-up, I think the main concern we have is that it's hard for us to fully understand the benefits that you're proposing, and to judge how they will be delivered. That's probably down to two things - the specialised nature of the subject, which you seem to be better versed in than most of us, and the language barrier (I think this is actually the main issue). Last year we took a chance on the communication issue, the code you produced was very interesting, but I don't think anyone except you fully understood how to use it, and I don't think you really explained it very well to the rest of the community (most people in your old thread just seemed confused) - the communication problem. Since you didn't stick around in the community after the summer to follow up on that and help take the project through to practical usage, the code has basically sat in the branch since then waiting for someone to learn how to take it forward. Our main concern is that we don't want to repeat that this year, since the goal of GSoC is a dual one - to create usable code and to encourage new long-term committers to get involved. Therefore while I don't think anyone doubts your technical ability, we're very concerned about the communication issue and being left in the same 'limbo' situation after the summer.
Now regarding to the two things you are considering. First, maybe animation and the related stuff such skinning and IK, is not as popular as rendering for most users. In graphics engine, rendering is always the first necessary requirement. Animation is only considered when people needs more fun mainly in games. But I should say rendering if no specialised ones such as NPR and translucent is required, making student focus on their rendering process mainly some equation to be represented in GLSL. Last summer, I had used so much time on skeleton exporter and skin matching, which distracted me from my main work. In consequence, I didn't have too much time to explain what I am on. But all code in motiongraph.cpp is in demand, I use it
http://www.youtube.com/watch?v=XrxBW1zc-cc