x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Sequencer Bug: Camera Rotate

Howdy,

I set up a simple camera dolly and pan move. Essentially, the camera moves from a 3/4 angle on one side of a character who is standing still to the other side with the lens pointing at the face of the character the entire time. According to the info on the beginning and end keyframes, the camera has rotated on the Z axis from -160 to 163 degrees. The resulting move has the camera spin all the way around before landing on it's end spot, instead of a small pan to stay locked on the character.

The camera move was done within the editor. The solution was to then go into the sequencer and manually change the end z rotation value to a matching negative value.

-Sterling

Product Version: UE 4.11 Preview
Tags:
more ▼

asked Dec 26 '15 at 08:51 AM in Bug Reports

avatar image

SterlingY
210 28 34 49

avatar image Rhinoskin Jul 07 '17 at 11:03 AM

Yes thank you all. If you rotate via the sequencer it works as intended.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

5 answers: sort voted first

Hey SterlingY,

We have an existing bug report for this(UE-22228) and I've added your observations as well. I'm hoping to bump the priority on this considering it works in Matinee.

-Matt W.

more ▼

answered Jan 05 '16 at 12:14 AM

avatar image Diego_Visualma Jun 21 '16 at 12:41 AM

Hello,

I think the issue SterlingY is finding is actually gimbal lock or related to it, and also a difference between angles and quaternions in math, and the fact that you guys should be doing a spherical interpolation instead of a linear one (and using quaternions behind the scenes, instead of angles).

First off, imagine your camera makes a small rotation of 10 degrees. It will go from -5 to +5 on the Z axis. Making a linear interpolation will give you the result you want (-5,-4...0,...5) and take the shortest route. On the other hand, suppose you want to make the exact same movement, but with the camera going from -360 to 5. It is essentially the same case, ej: you may want to take the shortest path and only do a 10 degree rotation. 5 degrees can also be expressed as -370 (it will point in the same direction in both cases). But you will see your camera messing up because there is no -370 angle. What you will see is the linear interplation of -360, -359, etc going all the way back to 5 and passing trough 0. Meaning your camera will make a full rotation (taking the longest route).

Also to complicate matters, in 3D, the order in which you apply your rotations (ej: first apply x, then y, then z), matters a lot. Changing this order will give you different orientations for the same values on x, y and z. There is an inherent ambiguity in the meaning of an orientation as expressed in angles. So you always have a fixed order hard coded in the program (ej, the program selects the option that it thinks fits, eliminating the ambiguity, but that option might not have been the one the animator wanted). The last axis in this order (namely, the z axis) is the one that will always be presenting a breaking axis (seen as a hard break in the rotation graph) or bad interpolations, and not necessarily on the -360 and 0 limit, but on other points as well (commonly every 180 degrees).

avatar image Diego_Visualma Jun 21 '16 at 12:41 AM

That is called gimbal lock, and I urge you guys to look into it for your implementation of cameras in sequencer. This is a common problem in 3D animation. I have seen it happen for example in After Effects or C4D. And there are fixes for it, namely using quaternions instead of angles and allowing the user to select the up vector (more of that in a moment).

Quaternions don't have that problem. There is no ambiguity or multiple interpretations on the orientation represented by a quaternion, making them ideally suited for 3D graphics. They are not as intuitive to the user, but can be converted back and forth for display and user interaction (so the user only sees angles in the front end).

Linear interpolations are not a good way of interpolating orientations in 3D because of the case described in the beginning of the post. Spherical interpolations always take the shortest route and they should be what is used to interpolate rotations. Spherical interpolations or slerps need quaterions as inputs.

Matinee also had this problem of breaking axes and gimbal lock. But it had a checkbox on the camera track that said "use quaternions" that essentially used spherical interpolations instead of linears, the downside being that for some reason that disabled smoothing and only allowed linear temporal interpolation (making your animation feel bumpy). The reason behind that limitation is beyond me, because every other implementation I have seen (AE, Maya, C4D) allows for temporally smooth spherical interpolations, so I am betting your implementation could be better.

avatar image Diego_Visualma Jun 21 '16 at 12:42 AM

