• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Cyclops · Mar 21, 2010 at 11:22 PM · animationblender

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Eric5h5 · Mar 21, 2010 at 11:32 PM

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.

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Cyclops · Mar 22, 2010 at 12:28 AM 0
Share

@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?

avatar image Eric5h5 · Mar 22, 2010 at 01:39 AM 0
Share

@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?

avatar image Cyclops · Mar 22, 2010 at 01:48 AM 0
Share

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

avatar image Cyclops · Mar 22, 2010 at 01:51 AM 0
Share

And I just checked the HT$$anonymous$$L in Firefox, just in case... 8.15 seconds...

avatar image Cyclops · Mar 22, 2010 at 02:03 AM 0
Share

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... :(

Show more comments
avatar image
1

Answer by meat5000 · Aug 31, 2013 at 12:22 AM

A LITTLE NOTE FOR BLENDER USERS - NO WORKAROUNDS NEEDED

alt text

Outlined in RED. This DOES make a difference when outputting your animations. It is set to 24fps by default. I like to use 60fps but Android likes 30fps


framerate.jpg (137.6 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Panopolos · Aug 31, 2013 at 12:17 AM

This happens to me too with some of my animations, but not all. I have zero idea what causes it, but a simple workaround for animations that do come in sped up or slowed down is to use animation["animationName"].speed = x;, x being used to compensate for the speed disparity. So in your case maybe

animation["spin"].speed = 0.5f;

or something like that.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Huge problem with character animations. 0 Answers

Generic root motion jitter? 0 Answers

Blender Animation Problems 3 Answers

FPS Bow Animation 0 Answers

Unity not importing blender animations at all 7 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges