Sign in to follow this  
gunslinger77

fresnel effect parameters

Recommended Posts

hi all, i am trying to make a little fresnel material shader. I gave a read to a nice paper, with a little of pseudocoding for cg. There were the algos, but no values, so i am a little lost. Basically it says that the amount of reflection/refraction of the surface is computed via the formula: reflectionFactor = fresnelBias + fresnelScale * pow (1 + dot (I,N),fresnelPower); now, does anybody knows what values i should assign to fresnelBias fresnelScale fresnelPower to simulate say a cristal glass? Thanks the G.

Share this post


Link to post
Share on other sites
I've always used Schlick's approximation to the Fresnel equations. The actual equation is generally of this form:

reflectivity = factor + (1 - factor) * pow(1 - incoming ray direction dot surface normal), 5.0)

For metals, the "factor" is some number from 0 to 1. I don't know of any empirically defined values for this, but you can experiment with different numbers to get good values that look "right." I'd suggest leaving this factor available as a parameter into the shader if possible. I've seen suggestions that this value be the same as (or close to) the specular reflectance coefficient of the material, but this is rather subjective I think.

For dielectric (transparent) materials, the "factor" is approximated by ((1 - ior) / (1 + ior))^2. These generally do a very nice job of producing nice-looking images, although they aren't particularly physically-based models. It should be perfectly fine for most applications (unless you're doing an actual simulation of real, physical light behavior, and not just trying to make nice pictures [wink] )

There's a lot of different hacks and approximations to the Fresnel equations, and for the most part one isn't particularly better than any others as far as I'm aware. In any case that's what I've done in the past, so perhaps you could make use of a similar approach.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this