搜档网
当前位置:搜档网 › An anisotropic Phong BRDF model

An anisotropic Phong BRDF model

An anisotropic Phong BRDF model
An anisotropic Phong BRDF model

An Anisotropic Phong BRDF Model

Michael Ashikhmin Peter Shirley

August13,2000

Abstract

We present a BRDF model that combines several advantages of the various empirical models cur-rently in use.In particular,it has intuitive parameters,is anisotropic,conserves energy,is reciprocal,has

an appropriate non-Lambertian diffuse term,and is well-suited for use in Monte Carlo renderers.

1Introduction

Physically-based rendering systems describe re?ection behavior using the bidirectional re?ectance distri-bution function(BRDF).For a detailed discussion of the BRDF and its use in computer graphics see the volumes by Glassner[2].At a given point on a surface the BRDF is a function of two directions,one toward the light and one toward the viewer.The characteristics of the BRDF will determine what“type”of material the viewer thinks the displayed object is composed of,so the choice of BRDF model and its parameters is important.We present a new BRDF model that is motivated by practical issues.A full rationalization for the model and comparison with previous models is provided in a seperate technical report[1].

The BRDF model described in the paper is inspired by the models of Ward[8],Schlick[6],and Neimann and Neumann[5].However,it has several desirable properties not previously captured by a single model. In particular,it

1.obeys energy conservation and reciprocity laws,

2.allows anisotropic re?ection,giving the streaky appearance seen on brushed metals,

3.is controlled by intuitive parameters,

4.accounts for Fresnel behavior,where specularity increases as the incident angle goes down,

5.has a non-constant diffuse term,so the diffuse component decreases as the incident angle goes down,

6.is well-suited to Monte Carlo methods.

The model is a classical sum of a“diffuse”term and a“specular”term.

ρ(k1,k2)=ρs(k1,k2)+ρd(k1,k2).(1) For metals,the diffuse componentρd is set to zero.For“polished”surfaces,such as smooth plastics,there is both a diffuse and specular appearance and neither term is zero.For purely diffuse surfaces,either the traditional Lambertian(constant)BRDF can be used,or the new model with low specular exponents can be used for slightly more visual realism near grazing angles.The model is controlled by four paramters:

?R s:a color(spectrum or RGB)that speci?es the specular re?ectance at normal incidence.

n v= 10000

n v= 1000

n v= 100

n v= 10

n u = 10n u = 100n u = 1000n u = 10000

Figure1:Metallic spheres for various exponents.

?R d:a color(spectrum or RGB)that speci?es the diffuse re?ectance of the“substrate”under the specular coating.

?n u,n v:two phong-like exponents that control the shape of the specular lobe.

We now illustrate the use of the model in several?gures.After that,the remainder of the paper deals with specifying and implementing the model.Figure1shows spheres with R d=0and varying n u and n v.The spheres along the diagonal have n u=n v so have a look similar to the traditional Phong model.Figure2 shows another metallic object.This appearance is achieved by using the“right”mapping of tangent vectors on the surface.Figure3shows a“polished”surface with R s=0.05.This means the diffuse component will dominate for near normal viewing angles.However,as the viewing angle becomes oblique the specular component dominates despite its low near-normal value.Figure4shows the model for a diffuse surface. Note how the ball on the right has highlights near the edge of the model,and how the constant-BRDF ball on the left is more“?at”.The highlights produced by the new model are present in the measured BRDFs some paints,so are desirable for some applications[4].

Figure2:A cylinder with the appearance of brushed metal created with the new model with R d=0,R s= 0.9,n u=10,n v=100.

Figure3:Three views for n u=n v=400and a red substrate.

Figure4:An image with a Lamertian sphere(left)and a sphere with n u=n v=5.After a?gure from Lafortune et al.[4].

2The Model

The specular componentρs of the BRDF is:

ρs(k1,k2)=

(n u+1)(n v+1)

(n·h)n u cos2φ+n v sin2φ

(h·k)max((n·k1),(n·k2))

F((k·h))(2)

In our implementation we use Schlick’s approximation to Fresnel fraction[6]:

F((k·h))=R s+(1?R s)(1?(k·h))5,(3) a·b scalar(dot)product of vectors a and b

k1normalized vector to light

k2normalized vector to viewer

n surface normal

u,v tangent vectors that form an orthonormal basis along with n.

ρ(k1,k2)BRDF

h normalized half-vector between k1and k2

p(k)probability density function for re?ection sampling rays

F(cosθ)Fresnel re?ectance for incident angleθ

Table1:Important terms used in the paper

Figure5:Geometry of re?ection.Note that k1,k2,and h share a plane,which usually does not include n. where R s is material’s re?ectance for the normal incidence.It is not necessary to call trigonometric functions to compute the exponent in Equation2,so the specular BRDF can be written:

ρs(k1,k2)=

(n u+1)(n v+1)(n·h)(n u(hu)

2+n v(hv)2)

2

12

F((k·h)).(4)

in a It is possible to use a Lambertian BRDF together with our specular term in a way similar to that which is done for most models[6,8].However,we use a simple angle-dependent form of the diffuse component which accounts for the fact that the amount of energy available for diffuse scattering varies due to the dependence of specular term’s total re?ectance on the incident angle.In particular,diffuse color of a surface disappears near the grazing angle because the total specular re?ectance is close to one in this case.This well-known effect cannot be reproduced with a Lambertian diffuse term and is therefore missed by most re?ection models.Another,perhaps more important,limitation of the Lambertian diffuse term is that it must be set to zero to ensure energy conservation in the presence of a Fresnel-weighted term.

