1
$\begingroup$

After I import "Images As Planes" (using addon) I would like to place the images in front of the camera like a rostrum, making the corners match the camera frame. Or perform the best fit of the height or sides if the images are a different shape (vertical aspect).

I know that I can set the camera to orthographic and this fixes the relative dimensions on z axis, but I want to make a objects initial scale or position fill the camera view.

This way I can always return to a 1:1 relationship without borders or overshoot.

USAGE: This is helpful when creating layers of images or movies that you may want to animate in 3D view (relative to each other) but allocate to layers for actual compositing.

$\endgroup$
  • $\begingroup$ Are you sure you are not looking for the Background Image feature, which is in the Property panel? Like this. $\endgroup$ – Leon Cheung Jan 30 '14 at 2:03
  • $\begingroup$ Thanks but no, that would be a guide image, I want to layer photos or cell animation but keep the image frames registered at the edges of the camera view. $\endgroup$ – 3pointedit Jan 30 '14 at 3:31
6
$\begingroup$

Actually, it can be done with both perspective and orthographic cameras. I would like to suggest the universal way, which needn't any reset on the current camera transformation:

enter image description here


For Perspective camera:

  1. Enable Import Image as Planes and Simple Align in Addon list.

  2. Import the target image as plane. When importing, Choose Dots/BU as Plane dimensions, and set the longest side of the image as Definition value. For example, if the image resolution is 1920 px x 1080 px, then you should type in 1920.

  3. Set the render resolution the same as image, to set the correct perspective for camera.

  4. With the plane selected, hold Shift to further select the camera, then find Simple Align tool in the Tool Shelf, click XYZ button to align both rotation and location of the plane to the camera.

  5. Select the plane only, then input like this: GZZ=-focal_length/sensor_size. For example, if the focal length of camera is 35, and sensor size is 32, then press GZZ=-35/32. Then you'll get what you want.


For Orthographic camera:

  1. As above.
  2. As above.
  3. As above.
  4. As above.

  5. Select the plane only, then input like this: GZZ=-ortho_scale/2. For example, if ortho_scale=8, you should input GZZ=-8/2. Then Tab into Edit Mode, S8.


P.S.: Doing math while transforming is only available in Blender 2.70+. However, you can do the math elsewhere out of Blender, and paste the result in.

$\endgroup$
  • $\begingroup$ When I try to do this: the plane I want to align to the camera edges is moved to the camera's origin and not it's projected view port; any ideas why? $\endgroup$ – ThorSummoner May 27 '14 at 8:51
  • $\begingroup$ Also, Can you elaborate what 'gzz' is supposed to do? It appears to want to move the plane along the z axis, the second press of the 'g' key appears to do nothing, though pressing 'g' a third time unlocks the transformation from the z axis. $\endgroup$ – ThorSummoner May 27 '14 at 8:53
  • $\begingroup$ @ThorSummoner I see your point. I've updated my answer. That's because the operation method for the new numberal input feature. So now you have to type = or * before doing division. The GZZ means to translate along its local Z axis. $\endgroup$ – Leon Cheung May 27 '14 at 13:48
  • $\begingroup$ @3pointedit I wonder if this helps? $\endgroup$ – Leon Cheung May 27 '14 at 13:51
2
$\begingroup$

There is an great addon to do exactly what you need!

"create camera image plane"

description on the blenderartists.org thread:

the "script should be run with a camera selected and then creates an imageplane, sets up drivers to automatically scale it by the render aspect ratio and focal length of camera and distance (that would be the neg z of the imageplanes location) so it will cover the entire screen. It sets up a cycles material so it's ready to load an image sequence"

enter image description here

The material is created with an emission shader that takes into account the alpha channel (if there is one), all you need to do is select the image you want to use:

enter image description here

If you move the camera, the plane will follow. Also if you change the focal lenght, the plane will resize accordingly. And if you move the plane on its local Z axis it will resize as well, filling the frame at all times.

enter image description here

addon is here (login is required to download attachments) :

http://blenderartists.org/forum/attachment.php?attachmentid=287436&d=1391722170

$\endgroup$
  • $\begingroup$ Yes thanks for that, infact I did find this on the forum. It's very cool. To free it from the camera lock you just animate the influence. $\endgroup$ – 3pointedit May 27 '14 at 23:35
0
$\begingroup$

It seems that the easiest solutions was to conform the scales so they all match up at 3D space Origin point, 0,0,0.

If I import an image that measures x=1920, y=1080 use the Import Images as Planes addon and set the Plane Dimensions variable to Dots/BU (this matches the longest side-edge or height) to a single Blender Unit. In this case I would make it 1920.

The camera should be set to orthographic (scale 1.0) and placed at 1 BU above the Image Plane object.

A render will match perfectly. For off aspect images choose the width measurement

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.