Animation

Animation

Postby Skorpio » 30 Mar 2010, 15:11

I just checked the animations again, and they seem to get blended together in the game. I also tried to export only one action for a creature and it worked fine. Maybe there are some informations about this in the manual or on the OGRE forum.
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby svenskmand » 30 Mar 2010, 16:57

It seams that this post is moved from another thread. Can you give some context for the problem?
Jamendo.com - The best music store on the net, uses CC licenses.
User avatar
svenskmand
OD Moderator
 
Posts: 1850
Joined: 09 Dec 2009, 00:07
Location: Denmark

Re: Animation

Postby Skorpio » 31 Mar 2010, 12:28

I mentioned this already here: viewtopic.php?f=38&t=217&start=25#p2343

Either there's something wrong with the exporter or with OD.

BTW if you change the NLA mode to single actions (that little icon with a stick man), then it'll export the actions not the NLA animation.
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby andrewbuck » 31 Mar 2010, 14:12

I think it has something to do with the NLA editor though, the OGRE exporter probably doesn't deal with it properly. The animations seem to work alright for the dragon, which doesn't have any NLA stuff in it. I think if you are going to use the NLA editor you should turn it on (i.e. use NLA animations instead of single actions), but then change the start and end frame numbers on the OGRE exporter to match the numbers in the NLA editor, rather than just 1 to whatever, like you would do for a creature with only single actions and no NLA stuff at all.

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Animation

Postby Skorpio » 31 Mar 2010, 14:32

No, I don't think it's the NLA editor, because I also checked it without NLA strips and the animations were still wrong. And the animations of the dragon get mixed up, too. The wings should be much closer at the body when he walks. It looks like the idle and walk animations get blended together.
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby Skorpio » 31 Mar 2010, 15:13

Is the die animation implemented already? The creatures just disappear instead of dying.
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby andrewbuck » 31 Mar 2010, 15:28

I don't think the die animation is implemented but I don't recall offhand. Now that you mention it, you are right about the wings on the dragon they probably are being blended like yours are (I think it was just more noticeable with your animations since mine are so simple). We might need to shift the animations for each action by 100 frames or so so there is no overlap between them and then export them that way.

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Animation

Postby Skorpio » 31 Mar 2010, 16:38

I've tried that already, but shifting the animations doesn't seem to help either.
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby Skorpio » 02 Apr 2010, 10:16

Any idea what could be wrong? I hope we can fix the animations before the next release.

I've got some more questions about the animations. Should I add a pause after the attack animation? Because it looks a bit too hectic if the creatures strike permanently. Or can you add a little pause in the game by blending the attack with the idle animation?

I saw it's possible to change the movement speed in the level file, but it also changes the animation speed. Would it be possible to separate these values? Then I could adjust the animation speed more precisely. Actually I could adjust the speed in Blender as well, but maybe it would be easier in the level file. And could you add anything like this for the attack speed, too?
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby andrewbuck » 02 Apr 2010, 15:51

I really don't know what could be causing this. The only other thing I could suggest would be to update to the latest versions of both blender and the blender export script.

As for the animation speeds, I could probably do something like the above. The reason the animations speed up when you increase the movespeed is to make the walking work out right since there is no concept of "stride length" in the game right now. What I really should add is a separate variable for the stride length and then leave the animations alone (so they work like they do in blender, except for the walking/running/etc animations).

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Animation

Postby Skorpio » 07 Apr 2010, 15:42

If you don't find the reason for this blending, could you ask for help on the OGRE forum? Maybe something is wrong with the code for animations.
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby andrewbuck » 07 Apr 2010, 23:53

I don't have an account on the OGRE forums. If you want me to I can get one; if anyone else has a presence there it might be better if they ask. If not I will try to do it in the next couple of days.

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Animation

Postby Skorpio » 16 Apr 2010, 16:13

Any news?
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby andrewbuck » 16 Apr 2010, 16:39

Actually I kind of forgot to go do that, I have been busy working on mapping for OpenStreetMap (because our weather is finally decent here) and have not been working an OD as much in the meantime. If you want to register it might be better anyway since you know more about how blender's animation system works. Sorry for leaving you hanging like that.

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Animation

Postby Skorpio » 20 Apr 2010, 15:25

