Follow Path + Track To Constraints

Hi everyone,
I have two issues related follow path + track to contraints on my camera.

  1. At the end of path, camera flips almost 180°. Why this flip happening and how to prevent that?
  2. Funny enough, my desired camera rotation is the one after it flips. But I can’t get it from the beginning no matter which X,Y,Z combination I tried. How to achieve this rotation?

Here is the test blend file if you want to take a look: contraint_issue.blend (729.5 KB)

GIF

can you post your constraints settings?

I somehow missed that you posted a link to your file.

Use “Damped track” constraint instead of “track to”. There shouldn’t be any flip after that.

Cheers

2 Likes

Thank you for the reply @jerzygorskiart , I tried Damped Track and it indeed fixed the flipping issue. And interestingly I also now can use the “Mean Tilt” of the curve in order to rotate the camera as I desire. Does mean tilt not supposed to work when Track To constraint used? Might this be a bug?

1 Like

I used the Clamp To Path constraint (because I can’t for the life of me figure out the obtuse Follow Path settings), and the Damped Track modifier also solved my issues with the Track To flip issue! :+1:

E1

E1-2

1 Like

“Okay, I’ll bite …” exactly what is causing that Empty to “flip” in the preceding post?

just a guess but most likely thats the point where the curve twists connecting the start and end verts/

1 Like

Sorry, no twist/tilt. However, it does pass straight above the first empty… which means it probably goes from 0 to 360 degrees… probably a flaw in the Blender implementation (that they will adamantly defend is technically correct and definitely not a bug, even though no user will experience it that way). :see_no_evil: :hear_no_evil: :speak_no_evil:

1 Like

It honestly looks like gimbal lock to me, which isn’t a blender specific thing but a difficulty that comes with all non-quaternion rotation

1 Like

That’s the technical reason I was talking about… as an end user, I couldn’t care less: It doesn’t behave as expected, fix it. :wink:

1 Like

But… you mathematically can’t… it’s a geometric limitation of any three-axis rotation system… ah never mind, go wild, make a feature suggestion on https://blender.community/c/rightclickselect/ :slight_smile:

1 Like

Well, the wonderful thing about computers is that they can do anything these days, as the Damped Track modifier shows.

And I already have my outlet for suggestions that nobody reads (just like the site in your link, which nobody reads): :rofl:

It’s not that deep, man, take a few deep breaths and a good step back. You’ll feel better, I promise.

There’s really no good reason to be rude to people that are helping you on the internet for free, but whatever makes you happy :slight_smile: I hope you’re able to find a good solution to your problem!

1 Like

Haha, computers can do anything but many time the users don’t know how to properly use it…

Strangely enough, I think that’s how tracking is supposed to work. There are some similar issue with IK . The tilt can’t accurately be found. You can either let the constraint try to accommodate for that, but at some point the tilt can flip direction.
There is also the possibility to control the tilt with the target using target Z option,
Damped track give less predictable results but is a bit limited, and you can also get weird tilting while using it.

In maya there is the camera + aim + up setup that fix that issue. They add a second empty that set the up vector like the pole target of an IK rig. I’m sure it’s possible to do the same in blender.

If you know the maths to get to a better result, then maybe YOU should fix it, it’s open source software after all. If you don’t, then maybe you just don’t know what you’re talking about.
If you don’t care , why the software of developers should ?

3 Likes

Do you know if the ability to add an up vector target to the camera has been added to Blender yet? I operate robots and I’m exporting the camera data from Flair (software used to control them) and I programmed everything in “roll up” mode which comes with an up vector target. I have the data in Blender but it’s currently just 3 points that don’t contain any rotation data, just XYZ. I’m able to easily ‘copy location’ of the flair_camera and ‘track to’ the camera_aim but I’m not sure how to use the ‘camera_up’ right now since there doesn’t seem to be any sort of object constraint that allows me to use the up target.

The move required “roll up” in Flair which turns the camera into a 3 node camera with an up vector target because I went beyond 90 degrees on the tilt axis which means my horizon would have flipped upside down. All the reasons you guys listed above are accurate and they’re not specific to Blender. These would happen in the real world as well with real robotic cameras. You need that up vector target to tell the camera not to flip. In fact, it’s a safety thing with cinema robotics because if you give the robot a choice as to which way the horizon could go, it can send one axis to positive infinity and the other to negative infinity to try and solve it which can be very scary and violent. Especially with high speed robots.

1 Like

Hello and welcome to the forum !

you can try this setup and see if it works for you :

Nothing was added to camera recently but I’d be surprised if a constraints combo can’t do the trick…
Worse case scenario a bit of python could help to recreate the camera transforms, that could be the opportunity to look into that :slight_smile:

Good luck !

1 Like

Thank you for this!

I ended up using almost that same exact constraints combo. I used ‘damped track’ for aim and ‘locked track’ for up and it worked!

I also found a sweet tutorial that allowed me to create an addon that uses python to add the maprange function to drivers. I’m able to export zoom data from Flair as well but it just came in as a point moving up and down the X axis. So I have an addon now that allows me to essentially encode the values and use it as a slider that drives the focal length of the camera.

Everything appears to be working really well now!

1 Like