How to Generate a rotating and translating camera around an object?

Hello, I am new user of TD trying to make move the camera around a geo object without luck. I saw on the forum some examples but they don’t apply to my project. Thank you in advance for any suggestions and support.

There are a number of ways to do this.

In the attached example, I used 3D parenting to parent the camera to a rotating object. In this case null_origin is at the origin (0,0,0) but you can move it to any location. The null_origin’s ry parameter is animated so the camera will rotate around it when parented. If you want it always rotating around to your geo1 no matter where geo1 is, you can use the Constrain parameter to constrain null_origin to geo1. I also set the Lookat parameter in cam1 to ‘look-at’ geo1 so the camera always faces it.

You can also use from the Palette > Tools > arcBallCamera component. The camera inside has a Custom Parameter for “Auto-rotate”. Turn this on and then when using the interactive viewer of arcBallCamera you can have it rotate endlessly around the object when you tumble and let go.

There are probably a half dozen other ways to do this, if anyone has some other examples please share.
CamOrbit.toe (11.2 KB)

1 Like

Thank you Ben for the example and explanation.
Due to my brief experience into TD, maybe I was not very clear what I am searching for.
I parented null_origin to geo1 and it makes that the object rotates around an axis to the left.
but the camera doesn’t moves from the fixed front.
When parenting null_origin to cam1, then the object rotates to the opposite side, to the right.
All this fine as it’s a new learning but what I want to try is that the camera rotates around the object, as a flying camera doing a travelling.
Regards.

The file I uploaded the camera rotates around the object unless the object moves from 0,0,0

In this second example here I Constrained null_origin to geo1 (Using the Constrain parameter as suggested above) so wherever the geo1 moves the camera still rotates around it.
CamOrbit_lockedToGeo.toe (11.1 KB)

If you are having problems with your file, please upload your example, we can’t tell what’s going on without an example file please.

1 Like

Thanxs. For some reason my project isn’t reacting in the same way as your example.
Here is the file were you can see what I mean FLYING ROCK.toe (6.3 KB)

Okay, I inspected your file and found the following.

  1. The sphere was not centered, sphere1 had a Center of 1,1,1. Changed to 0,0,0

  2. The camera was moved and rotated, this can happen if you try to use the viewer to move the camera view. You will see on the Xform page all the Rotate and Pivot values were non-default. Changed to 0,0,0

  3. I set the cam1 Look At parameter to look at geo1 so it always points towards it.

  4. Optional when moving geo1 somewhere else, I set null_origin Constrain To to geo1
    All the nodes I changed something on I gave a custom color so you can find them and compare.

Other tips when working:

  1. You can use the pane type “Geometry Viewer” to see your whole scene. I do this with a second pane by splitting the interface into 2 panes. The file attached is setup like this
  2. I also noticed you changed the size of all your nodes and made them very big. This sometimes gets new users but it’s a bad habit that makes it very hard to work in the network editor. The problem when you do this is the nodes are huge but the click points then become very small and hard to interact with, and everytime you add a new operator then it is also too small and you need to resize as well. It will drive you crazy!
    So do not resize any nodes for a while, until you creak the habit. Instead you should zoom into the network and pan & zoom to the node you want to work with. Zooming the network into inspect a node will make everything including the buttons, flags, and other click point bigger and easier to work with.
    I selected all your nodes, right-clicked int he network and selected “Reset Nodes” to get them all back to regular size, then I laid them out again to make it easier to follow.

Hope that helps, let us know if you have any other questions.
FLYING ROCK_fixed.toe (6.3 KB)

1 Like

Hello Ben. Grateful for all the detailed practical information and amendments that I have applied to my processes.
However, I have two doubts to solve:

  1. For some reason, netiher on your example, nor when applied to my project, I can reach my objective, which is to see, and export, what the cam1 views of the object geo1 surfaces during the rotation around it.
  2. About Palette > Tools > arcBallCamera component, I am sorry, but I can’t figure the way it works or connects, and can’t find in the camera the Custom Parameter for “Auto-rotate”. Send please an example to see the way it works.
  1. In the file I attached cam1 is looking straight at the object, always the result cam be viewer in the cam1 viewer or your final result which is render1. Remember, render1 is your final output. There is nothing to do, it is working as soon as you open the file.

Perhaps you are expecting that view int he 3d Viewer on the right? for that you need to set the Camera menu at the top of the 3D Viewer to the camera you want, cam1 in this case. The 3D Viewer I only opened so you can see the entire scene.

  1. For arcBall, you must drag it in from the Palette first, then go INSIDE the network and look at the parameters on the camera component called cam1.
    There is a page of parameters called Arcball on which you will find Auto Rotate.
    See image for reference.
1 Like

Perfectly exposed Ben. Thank you for your great help and your time. Now I will implement your samples to my projects and if anything arises I will get in touch again, as to learn TD by onself is sometimes tricky, mostly to have a whole picture of all the functions of the componentes and operartors. so is great to have at hand this forum. All the best!

1 Like

No problem, anytime. We are here if you have other questions!

Hello Ben, I tried but seems I leave something behind.
On [FLYING ROCK_fixed.toe] what I see is cam1 going around geo1. But how can I see and save out, not the scene of cam 1 rotating around geo1 but what cam1 in seeing during it’s rotating around geo1 and as well that the viewer can rotate with cam1 around geo1? Hope this make sense. Regards,FLYING ROCK_fixed.toe (6.3 KB)

Hello Ben, while waiting for your reply, I can send to you a clip of what I want to attain, but if it’s possible to send it by email better. Looking forward.

To view the scene through the camera in the Geometry Viewer pane, simply select your camera in the ‘Camera’ menu on the upper-left of the pane window.

I don’t know what you mean by ‘save out’? If you mean export a movie then use the File > Export Movie dialog.

Hello Ben, yes, I understand what you say and how to view or export the movie of the set I see on the render view and attached is the export movie of this example TDMovieOut0.0.mov.zip (970.5 KB) . What I want to accomplish is different. Is not a fixed camera filming all the surface geometry of the rotating object, which is ok. I need to record a rotating travelling,a subjective view. I mean by this, that the viewer moves along with the camera in the space, as in 3 D, and can watch the rotating object as he and the camera were flying. Hope you understand what I mean. Maybe with Touchdesigner you cant do that. I have a clip sample to show this more evidently, but only can send it to you by email as it’s ©. Thanks in advance for any new tip.

Please send it to our support email and I will check. It can be done in TouchDesigner, I’m sure.

I think what you are after is “3D parenting” where the transforms of one object are inherited by the children. You can set this up by using the Object COMP top and bottom connectors. Alternatively you could also setup the camera’s ‘Constrain To’ parameter to point to Astronaut.

I have demoed the 3D parenting approach in this file. parentingTransforms.toe (4.6 KB)

Thank you Ben. But I am lost and can’t see how to use the file that you sent, parentingTransforms. The clip with the astronaut I sent is only a sample of the camera moving around him that I want to accomplish, but for the project FLYING ROCK. I will give it a new try. Regards.

You can also refer to this documentation, maybe it does a better job at explaining it than I can.
https://docs.derivative.ca/3D_Parenting

Thank you Ben, I will review the documentation and try it on this confinement weeks we have ahead in Spain. Hope you are well. Stay safe, as well all of you derivate and TD followers, wherever you are!