0
$\begingroup$

I often need to have some 3D images, and some text or images describing the image usually layered on top of the 3D image like here.

enter image description here

I know two solutions, but none of them are perfect:

  1. add them inside the scene (add text/insert image as plane, the theta was added like that) and place them to face the camera. Cons: it is close to impossible to line up the text properly, the perspective will quickly tilt long texts and it is therefore only usable for small texts. Pro: We have the full power of blender to generate the text (here using the latex2blender extension), and it is visible while playing the animation

  2. using the compositor (that's how I added "definition RSP"). Pro: the line-up is perfect, the colors of the images are preserved accurately. Cons: not visible while playing the animation in preview mode (I need to render the full animation to see what's going on), the nodes quickly gets complicated when animating the visibility of many images and I need to generate the images separately (for instance from another text or image editor/blender instance).

Is it possible to combine a perfect 2D adjustment of the texts/images (maybe using an orthonormal camera aligned along the X axis) with preserving the animation preview functionality?

EDIT

To give an example, here is a simple scene I made:

enter image description here

To create the image, I used Image as plain with shadeless material (super cool to preserve colors). To orient the image, I used a constraint:

enter image description here

I also parented this to the camera to ensure it moves with the camera. And then I manually needed to move and scale the big image to ensure that it fits the camera... (and it's hard to get it pixel-precise).

Also, I need to move the text close enough to the camera, or it will intersect with other objects:

enter image description here

If I don't perfectly center the image, I get issues with perspective (I pushed here the image to show the issue):

enter image description here

Also, the images create shadows on the objects around it, while most of the time I'd like to avoid these shadows:

enter image description here

Also, if I try to move the text elsewhere, I need to rotate it manually as otherwise I can see perspective issues when it gets close to the top or bottom part of the screen.

enter image description here:

and it's also harder to align when the object is big and the center is not in the center of the screen:

enter image description here

I think that the issue is that the dampedTrack constraint rotates the text instead of lining it up with the plane of the camera. But then I'm not sure what is the proper way to align this object.

So I'm basically asking what is the best and easier way:

  • to properly create constraints to ensure the images are well aligned with the camera
  • make sure that some images are scaled exactly to the size of the camera (here the "definition RSP" image), not less, no more,

Bonus:

  • to ensure that the image has no shadow on objects (eeve and cycles)
  • ensure that the 2D world is above the 3D world, as robustly as possible.

Blender file:

EDIT

The solution proposed by Chris does not work (this works only because the center of the text is in the center of the picture by changing the alignment to center, but it means that I can't move the text on the side of the text):

enter image description here

$\endgroup$
3
  • $\begingroup$ i don't understand what you mean with "line up the text properly"? shouldn't it be upright (same angle) as the camera? maybe a small blend file with your 2 proposal would clarify what you mean and we see what you have tried. And we don't make proposal you don't want... $\endgroup$
    – Chris
    Commented Mar 23, 2022 at 5:18
  • 1
    $\begingroup$ @Chris I guess yes, but I'm not sure how to configure the constraints, and also make sure the image take the full camera frame. See my edits. $\endgroup$
    – tobiasBora
    Commented Mar 23, 2022 at 13:00
  • $\begingroup$ thanks for clarifying! $\endgroup$
    – Chris
    Commented Mar 23, 2022 at 13:04

1 Answer 1

2
$\begingroup$

i don't know whether this is ok for you:

enter image description here

i used this for the text:

enter image description here

i applied scale + rotation first

i used a cheap trick to make your font readable -> i just gave it a decent emission shader which isn't reacting much on a shadow ;)

here is your changed file to check out:


UPDATE:

ok, delete the object constraint from the text and add this:

enter image description here

result:

enter image description here

--- UPDATE

adapting the size of definition_rsp to fit the camera:

enter image description here

enter image description here

I used here the intercept theorem: https://en.wikipedia.org/wiki/Intercept_theorem

So i can calculate the scale by using f (focal length, distance to camera, and camera size. The two constants in the formulas are the real size of definition_rsp at a scale of 1.

result:

enter image description here

As you can see it fits "ok". Maybe it fits not perfect because of rounding errors or my formula is wrong....

--- UPDATE:

Ok, unparent your objects from the camera that your camera is no longer parent of text and rsp.

rsp gets this:

enter image description here

camera gets this:

enter image description here

drivers as before

result: (pretty accurate now i think) ;)

enter image description here

$\endgroup$
8
  • 1
    $\begingroup$ i updated my answer. I just concentrated on your text problem now ;) $\endgroup$
    – Chris
    Commented Mar 23, 2022 at 14:26
  • 1
    $\begingroup$ i updated my answer $\endgroup$
    – Chris
    Commented Mar 23, 2022 at 19:18
  • 1
    $\begingroup$ Super cool, thanks a lot, I accepted the answer! Too bad blender does not provide some plugins to ease the creation of this ^^' Just a last question: do you have a way to force the image to get centered in the middle of the camera? (this is surely important, and maybe it explains why you don't always observe a perfect fit) You created drivers for the scale, but I guess it's also important to center the image properly (in my example I centered it manually). $\endgroup$
    – tobiasBora
    Commented Mar 24, 2022 at 0:29
  • 1
    $\begingroup$ i updated my answer again and i think it is pretty accurate now $\endgroup$
    – Chris
    Commented Mar 24, 2022 at 7:18
  • 1
    $\begingroup$ Thank you so much! Asking for the camera to track the object rather than the opposite is quite clever (even if it may require changing the scene if the movements of the camera where done without the use of any tracking object). If we want to add more pictures, or if the camera already follows an object, it should be possible to use copy location, or place the object in between the tracked object and the camera using blender.stackexchange.com/questions/68179 Thanks a lot! $\endgroup$
    – tobiasBora
    Commented Mar 24, 2022 at 9:21

You must log in to answer this question.

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