1
$\begingroup$

I have several objects on a to the camera perpendicular plane ("Objects" in the sketch below). I achieved this by placing a helper plane mesh in front of the camera, which I then used to snap my objects onto by hand.

I would like to move the objects to a precise distance $x$ from the camera now. I understand how I can change the origin for my transformation 1, allowing to do relative, precise positioning. How can I do this in absolute terms to the transformation origin?

Thanks already 🙏

Sketch showing a camera pointing at a camera-perpendicular plane. The plane was used to align several objects perpendicular to the camera. How could the distance x be specified exactly in a later step?

$\endgroup$
4
  • 1
    $\begingroup$ I'm sorry, should the objects have a certain distance or is it sufficient if the plane's center is at this distance? $\endgroup$ Sep 14, 2023 at 11:59
  • $\begingroup$ Huh, that's an interesting specification of my initial question. Thank you! Let's say it is enough that all objects move only on the camera-relative Z axis. I.e., "the plane's center". $\endgroup$
    – manu
    Sep 14, 2023 at 12:04
  • 1
    $\begingroup$ Well, it's not. When the objects are not in the center, the distance to the camera is larger than the one of the plane (center). The words say, the objects should have a specific distance, the sketch says the plane should have the distance ;) So the distance of the plane right now is unspecified/unknown - you don't know how much you have to get closer to the camera from there? You just want them in a defined distance in the end position? And then it might be interesting how the plane is aligned to the camera, just manually, with a constraint, is the rotation applied or not? $\endgroup$ Sep 14, 2023 at 12:21
  • $\begingroup$ A lot of stuff to process 😂 Let's try: (1) Yes, the current distance of the plane, and with that of the objects, relatively to the camera, is unspecified. (2) Correct, I want to specify the end position of the plane, which should "bring" the objects with it. (3) I positioned/rotated the plane by copying values from the camera to the plane and moving the plane "away" on the cameras Z-axis by hand. Objects were placed manually on the plane; constraints is something I did not use at all so far. Sounds like I should...? Thank you for your time Gordon! $\endgroup$
    – manu
    Sep 14, 2023 at 12:28

1 Answer 1

3
$\begingroup$

If I understand your explanations in the comments correctly (you simply copied values from the camera to the plane and moved it away on the camera's Z-axis) then the easiest way would have been the following:

Let's say you want a distance of 5 m from the camera. While the plane was in the same location as the camera and rotated the same way, to select the plane and just press GZZ-5Return, this would have moved the plane -5 m away in Z direction (away in front of the camera is -Z).

But now that the plane is already away from the camera (but still has the correct rotation I guess from your explanations?): are the objects parented to the plane? If not, select the objects first, then the plane and press Ctrl+P > Set Parent To > Object.

Then select the camera, Shift+S > Cursor to Selected. Now select the plane, Shift+S > Selection to Cursor. After that you have the initial state of the plane being in the same location as the camera and having the same rotation, just like before you can now move it with GZZ-5Return.

parenting

cursor to camera

plane to cursor

move plane away

If you want a better solution where you can easily change the distance afterwards simply by entering a Z value for the plane, you can change the steps a little bit after you moved the plane to the camera's location:

First select the plane, then Shift select the camera and now parent the plane to the camera, but not just with Object like before, press Ctrl+P and choose Object (Keep Transform Without Inverse).

If you now select the plane and look at its Location and Rotation values, they are all 0 - set relative to the parent object. Well, sometimes there are slight inaccuracies like -0 or 0.00001 etc., but you can manually set them to 0 then.

To bring the plane now into a specific distance from the camera like e.g. 5 m, just enter -5 m into the location's Z value and change it whenever you want a different distance.

parent to camera

relative transforms

setting the Z distance

$\endgroup$
2
  • 1
    $\begingroup$ Thank you for your very thorough explanation Gordon 🙏 Stupid me did not understand that I could have nested objects within each other and benefit from local transformations 🤦‍♂️ This makes total sense. Again, thank you for your time and your very well documented advice. Cheers 🙌 $\endgroup$
    – manu
    Sep 14, 2023 at 13:32
  • 1
    $\begingroup$ You're welcome. Actually the part I added at the end I only realized later, this would have been the better answer altogether. $\endgroup$ Sep 14, 2023 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .