Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Animated 3d model (FBX format) gets stuck in running animation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 lougv22   Members   -  Reputation: 230

Like
0Likes
Like

Posted 13 May 2012 - 12:34 PM

I am working on a simple third-person shooter game in XNA 4.0 Refresh and my character gets stuck in his Run animation. He takes about 2 steps and then kind of freezes for 15 seconds, then he takes another 2 steps and freezes again for 15 seconds and so on. I viewed the model in a FBX viewer for QuickTime and it did the same thing there so that leads me to think it's not something I am doing, but I can't be sure.

All the coding is done in Visual Studio 2010 Express, on a Windows 7 machine, using XNA 4.0 Refresh. I have my own custom Animation Writer and Reader.


Here is what the beginning frames of the animation look like:Posted Image


And this is the pose that he gets stuck in for 15 seconds:


Posted Image


I've attached my AnimatedModel class in case somebody would like to take a look at it. Anybody has any idea what the problem might be?

Attached Files



Sponsor:

#2 lougv22   Members   -  Reputation: 230

Like
0Likes
Like

Posted 17 May 2012 - 07:37 PM

Well no one seems to know the answer to this, so I am just going to post the solution I came up with. I found out that all 4 of my model's animations were imported with a duration of 12.5 seconds. I also found out that for the Run animation, the actual running part only spanned the first 1.32 seconds, the rest was him just sitting there looking like frozen in time. So what I did was simply reduce that animation's duration to 1.32 seconds and that seemed the solve the problem, i.e. he is running normally now.

This is all I had to do (in my AnimatedModel class):


// Reduce the duration of the Run animation for the Marine model, otherwise he gets
// stuck for most of it
if (modelFileName == "PlayerMarine")
	 _animatedModelData.Animations[1].Duration = new TimeSpan(0, 0, 0, 1, 320);


#3 hupsilardee   Members   -  Reputation: 487

Like
0Likes
Like

Posted 18 May 2012 - 06:40 AM

That's a pretty ugly hack/fix. What happens if every file needs a fix like that? The root problem is most likely in the FBX exporter, based on Quicktime giving the same problem. See if you can fix that.

Also, that's a really nice asset, where did you get it?

#4 lougv22   Members   -  Reputation: 230

Like
0Likes
Like

Posted 18 May 2012 - 08:06 AM

Well the thing is that I didn't export the model, I simply downloaded it from the website for a book I am reading (apress.com), so I have no way of re-exporting it or of fixing any problems there might be with the model itself.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS