How to set background image in cycles?

Hey Blenderheads!

I want to set background image in cycles (not equirect) so that when i render and put a glass material in the scene i get to see the image trough the material.

So normal image set as background in camera view, seen in render or at least on glossy or transp material!

Hope i make sense.

Thanks.

You need to do it in the compositor or add a plane with the image on it behind it.

So setting background image in render time is only possible with a textured plane on background?

Thanks

Or in the compositor, as tomjelfs said. Unless we’re talking about an environment texture, in which case you should set that up in your world settings.

No, if you are talking about getting reflections then you need to go into the World Settings and set the Colour to Environment Texture, this will let you use an image to light your scene and this image will produce reflections. However this Environment Texture will be shaped like a sphere so when it renders you will still need to replace the background with a flat image.

Are you doing a still image or an animation?


This is the problem i got. Having background in 3D view for positioning object works great. But the transparency looks wrong becouse background is equirectangulary mapped…

OK, so when the way you should work is as follows:

• Position using the Viewport background option as you have.
• Set your Environment Texture using some reference photos from the scene, I use an App called Photosynth to take a HDRI Panorama and use that.
• In the Render settings go the Film rollout and check Transparent.

This will then render your glass object with realistic reflections for your scene.

• In the compositor you will see your image with on a transparent background.
• Add an Image Node and choose your background image
• Add an Alpha Over node and mix the two using that.

The result will be your image sitting on the background with reflections and your background showing through.

you can use the ‘window’ coordinate system in your world material… that’s exactly for that purpose:

Window coord. system doesnt ‘properly’ map the background.

I think i ll roughly recreate walls around and map from view.

Thanks for the effort.

An environment texture has a specific type of mapping. If your image is just a photograph of some stuff, it is not an environment texture and you will have to do it as image planes in the background.

Delete this post please!

if you have objects with reflections/refractions, you can still add an enviroment texture, and mix both of them based on the Light Path node. (isTransmission+isGlossy for example)

Dunno … if I needed to see “an image reflected in a piece of glass,” I would do it in the compositor … really, without thinking further about it. To my general way of thinking, “any single-render’s purpose” is not to hand me, tahh dahhhh, “the finished picture.” No, its purpose is simply to hand me pieces of it, along with the Z-depth and alpha-mask information that I’ll need to use to stitch them all together. Renders are time-consuming, so I really only want to do any of them once and then make the work pay-off as long as possible.

To get the image that will be reflected in the glass, position a camera right where the piece of glass is, looking directly out along the path that the incoming rays of light would take in order to bounce of the glass and into the camera. Put that onto a plane at that location and (just using BI, why not?) shoot one frame. There’s the image you need. A little tweaking of hue, saturation, and intensity, and there you have it. You can fiddle with it, fine-tuning it to be “just right,” and it’s all free-of-charge at that point. I’m no longer rendering, then.

Will it be “optically perfect?” No. Will it be “convincing?” Yes. Good “enough?” Yes. “I see a reflection in it, so it must be glass.”