PDA

View Full Version : sampler info : Flipped normal


diginime
10-06-2006, 08:57 AM
Hi guys, i just test out something about sampler info as i'm new to it. I'm confused.. Ok, i'll go straight to the prob and question.

I created a plane and then i assign blinn material to it. Then i created a ramp and checkerboard, condition node and sampler info. I plugged ramp to Iftrue and checker to IfFalse. Then sampler info flipped normal to first term. Ok, i checked the normal and it's facing me, then when i render it's positive result, ramp, then the thing i confuse is when i turn my camera to the back, i saw checkerboard. Isn't it the flipped normal definition is "If the Normals is facing the camera, then the value is 0, and if it is away, then it's 1."

Now when my camera rotate to the back the the Normals is facing away from my camera, but after i render it's a checkerboard. Ok, let's return back to just now. Now i didn't rotate the camera(viewport), now i rotate the plane, then when the normal is facing me, then the value is 0 and it turns out ramp, it's positive. then i rotate it until the Normals is away from me, then when i render it turns out checker which is positive result too as Normals facing away from me value is 1.

So, it's kinda confuse me of this thing.."If the Normals is facing the camera, then the value is 0, and if it is away, then it's 1."

Anyone can explain to me about flipped normal? I already searched around the web but i still can't get it. Thanks..

djx
10-06-2006, 01:40 PM
The "flipped-normal" is a boolean (0 or 1) and is used to determin which side of the surface the texture is on. As you have seen, this is useful for creating shader networks that apply a different texture to the "inside" and "outside" of a surface.

You are confusing this with the "facing-ratio" which is a floating point number ranging between 0 and 1 that depends on how much the surface is facing the camera. A commin shading technique involves mapping the facing-ratio to the u-coord value of a ramp.

epithius
10-07-2006, 09:28 PM
I posted a tutorial on my website which explains the sampler info node a bit. I cover flipped normal, facing ratio, and explain the differences between world, object, and camera space.

Check www.williamkladis.com and goto the tutorials section. Then select "Understanding the Sampler Info/Ramp Shader (http://www.williamkladis.com/tutorial04/tutorial04.html)"

Hope this helps,
Bill

CGTalk Moderation
10-07-2006, 09:28 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.