I was wondering whether it was possible for a material to render as something that another camera sees, like a TV screen.
For example, at the moment I’m making a rifle that instead of a scope has a little screen. Would it be possible to place a camera on the barrel of the gun and somehow make the screen render what the camera sees, real time?
well you can just take a screen shot of the viewing of the camera and then apply it as a texture in place of where it has to be, so that the final render has that illusion…?
or are you talking about like making a video game seeing like a player run by somewhere through a security camera?
Nah, I mean in an animation, but a screenshot won’t work because once the gun moves, I’ll need to change it. And again when it moves next… and again… etc. and I’ll end up having to make a texture for every frame, and that would be too hard.
You could mount a camera on the front of the rifle and set it as the active camera, then render at the resolution you want the screen to be at. Then you could load the video as an animated texture for the screen.
Alternately you could possibly render the barrel camera in another scene and overlay it onto the scene using the compositor but this would rely on the screen staying in roughly the same place.
i can think of a rather complicated way, using the new Generated image type. Create a linked copy of your scene, Scene.001 and make its camera a local copy. Change the camera’s Lens size to 120. Back in your first Scene, in the Node Editor, Use Composite Nodes. In the RenderLayer Node, select Scene.001 as the input image render, and add a viewer node, and thread the Renderlayer to that node. In your UV/Image Editor, select Viewer Node as the image to display. Now, in Scene, the UV/Image Editor displays the render of Scene.001. In the materials for the TV Screen or rifle scope lens, add a Generated Texture. Now the TV Screen will show the UV/Image Editor, which is Scene.001…which is really just a different camera view of the same scene.