Need help switching from Free Camera to Target Camera

Need help switching from Free Camera to Target Camera

Byteman
Collaborator Collaborator
2,593 Views
10 Replies
Message 1 of 11

Need help switching from Free Camera to Target Camera

Byteman
Collaborator
Collaborator

I need to look perpendicular to the ground while at some frame, start diving towards the ground like in a helix path. 

During the circular diving motion I need the camera to look at a constant central point.

 

First perpendicular look requires a Free Camera, as target Target Camera has flipping issues looking straight up or down. But with the Free Camera it is hard to control looking at the center. 

 

I have aligned a target camera to match the orientation of the Free Camera manually with the Roll parameter. A little motion to the Target Camera changes the Roll angle drastically causing the flip effect. 

Byteman_0-1736960825758.png

The placement of the camera in Top View

 

I need to switch to target camera at one point smoothly.

Tried linking the Target Camera's components to a Dummy to turn it into a type of Free Camera so that I can align it to the perpendicular Free Cam. It works on one axis but not the side axis. 

 

I looked for the Quaterion Rotation Controller thinking it has something to do with the Euler Axis Orders. Couldn't find it either.

 

Any help is appreciated.

0 Likes
Accepted solutions (1)
2,594 Views
10 Replies
Replies (10)
Message 2 of 11

MartinBeh
Advisor
Advisor

Maybe you could create the animation with a dummy object and a LookAt constraint (which allows you to specify an Up node) and link a Free camera to that?

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes
Message 3 of 11

domo.spaji
Advisor
Advisor

Asign standard "look at" ctrl to  camera

0 Likes
Message 4 of 11

Byteman
Collaborator
Collaborator

Look at constraint essentially makes it a target camera and the same happens. It may be about controllers. There was this quaternion rotation controller in 3dsmax. I don't seem to find it. Does it have a different name or am I confused?

0 Likes
Message 5 of 11

MartinBeh
Advisor
Advisor

The lookat constraint has additional options that help with the gimbal lock which the lookat used by the target camera does not.

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes
Message 6 of 11

leeminardi
Mentor
Mentor
Accepted solution

The TCB controller for rotation essentially provides quaternion control (i.e., a vector and rotation angle).  I don't think that is the problem here. You can use a LookAt constraint but you will not have control of which way is up.  The camera's inclination angle is defined by its Y axs the direction to the top of the camera's view. A transform script cud be used to provide a LookAt feature but with the added control of inclination but you would need to describe how "up" changes as a function of the camera's position on the helix.  For example, should the subject appear ro spin as the camera gets closer? 

The attached file uses just a simpe LookAt constraint. 

lee.minardi
Message 7 of 11

domo.spaji
Advisor
Advisor

@Byteman wrote:

Look at constraint essentially makes it a target camera and the same happens.


I dont guess answers and dont answering questions if dont know the answer.

 

Transform "Look At" ctrl and (suggested) "look At" constraint are different ctrl-ers

With "look At" constraint you can easily control all 3 axes

 

Message 8 of 11

Byteman
Collaborator
Collaborator

@leeminardi I've accepted your message as solution because it cleared some of the things in my mind but I'm still looking for the path to move on. Ive attached a small selection of the scene objects required to  clear what I'm up to. 

 

Normally I'd love to move on with the free camera but I don't have control to achieve smooth circular motion with that. You'll see why I need a free camera but until  frame 550. I'm following the creation of the company logo from a perpendicular angle. I can switch to target camera at any point at some lower angle but still couldn't achieve a seamless switching. 

 

 

0 Likes
Message 9 of 11

leeminardi
Mentor
Mentor

@Byteman Can you post a 2024 compatible version of your Max file?  I think I have a solution but would like to tst it out on your file.

lee.minardi
0 Likes
Message 10 of 11

leeminardi
Mentor
Mentor

@Byteman, first off, thanks for motivating me to install Max 2025.  

 

I looked into @domo.spaji suggestion to use a LookAt constraint to control all 3 axes but did not get very far.  Perhaps he can provide some tips. It might yield a more practical approach.

 

I took an unorthodox approach and decided to define the transform matrix of  a free camera where:

   Its Z vector is defined by a vector going from a target point to the camera (a camera points in the negative Z direction)

   The twist (rotation about the Z axis) is controlled by the location of an independent point.

 

Here's the transform script for the camera.

pa = interpCurve3D curve 1 (0.01 * pt1_percent)
zdir = normalize(pa - target)
p = pa + (dot zdir (twistPoint - pa)) * zdir
ydir = normalize(twistPoint - p)
xdir = normalize(cross ydir zdir)
(matrix3 xdir ydir zdir pa)

 pa is the location of a point on line003.  I tried to use a path contraint for the camera but this interferred with controlling the x vector of the camera.

p is the projection of the twistPoint onto a line defined by the z axis of the camera

 

The camera always points at the target point and the twist is defined by the location of twistPoint relative to the z axis of the camera.

 

Try moving twistPoint and see how it changes the camera view.  I thought you might be able to keyframe the location of twistPoint to yield the viewing orientation you want.

leeminardi_0-1737132145998.png

 

 

 

lee.minardi
Message 11 of 11

Byteman
Collaborator
Collaborator

I appreciate your time and effort. Trying to catch deadlines I could only find time to respond. Thank you all.

 

Focusing on several objects on arch scenes at the same time, I often feel I'm missing things in front of my eyes. How hard could it be, to align two animated cameras so that I can switch from one to the other at some frame? Whatever I do I notice a jump. Tried to capture the target of the free camera from the point object, created keys from the motion panel, not surprising but I was shocked to see the point target's position keys were relative to the free camera itself 🙂 essentially at the same point. That's why I have to look at the script solution later. I see from the expressions that a script could help me solve the frame by frame alignment of the roll parameter I've been trying to do, but my feet are going backwards there.

 

I have to keep both cameras separated -while aligned- to keep seamless motion at the frame of switching cameras, because I know I will change the motion path of one of them unintentionally and spoil the entire motion. I guess I need to sleep. 😪 I'll keep you posted.

 

0 Likes