Jump to content

Incidence angle?


Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by SpencerL
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...