Now, there may be cases where you dont want the shortest route between two angles. You might actually want your camera to turn all around and not take the shortest route, so forcing you to use slerps will not make sense in every case. One alternative is what matinee used to do (putting in a checkbox that essentially allowed you to select lerp or slerp on a per-track basis) but that is limitting.

Other alternative and the best solution I can think of is to allow for angles lower than -360 and higher than 360. After Effects does this. It will represent angles as x(rotations) + (degrees). So, 10 degrees would be 0x + 10, 360 degrees would be 1x + 0, and 480 degrees would be 1x + 120. It is legible to the user and keeps being so even tough you might input a crazy angle with thousands of units.

Lastly, the problem of gimbal lock is best solved when you allow the user to define what axis he wants as the up vector. That gives the user the most power and versatility around the problems inherent in the gimbal lock.

Sequencer can be an incredible tool. It is already, in many ways, leagues ahead of matinee. But the camera control outside of a rig is still problematic, has always been so, and without even the partial solutions of the use quaternions checkbox, it seems even worse.

Please, please, please, I urge you, guys. Give us control over the way our camera interpolates orientation. If you want to put sequencer cameras as a tool on par of those of 3D suites, you must solve this problem. And it is as simple as using spherical interpolations when needed, allowing us to make full rotations and angles outside the 360 degree range, and allowing us to select a custom up vector for the cinematic camera actor.

I hope this information helps in some way to improve sequencer.

avatar image Matt.Williams Jun 24 '16 at 05:19 PM

Hi Diego,

I've forwarded some of your concerns to a dev. However, I'd like to note that this user's issue is not related to gimbal lock. Thanks for posting some suggestions though.

-Matt W.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

If anyone is still running into this problem, it was fixed very easily for me by editing the rotation animation in the curve editor - here you can easily drag the keyframes beyond the 180 degree limitations of the viewport...

more ▼

answered Oct 06 '17 at 01:32 AM

avatar image

error406
21 1 3

avatar image BenjvC Nov 30 '17 at 11:56 PM

Brilliant. Thanks for that last tip, this issue has been driving me nuts.

avatar image teho Mar 09 '18 at 09:05 AM

Thank you, it helped!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

This is what I mean

alt text

more ▼

answered Jun 26 '17 at 08:58 PM

avatar image

Etienne Andlau
136 3 5 9

avatar image nameLive Dec 18 '18 at 10:21 PM

Wow this actually fixed it!! Probably because you can put the Z value higher than 360 or whatever but when you are piloting it and using those transforms you are limited to them. If you have your camera on pilot you can still See where you're dragging it around making it suprisingly easy by just increasing/decreasing those values.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
more ▼

answered Apr 18 '17 at 06:19 PM

avatar image

Etienne Andlau
136 3 5 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

has this been resolved?? we are having the same issue. The camera doe not rotate as needed . It always rotates in a anticlockwise fashion only allowing us to animate the camera turning right and not left

more ▼

answered Jun 26 '17 at 02:58 PM

avatar image

Rhinoskin
11 1 2 2

avatar image Etienne Andlau Jun 26 '17 at 08:49 PM

Hi. What worked for me is that you set the transforms for the cine camera INSIDE the Sequencer interface window. Don't try and drag the camera in the viewer with its widget around. Set the numbers manually and it should be fine.

avatar image TommyBoy 23 hours ago

Wow.. this issue is still around. I was just prepping for a training session in Sequencer and the second keyframe I created using 's' made the camera rotate on Z like 3 times inbetween. So no, this is still a thing in 4.22.3.

avatar image Etienne Andlau 23 hours ago

I got around it by using the rotate transform inside the Sequencer UI (not using the widget in the viewer). Its harder to get it accurate but it works. :-)

avatar image TommyBoy 23 hours ago

Yeah.. mine happened while piloting a camera... very simple rotate move. I can fix these in the graph editor but they should never happen imo.

avatar image Etienne Andlau 23 hours ago

It has to do with the algorithm they use for the rotation and why they chose the ne they are using. Here is more info: https://en.wikipedia.org/wiki/Gimbal_lock

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question