PDA

View Full Version : (nodal) advise needed: Removing reflection with second object.



serge
07-20-2008, 11:00 AM
I have an object with a reflective surface. I have a second object which is transparent, and will be moved (animated) in front of the first object. Through the transparent object you can see the reflective surface of the first object, but I DON'T want this to happen. In other words, I want the reflective value of the first object to disappear at the place where the second object moves in front of the first object (seen through the camera).

I think the answer might be in the Spot Info node, and perhaps the "Sampled Ray" or "Bounces" output. But I fail to see a nodal construction to achieve this.

serge
07-20-2008, 12:35 PM
Ok, I think I was right with the "Bounces" output, at least I got the effect I was after. I'd just like to know if I was correct in my assumption. I did the following:

I added a logic node which said: "If bounces is equal to 0 then 1, if false then 0." This output I multiplied with the reflective value.
I assume this means that if a ray has bounced 0 times, the reflective value is unchanged. And if it bounced more times (like through the transparent surface) then the reflective value is 0. Is this correct?

I can't seem to find any info about the "Bounces", "Sampled Ray" and some other outputs from "Spot Info" in the Lightwave documents. Is there maybe some addendum I missed?

Lightwolf
07-20-2008, 01:53 PM
I can't seem to find any info about the "Bounces", "Sampled Ray" and some other outputs from "Spot Info" in the Lightwave documents. Is there maybe some addendum I missed?
Have a look at the SDK, the section about shaders and nodes, that explains most of these terms (after all, they are just those values made visible through the nodal interface).

Cheers,
Mike

serge
07-20-2008, 05:17 PM
Thanks Mike. How exactly do I "look at the SDK"? I've downloaded the SDK and I see a whole lot of files. The html-folder seems to contain all the documentation, but how do I compile all these files into a readable document with a search function?

Weepul
07-21-2008, 02:03 AM
There are several other ways you could accomplish this, too, but none of them can be 100% specific to your "window" object. If you gave it a small amount of refraction blur (and a low number of rays, to keep speed as high as possible) and then used Sampled Ray, that would also work, and would allow a higher number of reflection bounces (which you have prevented by setting up no reflection if bounces is 1 or higher). However, the object of course would not appear reflective to ANY sampled ray, which includes radiosity and any blurry reflection or refraction.

Another way would be to set an index of refraction on the "window" surface, and check the incoming IOR (called Incoming Eta in spot info), but then the "window" would have to be refractive, even slightly, which might ruin the effect.

Lightwolf
07-21-2008, 02:15 AM
Thanks Mike. How exactly do I "look at the SDK"? I've downloaded the SDK and I see a whole lot of files. The html-folder seems to contain all the documentation, but how do I compile all these files into a readable document with a search function?
There is no search function. But you can just load index.html in your browser, then look at Classes->ShaderHandler to get a description of the SpotInfo values.

Cheers,
Mike

serge
07-21-2008, 04:08 AM
...Another way would be to set an index of refraction on the "window" surface, and check the incoming IOR...
Thanks Weepul! This is very helpful, and this way I can make it 100% specific for the "window" surface by giving it a unique refraction number.

(BTW, at first it didn't seem to work. Seems it only works when you set the refraction through the node editor, and not the 'old way'.)

serge
07-21-2008, 04:09 AM
There is no search function. But you can just load index.html in your browser, then look at Classes->ShaderHandler to get a description of the SpotInfo values.
Thanks Mike!