6
$\begingroup$

Is it possible to take what a camera sees, and use that from another camera as a projection? That is to dynamically update a projection from a camera?

There are some interesting results if this can be done, for instance transition wipes like from a traditional video editing suite, or feedbacking loops, or dynamically changing displacement maps.

$\endgroup$
5
5
$\begingroup$

Here is a solution that works for the current version of Blender. I created two different scenes, the first one I called Scene.TV, the second is called Scene.Monkey. In Scene.TV, the passes for UV and Material Index are enabled.

Scene.TV contains a model of a TV and a camera looking at it.. The TV display is UV unwrapped to fill the complete UV map and has its own material with a Material Index of 1 (the number isn't important, it should only be exclusively used for the display).

Scene.Monkey contains a model of rotating Suzanne and a camera looking at it.

In Scene.TV I've setup the Compositor with two Render Layers nodes, one for Scene.TV and the other for Scene.Monkey so that when you hit F12 Blender renders both scenes.

To bring the monkey on the TV, I combine both scenes with an Alpha Over node. I plug the TV scene in the first input.

The monkey scene gets plugged into the Image input of a Map UV node, the UV pass of the TV scene goes into the UV input.

This maps the monkey render on all UVs of the TV render. I plug it into the second input of the Alpha Over node. To restrict it to the display, the IndexMA output of the TV scene is used as mix factor. Note: The ID Mask is needed to get the correct material index of the TV display. If all other materials have an index of 0 and the display is 1, the mask isn't necessary.

Here is my Compositor setup:

tv screen

Theoretically you can have one scene with different view layers showing different collections when rendered, which people use to composite certain elements together instead of rendering them all in one layer. But as far as I know you cannot have different cameras in one scene, so I guess you have to stick with the two scene solution explained above.

EDIT: I just saw that although you asked for a current version setup because the other answer that jachym linked to was for layers... but actually there are used different scenes, just like I do. So it's basically the same solution. Maybe my node setup helps explaining a bit instead of having to download a file from an external link.

$\endgroup$
6
  • $\begingroup$ Looks interesting! So there's no way to get the moving images to feedback I guess? $\endgroup$ Jun 1 at 12:39
  • $\begingroup$ What do you mean by feedback? $\endgroup$ Jun 1 at 22:52
  • $\begingroup$ If there's two separate scenes, that means there's no way to feed one camera into a display and back into itself. $\endgroup$ Jun 2 at 2:11
  • $\begingroup$ Ah I see, that's what you want to do.... I guess I got your question wrong then. $\endgroup$ Jun 2 at 8:17
  • $\begingroup$ What about making two duplicate scenes? $\endgroup$ Jun 2 at 8:20
4
$\begingroup$

Any thoughts about this camera to projection requires rendering, but it can be done in one go in the same scene by one hit of Render Animation.


You can use one camera to render its view and reuse result as texture for Light object (projector) in a next frame seen by another Camera ... if you don't care for one frame delay :)

enter image description here

  • Add your Camera A (here viewing rotated Cube)
  • Add Light object (projector) to display what Camera see (render) (or use any other way of using rendered image sequence as texture)
  • Add Camera B for result

Previously I suggested to create another scene just for VSE to add Scene strip of original Scene, because there can be specified camera and a directory independent on original scene to be rendered, but ...

... as pointed in Rich's comment to Stereoscopy > Multi-View works more straight forward. You can just set more Cameras in the same scene to be rendered at the same time into one directory. Rendered sequences are distinguished by camera suffix. To make it work ...

  • enable under Properties Editor > Output Properties > Stereoscopy switch to Multi-View
  • it is better to add two new views (because default left/right views mix those two view into one in viewport and make it hard to see). You can name them same as camera objects, also camera's names suffixes have to match to get it work.

enter image description here

  • now just create a material for light object with Image sequence Texture node and set path to render directory. Since my camera is with suffix "_A", the path should sendup with first frame number with this suffix, in my case "0001_A.png" and set Offset -1, like this blender takes previously rendered camera view as a texture for next projector frame.

enter image description here

$\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.