Steve Cullum Posted July 13, 2008 Share Posted July 13, 2008 I'm trying to work out how to create a fake fresnel effect using a ramp parameter to drive the reflection amount of a reflective shader. But I need plug something into the ramp node. How can I get the incidence angle of my object to drive this input or should I be doing this in a different way? Thanks for any pointers! Quote Link to comment Share on other sites More sharing options...
eetu Posted July 13, 2008 Share Posted July 13, 2008 I don't have Houdini here, but you need to do a dot product between the "I" and "N" global variables, and then feed that to your ramp. I think "I" needs to be inverted and both need to be normalised before the dot. eetu. Quote Link to comment Share on other sites More sharing options...
ofer Posted July 13, 2008 Share Posted July 13, 2008 yes, negate I, and normalize. Quote Link to comment Share on other sites More sharing options...
SpencerL Posted July 13, 2008 Share Posted July 13, 2008 (edited) To add to eetu post, The dot product gives you the cosine of the angle which would be a value between -1 and 1. To get the angle in degrees, you would need to find the "arc cosine" of the dot product and then convert that from radians to degrees. If you are doing this in VOPs, you would wire the Dot VOP to a Trigonometric Function VOP and then wire that into a Radians to Degrees VOP. Edited July 13, 2008 by SpencerL Quote Link to comment Share on other sites More sharing options...
Steve Cullum Posted July 13, 2008 Author Share Posted July 13, 2008 Thanks folks! I was along the right lines with a dot product and surface normal, but I was using the 'eye' output. But now I see that was merely giving position data and nothing about direction. And if I recall my maths, vectors don't have position data. Cheers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.