Search Unity

New User and I'm finding the track/cart dolly system frustratingly difficult to work with

Discussion in 'Cinemachine' started by mykillk, Feb 14, 2019.

  1. mykillk

    mykillk

    Joined:
    Feb 13, 2017
    Posts:
    60
    So I've decided to work on my opening cutscene, which involves fairly slow movement down a dolly track. Cinemachine 2.2.8 on Unity 2018.3.

    This has been a frustrating experience so far, and I don't understand why this is so difficult. First I started with the default Cinemachine Smooth Path. I don't like it at all for a couple reasons:

    • It extrapolates where it thinks a freshly added waypoint should go, which is usually not even close to where I want it to be, and it's a real pain to go track it down and try to move it to where I want it to be. Trying to position these things in 3d space is not easy... I would rather it be created close to the previous waypoint.
    • But the part which makes it unusable is the path it generates. The bezier curve interpolation makes the path go wayyyyyyyyy off track. It's basically impossible to make a path that even comes close to how I want it to look. Not sure why this was made the default...
    So I eventually found out about the regular Cinemachine Path. Using this I was able to create a path that was how I wanted it to be. But now I have a new set of issues:

    • The distances between waypoints on my track range from huge (hundreds of meters) to fairly small (a couple meters), but the resolution setting does not take this into account. So the resolution on the longer sections is very low, whereas in the short sections the resolution comes out extremely high. This makes the Path Units feature for controlling speed not all that useful. It would be great if there was a setting to adaptively set the resolution based on the section length so that it's the same in each section.
    • It's not clear at all why there's both a Cart that you have to set up, and then use the "Follow" target on the Cinemachine camera, but then also a "Tracked Dolly" option on the Body with an Auto Dolly option. What am I really supposed to use for this?
    • The camera is quite jumpy when transitioning from one waypoint section to another. I've spent hours trying to figure out why it's so jumpy to no avail. And it doesn't make sense to me, the track at this waypoint transition is only making a minor dip down and a slight turn to the right. It's a very very minor change in path and yet the camera wants to bob around very noticeably when it hits it. Why isn't there at least an option for a smooth, natural blend from one track segment to the next?
    On top of this, the other issue I'm having is controlling the speed of the dolly cart. Is there a different component for doing this or something? I don't understand why there doesn't seem to be anything at all for controlling speed with this tracked dolly functionality, other than either specifying an overall speed in distance or path units. But I need to change the speed as it moves down the track and I'm not seeing any options to do this which just seems like a huge hole of missing functionality. I've worked around this by creating my own component that allows me to specify a List of Path Positions and the speed changes at those positions. But there's no smooth lerping so it's all very sudden and jerky.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    The Resolution only controls the number of straight segments that the path segments get divided into internally. This affects display in the scene view, and accuracy when finding closest point on path. It has no impact on the meaning of path units, or on speed.

    Path Units really are only useful in situations where the waypoints represent significant locations on the path, and some constancy in the numbers is required. Usually, people find Distance units or Normalized units to be more friendly for most purposes.

    The cart is only there for people who want Path functionality outside of the virtual camera system. It's just a way to have something follow a path. If you're using vcams with Tracked Dolly, then you don't need the cart, as the vcam itself knows how to follow the path.

    If you would give some more details of what exactly you're trying to achieve, I could perhaps advise you about the best approach.

    The vcam or cart will almost certainly jump between segments if you're using Path units. Best to use Distance or Normalized units.

    Another problem you might be having is making the tangents such that the path curve is not continuous in the second order. If you have a camera on the path and it goes around such a curve, the transition into the curve can appear very mechanical. You need to have the right kind of smoothness, but unfortunately mathematics says that you can't have that without also affecting the shape of the curve. That's difficult to get, and it's what SmoothPath does for you. That's why it's the default.

    That said, I'm not exactly sure what the issue is, as "bob around" is not the most precise description :)
    Maybe you could post a video or something that better illustrates the problem?

    So, the cart lets you specify a speed (which you can animate or otherwise control from a script) or, if you prefer, you can just animate the path position and not use the speed. The TrackedDolly vcam also has a position field that you can animate, but it does not have a speed. Very easy to add a little script to animate the position at whatever speed you like, or to do it directly from timeline. Alternatively, you can use the vcam's auto-follow feature to track a target object that you animate.

    Again, without knowing more details about your application, I can't recommend a choice between cart or vcam.