Re: approximation to pow(n,x)?

"Nathaniel Hoffman" <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
> What are you using this for? If it's lighting or shading, there's no
> real reason to use a power function on the cosine term to get tighter
> specular highlights. It's just a shaping function that people use
> because it's easy to control and AFAICT it has no physical basis in
> defining a BRDF from the micropolygon point of view.
>
> - Robin Green.

It's true that there is no reason to _exactly_ match a cosine power, and I
agree with Robin that for this purpose, any curve which vaguely resembles
cosine power will do.

As a side note, I just wanted to say a few words in the defense of the
lowly cosine power - it's not completely physically meaningless. If you
are using Blinn-Phong (N dot H, which is much to be preferred over
original Phong - R dot L), then using a cosine power is equivalent to
assuming that the microfacet normal distribution follows a cosine power
curve.

Now, there is no physical reason to assume that microfacet distributions
necessarily follow a cosine power curve, but (except for very low powers)
this curve very closely matches one that _does_ have a physical basis -
the Beckmann distribution (the one used in the Cook-Torrance BRDF). The
match is amazingly close considering that Bui-Tong Phong just eyeballed
the function; he didn't do any curve fitting. BTW, Beckmann's behavior for
very low powers is interesting - it stops behaving like a Gaussianish blob
and starts turning inside-out (which makes sense when you look at the
definition of the "m" parameter).

Beckmann isn't the last word on microfacet distributions; the EGSR 2007
paper "Microfacet Models for Refraction through Rough Surfaces" (which is
a great paper overall and well worth reading for anyone interested in
microfacet BRDFs) makes a good case for a different curve, with a more
gradual falloff. Which again supports Robin's original point.

Naty Hoffman


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.