Jump to content

fresnel refrlection


dark_cry

Recommended Posts

Just trying to build custom fresnel reflection to combine several fresnel values like car paint, trying to use fresnel node but have no idea how to use. i normalized Norrmals and direction from Eye and connected to the inputs of fresnel node, connected the reflected light to the specular intensity, is it a right approach? i'm getting kinda wierd result... Please need help

post-7977-134202196888_thumb.png

post-7977-134202206706_thumb.png

Link to comment
Share on other sites

your setup is correct

you don't even need to connect nN and nI to fresnel VOP, it can get it by itself

what you need to know however is that Fresnel VOP uses Outside IOR/Inside IOR as index of refraction value

so instead of using 1.33, you need to use 1/1.33 to get the results you are after

Link to comment
Share on other sites

your setup is correct

you don't even need to connect nN and nI to fresnel VOP, it can get it by itself

what you need to know however is that Fresnel VOP uses Outside IOR/Inside IOR as index of refraction value

so instead of using 1.33, you need to use 1/1.33 to get the results you are after

thnx for reply, but i wanna get not only fallof like in normalFallofVop but kinda distorted reflections when u put high value fresnel, u know what i mean?

Link to comment
Share on other sites

you have Reflect VOP where you can plug R from fresnel and multiply it by kr afterwards to get reflection for raytrace/micropoly

or Physically Based Specular VOP for both PBR engines

Sorry, i don't get exactly the workflow, can u give me a detailed info on that?

Link to comment
Share on other sites

sorry I meant Trace instead of Reflect

but if you want to take advantage of multiple importance sampling you can compute first your reflections as brdf with pbrspecular VOPs then extract direct and indirect contributions for other rendering engines

here is an example of how you can put together material with 2 layers of reflection with different fresnel functions using mentioned setup

Link to comment
Share on other sites

I just work with the Mantra Surface internal guts as a start from the gallery as it has all the grunt work pretty well sorted and it does a good job.

The Mantra Surface material has an option that allows you to wire in your own custom fresnel strength across the surface. Its in the last folder tab and you choose custom. Then dive inside the shader, find the Shading Model VOP and it has an input for fresnel right near the top where you can wire in your own reflection strength logic across the surface and expects a value from 0-1.

The Alpha Mix VOP internally does a dot product between the normalized I (eye) and N (surface normal) to give you a nice 0-1 roll and control for the strength of surfaces with normal parallel to the eye (alpha para) and surfaces with normal perpendicular (alpha perp) to the eye. It also has a nice roll-off parameter that controls how quickly para rolls in to perp. Good for starting up a fake fresnel set-up.

post-371-134206180527_thumb.jpg

Or you can roll your own method from scratch and not use the Gallery Mantra Surface's custom fresnel input (you can see that I am steering you to modify the Mantra Surface).

First start with a physically correct Fresnel reflection using ior (which is 1/eta):

post-371-134206188145_thumb.jpg

Then this set-up with the Alpha Mix VOP as above:

post-371-134206190882_thumb.jpg

And yet another incarnation using a Ramp VOP being fed the Alpha Mix set to do a straight dot product of normalized I and N which btw can be used as is fed in place of the Alpha Mix in to the Mantra Surface:

post-371-134206194729_thumb.jpg

There are so many different incarnations of this that it's ultimately up to you how you want to manage the way the light is built up on the surface including reflected light multiplied by a surface roll-off however you wish to construct it.

If you want to perturb the reflected light, it is best to disturb the surface normals with some noise feeding in to the Alpha Mix and make sure that it is Normalized first. This is an old school hack for me going back to 1993 when I first encountered it (with a Point SOP no less) where you add slight amounts of noise to the surface normals to alter the reflections. Nice for realistic disturbed mirror reflections on glass buildings.

fresnel_reflection_examples.hip

  • Like 7
Link to comment
Share on other sites

Nice example anim. It's challenging to glean this logic out of the default Mantra Surface Gallery material.

You can still substitute the ior logic in anim's file with your custom reflection roll-off with the various options in my post above.

Link to comment
Share on other sites

Thnx guys all, anim, old school, respect guys :) you're so helpful, i'm new in houdini, but i see that building custom shaders are convient for me rather than using mantra surface. Mantra surface is almost useless for production i guess...

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...