The diffuse term is:

ρd(k1,k2)=28R d

23π

(1?R s)

1?

1?

(n·k1)

2

5

1?

1?

(n·k2)

2

5

(5)

Note that our diffuse BRDF does not depend on n u and n v.The somewhat unusual leading constant is designed to ensure energy conservation.

3Using the BRDF model in a Monte Carlo setting

In a Monte Carlo setting we are interested in the following problem:given k1,generate samples of k2with a distribution which shape is similar to the cosine weighted BRDF.This distribution should be a probability density function(pdf),and we should be able to evaluate it for a given randomly generated k2.The key part of our thinking on this is inspired by discussion by Zimmerman[9]and by Lafortune[3]who point out that greatly undersampling a large value of the integrand is a serious error while greatly oversampling a small value is acceptable in practice.The reader can verify that the densities suggested below have this property.

We?rst generate a half-vector h using the following pdf:

p h(h)=

(n u+1)(n v+1)

(n·h)n u cos2φ+n v sin2φ,(6)

Figure6:A closeup of the model implemented in a path tracer with9,26,and100samples.

To evaluate the rendering equation we need both a re?ected vector k2and a probability density function p(k2).Note that if you generate h according to p h(h)and then transform to the resulting k2:

k2=?k1+2(k1·h)h,(7) the density of the resulting k2is not p h(k2).This is because of the difference in measures in h and v2 space.So the actual density p(k2)is:

p(k2)=

p h(h)

4(k1·h)

.(8)

Monte Carlo renderers that use this method converge reasonably quickly(Figure6).In an implementation where the BRDF is known to be this model,the estimate of the rendering equation is quite simple as many terms cancel out.

Note that it is possible to generate an h vector whose corresponding vector k2will point inside the surface,i.e.(k2·n)<0.The weight of such a sample should be set to zero.This situation corresponds to the specular lobe going below the horizon and is the main source of energy loss in the model.This problem becomes progressively less severe as n u,n v become larger.

The only thing left now is to describe how to generate h vectors with pdf of Equation7.We start by generating h with its spherical angles in the range(θ,φ)∈[0,π2]×[0,π2].Note that this is only the?rst quadrant of the hemisphere.Given two random numbers(ξ1,ξ2)uniformly distributed in[0,1],we can choose

φ=arctan

n u+1

n v+1

tan

πξ1

2

,(9)

and then use this value ofφto obtainθaccording to

cosθ=(1?ξ2)1

u2v2.(10) To sample the entire hemisphere,the standard manipulation whereξ1is mapped to one of four possible functions depending one whether it is in[0,0.25),[0.25,0.5),[0.5,0.75),or[0.75,1.0).For example for ξ1∈[0.25,0.5),?ndφ(1?4(0.5?ξ1))via Equation9,and then“?ip”it about theφ=π/2axis.This ensures full coverage and strati?cation.

For the diffuse term it would be possible to do importance sample with a density close to cosine-weighted BRDF5in a way similar to that described by Shirley et al[7],but we use a simpler approach and generate samples according to cosine distribution.This is suf?ciently close to the complete diffuse BRDF to substan-tially reduce variance of the Monte Carlo estimation.To generate samples for the entire BRDF,simply use a weighted average of1and p(k2).

References

[1]Michael Ashikmin and Peter Shirley.An anisotropic phong light re?ection model.Technical Report

UUCS-00-014,Computer Science Department,University of Utah,June2000.

[2]Andrew S.Glassner.Principles of Digital Image Synthesis.Morgan-Kaufman,San Francisco,1995.

[3]Eric https://www.sodocs.net/doc/129161999.html,fortune and Yves https://www.sodocs.net/doc/129161999.html,ing the modi?ed phong BRDF for physically based rendering.

Technical Report CW197,Computer Science Department,K.U.Leuven,November1994.

[4]Eric https://www.sodocs.net/doc/129161999.html,fortune,Sing-Choong Foo,Kenneth E.Torrance,and Donald P.Greenberg.Non-linear

approximation of re?ectance functions.Proceedings of SIGGRAPH97,pages117–126,August1997.

[5]L′a szl′o Neumann,Attila Neumann,and L′a szl′o https://www.sodocs.net/doc/129161999.html,pact metallic re?ectance models.

Computer Graphics Forum,18(13):161–172,1999.

[6]Christophe Schlick.An inexpensive BRDF model for physically-based https://www.sodocs.net/doc/129161999.html,puter Graphics

Forum,13(3):233—246,1994.

[7]Peter Shirley,Helen Hu,Brian Smits,and Eric Lafortune.A practitioners’assessment of light re?ection

models.In Paci?c Graphics,pages40–49,October1997.

[8]Gregory J.Ward.Measuring and modeling anisotropic re?https://www.sodocs.net/doc/129161999.html,puter Graphics,26(4):265–272,

July1992.ACM Siggraph’92Conference Proceedings.

[9]Kurt Zimmerman.Density Prediction for Importance Sampling in Realistic Image Synthesis.PhD

thesis,Indiana University,June1998.

相关主题