Iray: Set a figure to cast no reflection?
Scavenger
Posts: 2,674
in The Commons
So, I got the thought to do a vampire picture that would have a mirror in it, showing the victim but obviously not the vampire.
Is it possible to set a figure to not cast a reflection in Iray? I know that's counter to what it's supposed to do, but it would technically be just a flag set on the figure, so theoretically possible, if they've made that an ability.
(For that matter, can that be done in 3Delight? I know there's the "don't cast shadow" switch...)
I mean, it's an easy enough trick to do with multiple renders and photoshop, but can it be done "in camera"?

Comments
Not possible, and there's a good reason why not. If you can see an object, that means it's reflecting light. If it's reflecting light and that light hits a mirror or the surface of water, it's going to reflect. Iray doesn't differentiate between light coming from a person or an object, it's just light. So there's no flag on individual light beams to tell it to ignore reflections. It's one of the caveats of using physics based render engines rather than the biased engines like 3Delight.
In 3DL it's as simple as telling the surface to be invisible to raytracing.
It doesn't mean you can't fake it, however. Render your scene once with the mirror as a matte surface, then render again without the figure. In photoshop, you can paste the reflection back into the scene over the matte surface you had in the original.
You could do it like they do in the movies: combine two images, one with the vampire and one without in the mirror. Or you only create the mirror frame without glass and copy a node instance of the victim on the other side. I guess it cannot be done without tricks. Think like a movie director.
Yeah, postwork is about the only way to do it. IRay is a physically based renderer, meaning it's based on how light works. Everything casts a shadow unless it's set to emit light, and everything reflects onto reflective surfaces.
You can. I think, do this with Canvasses and Light Path Expressions - but I haven't tried it. (Still boils down to two or more renders, but made in one pass.)
Even with LPE, you still have to post it, and coming up with the expression may not be simple. Objects not included in the light path are still there, and come out black (at least in my experiments), which is really no better for these kinds of special effects.
Whenever I do something like this, I do it in two renders, with one of them green screen for the object I want to knock out. Then it's a simple process in Photoshop or Gimp to create a mask based on the single color. Set the character-less scene on the latyer beneath, and there's your full scene: your character in front of a mirror but with no reflection.
The main thing then that I need to work out (and this has just been a mind exercise at the moment) is doing the render without the vampire in the room, which would give the background plate needed...and I guess then a second with the vampire present, and mask out the mirror in that...my main issues being that a vampire doesn't have a reflection in a mirror, but still casts shadows and affects the light in the room by being there...so then 3 renders... one with the vampire, one without, and one with and the mirror made green or whatever color would be best to use to make the photoshop mask....that should in theory work to basiclly let me just edit the vampire out of the mirror and just put up with any missing shadows in the reflection..maybe a 4th render with a shadow catcher in place of the mirror as well...
Well, some stuff to think on for a bit.
Using the Canvasses feature can certainly help with masking as it has material ID as an option, without needing to get into LPEs.
I haven't gotten anything to work with the material IDs, which I'm guessing are RGB triplets expressed as an integer (I've never found any info on this), but object names work. Even so, the "mask" you get is effectively an unrendered black object. I'm sure that's useful for some types of compositing, but wouldn't be for green screen. It's just easier to knock out the single color and use it as a transparency.
Scavenger, you probably only need the two passes. The pass with the green mirror is your main scene, and will include the vampire and all its shadows. The second pass, the mirror reflection, would not include the vampire's shadows, but as it's a reverse angle anyway, most people would have to study the scene to realize there's something missing. Iray (in Interactive mode) allows you to do separate shadow passes if you need to somehow put the shadows back. Depending on your version of vampire lore, some vampires don't cast shadows, either.
I am not familiar with this feature.
Hmm..I'll have to give that some thought. Thanks :)!