x


Animation speed problems - Unity slower than Blender

I have a Blender animation that is 120 frames long - which, at 30 frames per second, obviously takes 4 seconds to run. But in Unity, it takes 8 seconds to run. Any suggestions as to why?

I have tried setting the Application.targetFrameRate to 30, with no change. In fact, regardless of whether I set targetFrameRate or not, the animation takes twice as long, in both a web Browser, and standalone Executable.

According to the FPS script I got from the Wiki, my executable (and browser) are running at 70+ frames per second when I set tFR to 30 (so I guess tFR sets a minimum, not a cap). But even if that's correct - for a 120 frame animation, shouldn't it complete twice as fast, in 2 seconds? Why would it take 8 seconds?

I have put a .zip file containing both my original Blender model, and a simple Unity package running it, on the Forums at: Animation Speed Problems, should anyone care to examine it.

Update - well, the answer, such as it is, is that the animation (and HTML) plays fine on every machine - except mine. I have run the HTML locally in all of Opera, FireFox, and IE, and it takes 8 seconds. I have run the HTML from my dedicated server, same result. But when I Remote Console into my dedicated server, and run IE there - it takes only 4 seconds. And it's 4 seconds on Eric5h5's machine, using my HTML file.

So, something on my local machine is causing all three browsers to run the animation at half-speed (yes, even in full-screen mode). I realize it's no longer a Unity issue, but any suggestions as to why, are welcome. I'm running Windows XP/SP3 on an Intel dual-core, so the machine should be fast enough. I also have an NVidia GeForce 7600 GS (with default settings), and DirectX 9.0c.

more ▼

asked Mar 21 '10 at 11:22 PM

Cyclops gravatar image

Cyclops
7.1k 33 63 115

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Application.targetFrameRate is for how many frames per second the entire app is allowed to run at maximum. How many frames per second your game is running has nothing to do with animation speed, which is framerate-independent.

At any rate, your model takes 4 seconds to play when I import it into Unity. Maybe you have Time.timeScale set to .5.

more ▼

answered Mar 21 '10 at 11:32 PM

Eric5h5 gravatar image

Eric5h5
80.1k 41 132 519

@Eric5h5, my Time.timeScale is 1, and I haven't changed any other parameters in Unity, this is a new project with only the animation in it. So why does my executable take 8 seconds to play it?

Mar 22 '10 at 12:28 AM Cyclops

@Cyclops: As far as I know, it doesn't...I imported the Unitypackage in your link and the animation takes 4 seconds to play. Do you have a built version in a webplayer?

Mar 22 '10 at 01:39 AM Eric5h5

@Eric5h5, I both built a standalone (Windows) executable, and an HTML version (browser Opera). I timed it with a stopwatch, and it takes 8 seconds to completely circle the clock, in both versions.

Mar 22 '10 at 01:48 AM Cyclops

And I just checked the HTML in Firefox, just in case... 8.15 seconds...

Mar 22 '10 at 01:51 AM Cyclops

Sigh... I decided to remove the targetFrameRate = 30. And it sped up the standalone executable to 4 seconds. But both Opera and Firefox are still running at 8 seconds. So now my standalone and browsers are out of sync again... :(

Mar 22 '10 at 02:03 AM Cyclops
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3768
x721

asked: Mar 21 '10 at 11:22 PM

Seen: 2791 times

Last Updated: Mar 22 '10 at 03:55 PM