I think you should ask, because there's perhaps something wrong with the code and I have no idea about that.
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby andrewbuck » 20 Apr 2010, 22:29

I am almost certain its not in the code. The walking animations on the kobold seems to work exactly as it should as do some of the other animations. Additionally, the code I wrote regarding animation is about 10 lines, all you do is tell OGRE what animation you want it to "play" and then during the rendering of the frame you pass along the time since the last frame (which ogre gives you) so it can advance the animation state.

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Animation

Postby Skorpio » 21 Apr 2010, 15:28

I just checked the kobold's walk animation and it is different to the one in Blender. His motions should be a little bit more distinctive.

I believe the problem is in the code. I've tried already so many combinations: deleted everything in the NLA editor, shifted the actions, exported only 2 or 3 actions, arranged the strips in the NLA editor, checked both NLA modes, deleted the IK solvers, always without success. Only with a single action it works correctly. And if something was wrong with the exporter, I guess there would be more bug reports in the exporter thread.

Hmm, I just exported the pit demon only with the walk and die animations and they don't get blended together. The die animation isn't implemented yet, right? It seems to me that OGRE tries to play all (implemented) animations at the same time.

Hmm2, now I noticed that the idle animation of the pit demon is played correctly for the first 2 or 3 seconds and then it suddenly gets blended with the other animations.
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby andrewbuck » 21 Apr 2010, 23:58

Skorpio {l Wrote}:Hmm2, now I noticed that the idle animation of the pit demon is played correctly for the first 2 or 3 seconds and then it suddenly gets blended with the other animations.


This is exactly what I needed to diagnose the problem. You were right it is a problem in the code, however it looks like the NLA issue might still be a problem. When the "setCreatureAnimationState" RenderRequest was being carried out it sets the requested animation state's enabled flag to true; what it did not do was loop over all of the creature's other animations and set them to false. I added in a loop which does this and that seems to have mostly fixed the bug (the kobold dig and walk animations now look right and the dragon walks with his wings down like he should).

The dwarves and orc however still seem to be doing their weird dance where they throw their weapons up into the air and walk at the same time. I think that this is actually a result of the NLA editor and exporter interacting in a funny way. I don't have my work laptop here so I can't build a windows executable tonight although I might walk back there and get it. If I do I will try to get an exe file as well as the relevant level stuff e-mailed to you so you can try out the export of your creatures.

I apologize for doubting that the code was at fault, the ogre mechanisms for animation are so simple to use that it seemed almost impossible to mess it up, but apparently I did. The ogre documentation really should say something about the fact that enabling an animation state doesn't automatically disable the others.

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Animation

Postby svenskmand » 22 Apr 2010, 00:10

Nice to know that most of the bug has been found :) then lets hope the rest of it lies in our soup and not Ogres (and we are able to find it), else it might take some time for someone to remove it :S
Jamendo.com - The best music store on the net, uses CC licenses.
User avatar
svenskmand
OD Moderator
 
Posts: 1850
Joined: 09 Dec 2009, 00:07
Location: Denmark

Re: Animation

Postby Skorpio » 22 Apr 2010, 00:13

Ah that's great news. Now you can enable normal maps for me. :)

The orc and dwarves must be exported again because of the NLA problem. I think you can simply switch the NLA mode to single action and it should work correctly.
User avatar
Skorpio
OD Moderator
 
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Animation

Postby andrewbuck » 22 Apr 2010, 00:18

I'll try switching off NLA mode in my copy of blender here and do an export test then. That way I don't have to mess about sending exe's before I know the problem is really fixed.

Regarding the normal maps, I understand the theory behind them, however I do not know how OGRE handles them at all so it may take a while before I get them working.

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Re: Animation

Postby andrewbuck » 22 Apr 2010, 02:37

I tried re-exporting with NLA disabled and that seems to fix the last of the problems. :)

It's pretty neat to see the creatures actually attacking eachother during combat instead of just standing still while the battle happens. Thanks again for your help in diagnosing the problem, I think it would have taken me a much longer time to figure it out on my own.

-Buck
andrewbuck
OD Moderator
 
Posts: 563
Joined: 20 Dec 2009, 01:42

Who is online

Users browsing this forum: No registered users and 1 guest