3
$\begingroup$

TLDR: Given an object that's within my camera view, I want to move the object exactly towards / away from the camera's "origin" such that the object will appear to remain in the same position from the camera's perspective. How can I do this?


I'm new to Blender and dabbling with camera-matching techniques to manually reconstruct a 3D mesh by matching up several static images (from an old game I love). As a first step, I'm trying to figure out how Blender's "Align to view" feature works, and having trouble.

First I added a Camera and entered "Camera view", and used shift + right click to place a 3D cursor somewhere in front of the camera. See screenshot - the left pane is the camera view and the right pane is another view from the side:

enter image description here

Then I clicked Add -> Empty -> Plain axes (the simplest movable object I can think of) and selected "Align to view":

enter image description here

As expected, the new object's local axes are aligned to the camera view. In a second viewport, I can look at the object from a different angle, and click and drag the (blue) Z axis to move the object towards and away from the camera view. But what I did not expect is that the Z axis is perpendicular to the camera "lens plane", it's not pointing directly at the center of the viewport. As a result, moving the object along the Z axis causes it to change position from the camera's perspective:

enter image description here

I also tried setting the 3D cursor to the camera (ie. the very back point of the camera) and then aligning the object to the cursor, but this seemed to have the same result: the object's Z axis was perpendicular to the camera "lens plane", rather than pointing at the cursor itself.

What I want is to align an object's axis to point exactly to the back tip of the camera (or to the 3D cursor), so that I can move the object along the Z axis without it changing position from the camera's perspective. How can I accomplish this?

I remember playing around with this on an older version of Blender in 2016, and got it to work without trouble, but Blender's UI has changed a lot since then. Note: I'm now on Blender 2.91.2 on a Mac, if it matters.

$\endgroup$
0

2 Answers 2

3
$\begingroup$

if i understood you right, you want to change the axis from global to local.

enter image description here

Then select your camera and press G and Z. Now you can move the camera by moving your mouse and it is just zooming in and out now.

UPDATED ANSWER:

ok, now you have an object and your camera in the right position and rotation so that you see your object perfectly through your camera.

Now select your camera and tap on "local"

enter image description here

then tap on "+"

then you got this

enter image description here

then tap on your object and with G -> Z you can move your object as you wanted.

Viel Erfolg! ;)

$\endgroup$
8
  • $\begingroup$ Thanks @chris, but that doesn't seem to do much. Adding a fresh object and selecting Align to transform orientation -> Local doesn't seem to have any effect (it looks the same as global orientation). Pressing G then Z is a great shortcut (thanks) but again, the Z axis (or any axis) isn't pointing directly to the camera's "center", rather it goes off to the edge of the camera viewport. $\endgroup$ Commented Feb 1, 2021 at 13:15
  • $\begingroup$ Also it's very likely that I'm using the wrong words to describe what I'm trying to accomplish; I'd be grateful for any tips on how to rephrase the question. $\endgroup$ Commented Feb 1, 2021 at 13:16
  • $\begingroup$ what do you mean with "align to view" ? do you mean "align active camera to selected"? align view to active? $\endgroup$
    – Chris
    Commented Feb 1, 2021 at 13:22
  • $\begingroup$ My end goal @chris is to move an object precisely towards / away from the camera origin, such that when viewed from the camera's perspective, the object appears to get bigger or smaller but does not change position. Does that make more sense? Thanks for helping me figure out how to articulate this $\endgroup$ Commented Feb 1, 2021 at 14:57
  • $\begingroup$ ok, that's clear ;) $\endgroup$
    – Chris
    Commented Feb 1, 2021 at 15:22
2
$\begingroup$

Found a solution here: Move vertices towards/away from camera?

That solution is basically to snap the cursor to the camera, set pivot point to cursor, and then scale the object up/down rather than moving it. I'm still unclear how I would move an object towards/away from the cursor, but this scaling solution meets my needs.

$\endgroup$

You must log in to answer this question.

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