Rendering only reflection

Is it possible to render the reflection of Object a in object b (using raymirror applied to object b) but not render any of Object b itself?

Similar to the way shadow only can be rendered.

Well, hmm… Since the Color (reflection), Specularity, and Mirror channels of a material are all separate, what would happen by setting reflection to zero? I know it’s not an elegant solution but, would it work? (Actually, of course I’d copy the material, set Col=0 in the copy, and assign the copy to the object temporarily, so as not to “lose” the original setting.)

If the reflective object is just a plane or a sphere you can use the precurser to raytracing in blender - Environment maps.

There’s surely still tutes about it somewhere.

Render the scene with the object there and a static envmap, then hide the object and render again - the envmap won’t be recalculated and the object will remain in the reflection

[edit] sorry, I guess I misread the question - I thought you wanted an object to only be visible in a reflection, but invisible directly

I don’t know if it will work for everything, but try this:

  1. Set the Alpha slider of the reflective material as low as possible without making it completely 0. I think 0.001 is the lowest as possible.
  2. Turn on ZTransp for the reflective material.

Ahhh… an alternate interpretation of the phrase, “the reflection of an object…” So my previous posting may not be apropos, not at all. I was envisioning the question as being “how can I get [a layer containing] just the specular highlights of” an object, e.g. for use in a beauty-pass. Maybe completely off-the-mark.

Compositing is a truly wonderful tool for getting exactly what you need in a shot and none of what you don’t. For example, you can make a separate layer containing only the reflection and sandwich that into a scene which didn’t have one. (The same thing applies to shadows.) And when generating that “reflections only” layer, if the easiest way to get that step done was to generate a file with “reflections and the object” and subsequently mask-out the object… you could do that, too. My point is that you are not limited to causing all of the necessary image elements to come-together in one original image. You can do each one separately and then combine them. A single Hollywood SFX shot might have hundreds of composite layers.

What this gives you, in addition to reduced render-times (and in exchange for more headaches and planning), is flexibility. If you decide that the reflection is a little bit too harsh, you can soften it (perhaps without re-rendering that layer). If you decide that the reflection needs a bit of sparkle… make the sparkles (alone!) and simply add-them-in. But compositing makes it possible to “add them in.” The Blender Sequence-Editor tool is a very, very important resource to get to know. It can save you hours, days, weeks.

As a bit more of an explanation of what I a hoping to achieve, look at the little character in this screen shot:

http://mediaportal.sourceforge.net/gallery/BlueTwo/home.jpg

This is basically a skin for a HTPC program where there are various images composed together via an XML skin file.

What I want to be able to do is create the little guy and his reflection in Blender with transparency for everything else. This way, a mediaportal user could change the backdrop without having to alter the render of the little guy.

Umm hope that makes sense

I have tried the suggestions above (except for env maps) and they didn’t work. If I could prevent the sky from rendering in a reflection, it might work. I know as an alternative I could miror the character and modify the material of the mirrored character to reflection-ish, but was hoping to do it without that method. Im pretty sure I can’t. :frowning:

I assume you want to render a PNG or TGA with an alpha channel.
Blender can only render an alpha channel if it doesn’t encounter an object before it “hits the world”. It can’t see the difference between the part of an object that has a reflection and the part that doesn’t. So you’ll have to do that manually in an image editor.

  1. Make the reflective plane white and shadeless.
  2. Give the world a color that doesn’t occur anywhere else in the image.
  3. Render it with an alpha channel (Premul, RGBA, file type that supports alpha channel)
  4. Key the world color that is visible in the reflective plane out in an image editor.

So mirroring the character would probably be less work :wink:

Well, thanks to Egg and all for your help, looks like I will have to go with mirrored objects - the “blue-screen” method usually leaves artifacts in 2d editors (depending on how much work you really want to put into it - and life is too short).

Cheers