Author : winged doom


Reply
Reply
 
Thread Tools Display Modes
Ace-Angel's Avatar
Old (#1)
Hey to all,

I was wondering if anyone had any idea about the following;

Quote:
fresnel = pow( 1.0f - VdotH, 5.0f ) * ( 1.0f - ref_at_norm_incidence ) + ref_at_norm_incidence;
I'm abit lost as to what ref_at_norm_incidence may stand for, is the plain old normal, or is there something more sinister?

Cheers!
There's a very good chance that I experienced MORE problems, then all the internet put together in the area of 3D. Talk about being original for once...
Offline , veteran polycounter, 4,576 Posts, Join Date Apr 2011, Location Canada  
   Reply With Quote

equil's Avatar
Old (#2)
Well, that's schlick's approximation, so it's safe to assume that it says "reflectance at normal angle". In essence that's your specular value.

It's not a bad idea to check out how the actual fresnel calculations work. the value of R (in the context of computer graphics it's more generally referred to as f0) is calculated from the index of refractions of the material and the medium it's in. Video games all take place in a vacuum so the equation gets simplified to

((1-IOR)/(1+IOR))^2

as an example here's the reflectance at normal incidence of window glass (IOR 1.520)

( (1-1.52)/(1+1.52) )^2 = 0.04...
transform that into an RGB value..
0.04*255 = ~10

piece of cake. it's a bit more involved for non-dielectric materials but i hope this explains what the value means.
Offline , triangle, 296 Posts, Join Date Oct 2008, Location gbg sweden  
   Reply With Quote

Ace-Angel's Avatar
Old (#3)
Ah, thanks, that makes sense, and thank you also for the extra info. it helps to visualize it better.

Oh, by the way, Schlick's approx. does get included into CookTorrance, right? I was following this gem here: http://content.gpwiki.org/index.php/..._Cook-Torrance

Never knew Cook had Schlick's in it.
There's a very good chance that I experienced MORE problems, then all the internet put together in the area of 3D. Talk about being original for once...
Offline , veteran polycounter, 4,576 Posts, Join Date Apr 2011, Location Canada  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch