Search Unity

Dolly camera stutters instead of moving smoothly

Discussion in 'Cinemachine' started by protemus, Sep 26, 2018.

  1. protemus

    protemus

    Joined:
    Dec 5, 2017
    Posts:
    3
    So I am trying to create some flyby animations with cinemachine (what I would consider a very basic use of cinemachine) and I simply cannot get the camera movement to be smooth.

    The camera is moving quite slowly so I don't know if that has anything to do with it. I also changed the project to be an iOS project. Other than that I completely recreated the project from scratch being careful to keep all the default settings for everything. I only changed enough to add my objects and timeline and animations. And pulled only enough geometry in to show the jitter.

    Here is a video of the stuttering I am talking about:
    http://www.familymcbride.com/familymcbride/jitterclip.mov

    Here is a stripped down project that has the issue:
    http://www.familymcbride.com/familymcbride/BunnyBook3D.zip

    Any idea what might be going on here? I updated every single component in the sample project so it is using all the latest versions of everything. (including unity itself).

    I have tried every setting I could think of in both cinemachine and the camera and nothing seems to get rid of it. Some lessen it to various degrees, but none to a degree I would consider acceptable.

    I would appreciate any help anyone could give...

    Thanks,
    Sean
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    I see a few potential issues in your project.

    1. Don't animate the vcam on the physics clock. Use the normal clock:

    upload_2018-9-26_10-46-58.png

    2. Change the dolly position units to Normalized. Path Units will not give you a constant dolly speed, given the mathematics of bezier curves. Distance and Normalized units are designed to counteract that.

    upload_2018-9-26_10-48-24.png

    3. When you change to normalized units, you'll have to adjust the animation curve too. Edit the key so that the end point value is 1:

    upload_2018-9-26_10-49-58.png

    4. Finally, increase the path resolution for maximum smoothness (not strictly necessary, but if performance is not an issue, why not):

    upload_2018-9-26_10-51-27.png

    I get butter-smooth motion in your scene after making those changes.
     
    spikezart likes this.
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    One more thing: since you're hard-animating the path position, you can turn off the damping. This will further protect you against any jitters introduced by an inconsistent framerate.

    upload_2018-9-26_11-19-54.png
     
    spikezart likes this.
  4. protemus

    protemus

    Joined:
    Dec 5, 2017
    Posts:
    3
    Thanks Gregory!

    I made those changes and they made a small bit of difference but not much. Then I decided to test it out on an actual device. Guess what? Butter smooth. Is there some reason the play button would not accurately represent deployment to an actual device? Obviously my machine has waaaay more processing power than my phone... I understand one is a debug run and the other is a release deployment but surely that wouldn't make such a huge difference for such a simple use case?
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    There's a lot of overhead in the editor, and it can cause framerate spikes and glitches, to which your shot is particularly sensitive. Which version of Unity are you using?
     
  6. protemus

    protemus

    Joined:
    Dec 5, 2017
    Posts:
    3
    The latest one. My Mac is slightly old though. I just can't bring myself to buy one of the new pros. At some point it'll be a problem :) It seems to be all good as long as I deploy. Which is fine. Doesn't need to be super smooth in debug.
     
    Gregoryl likes this.