Up_Vector Disorientation
Posted: 23 June 2022 09:36 AM   [ Ignore ]  
Total Posts:  72
Joined  2019-07-21

Project attached

I built a camera rig to lift a camera from horizontal to straight-up vertical over a map while tracking a target. Everything works fine up until about 80 degrees vertical when the target up vector causes the camera to lose orientation. Is this related to the dreaded gimbal lock problem?

I have tried relocating the up vector object in various ways to try and avoid the “double-90” problem (camera and upvector cancelling each other) but nothing seems to work. I can fix it manually, but I prefer the simpler approach.

Any suggestions?

File Attachments
UpVector Troublershooter.zip  (File Size: 347KB - Downloads: 13)
Profile
 
 
Posted: 23 June 2022 10:43 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  11628
Joined  2011-03-03

Hi fordmar,

Select the “UpVector” named object and in the Coordinates type in P.Z 12345, perhaps P.Y 123456

That should work. Smaller values will give a little wiggle during the last frames.

I have changed the end of the zCamY rotation a super tiny bit. It leads otherwise to a little swing on the last frames. Now the camera view lands smoothly. Perhaps that is not wanted…

Your file:
https://www.amazon.com/clouddrive/share/S81nBVphPNy75DMmBp4HvLeCaOo7SKEev4Ghqx97sl1

Is that working for you?

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 23 June 2022 12:00 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  72
Joined  2019-07-21

Fantastic!

I set the UpVector Z and Y values as suggested, and it fixes the landing alright. But at the first keyframe the camera R.B axis is tilted off horizontal by about 3 degrees - which isn’t a lot but enough to notice if the horizon is in view. As a workaround I set the UpVector P.Z to zero at the first keyframe, and 12345 at the last, which seemed to straighten it quite a bit. I was able to get it even straighter by increasing the UpVector P.Y to 19000. It’s more keyframes than I wanted, but workable.

I don’t understand what the Film Offset is doing, but it works!

Profile
 
 
Posted: 23 June 2022 12:12 PM   [ Ignore ]   [ # 3 ]  
Total Posts:  72
Joined  2019-07-21

The UpVector relationship is a bit mysterious to me. I get that the Y displacement is tied to the overall size of the camera path - i.e. a larger path needs a higher “pole” to aim at. I would expect that moving in the Z direction would pull the camera off axis by the end. But it appears rock steady. Is the camera just looking at the center of the UpVector? The geometric size of the UpVector is irrelevant?

Profile
 
 
Posted: 23 June 2022 01:47 PM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
Total Posts:  11628
Joined  2011-03-03

Hi fordmar,

Please have a look here
https://www.amazon.com/clouddrive/share/WQzM4Qd83cBv3Rw09WNqOCacgCq5q3ubMDXMJ0lwM6f

Any object in Cinema 4D uses the world origin as a parent. In this example, the zCam-Pivot is the world for the camera. It moves the up-vector in the same way as the camera while keeping the target in the exact center.

(File o1 from above—I sometimes use 123 or 123456 to clarify that I mean 3 or 6 digits. You mentioned 19000, and I tried 12345, and it had some trouble, So I increased it.)


Enjoy.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile