《AngelCG41山东大学软件学院图形学教材》由会员分享,可在线阅读,更多相关《AngelCG41山东大学软件学院图形学教材(30页珍藏版)》请在金锄头文库上搜索。
1、Radisoity,Ed AngelProfessor of Computer Science, Electrical and Computer Engineering, and Media ArtsDirector, Arts Technology CenterUniversity of New Mexico,2,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Introduction,Ray tracing is best with many highly specular sufacesNot characteris
2、tic of real scenesRendering equation describes general shading problemRadiosity solves rendering equation for perfectly diffuse surfaces,3,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Terminology,Energy light (incident, transmitted)Must be conservedEnergy flux = luminous flux = power
3、= energy/unit timeMeasured in lumensDepends on wavelength so we can integrate over spectrum using luminous efficiency curve of sensorEnergy density () = energy flux/unit area,4,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Terminology,Intensity brightness Brightness is perceptual= flux
4、/area-solid angle = power/unit projected area per solid angleMeasured in candela = I dA d,5,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Rendering Eqn (Kajiya),Consider a point on a surface,N,Iout(out),Iin(in),6,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Rendering Equ
5、ation,Outgoing light is from two sourcesEmissionReflection of incoming lightMust integrate over all incoming lightIntegrate over hemisphereMust account for foreshortening of incoming light,7,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Rendering Equation,Iout(out) = E(out) + 2Rbd(out,
6、 in )Iin(in) cos d,bidirectional reflection coefficient,angle between normal and in,emission,Note that angle is really two angles in 3D and wavelength is fixed,8,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Rendering Equation,Rendering equation is an energy balanceEnergy in = energy o
7、utIntegrate over hemisphereFredholm integral equationCannot be solved analytically in generalVarious approximations of Rbd give standard rendering modelsShould also add an occlusion term in front of right side to account for other objects blocking light from reaching surface,9,Angel: Interactive Com
8、puter Graphics 4E Addison-Wesley 2005,Another version,Consider light at a point p arriving from p,i(p, p) = (p, p)(p,p)+ (p, p, p)i(p, p)dp,occlusion = 0 or 1/d2,emission from p to p,light reflected at p from all points p towards p,10,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Radio
9、sity,Consider objects to be broken up into flat patches (which may correspond to the polygons in the model)Assume that patches are perfectly diffuse reflectorsRadiosity = flux = energy/unit area/ unit time leaving patch,11,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Notation,n patche
10、s numbered 1 to nbi = radiosity of patch Iai = area patch Itotal intensity leaving patch i = bi aiei ai = emitted intensity from patch Ii = reflectivity of patch Ifij = form factor = fraction of energy leaving patch j that reaches patch i,12,Angel: Interactive Computer Graphics 4E Addison-Wesley 200
11、5,Radiosity Equation,energy balance,biai = eiai + i fjibjaj,reciprocity,fijai = fjiaj,radiosity equation,bi = ei + i fijbj,13,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Matrix Form,b = bi,e = ei,R = rij,rij = i if i j,rii = 0,F = fij,14,Angel: Interactive Computer Graphics 4E Addiso
12、n-Wesley 2005,Matrix Form,b = e - RFb,formal solution,b = I-RF-1e,Not useful since n is usually very largeAlternative: use observation that F is sparseWe will consider determination of form factors later,15,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Solving the Radiosity Equation,Fo
13、r sparse matrices, iterative methods usuallyrequire only O(n) operations per iterationJacobis method,bk+1 = e - RFbk,Gauss-Seidel: use immediate updates,16,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Series Approximation,1/(1-x) = 1 + x + x2+ ,b = I-RF-1e = e + RFe + (RF)2e +,I-RF-1
14、= I + RF +(RF)2+,17,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Rendered Image,18,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Patches,19,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Computing Form Factors,Consider two flat patches,20,Angel: Interactive
15、Computer Graphics 4E Addison-Wesley 2005,Using Differential Patches,foreshortening,21,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Form Factor Integral,fij = (1/ai) ai ai (oij cos i cos j / r2 )dai daj,occlusion,foreshortening of patch i,foreshortening of patch j,22,Angel: Interactive
16、 Computer Graphics 4E Addison-Wesley 2005,Solving the Intergral,There are very few cases where the integral has a (simple) closed form solutionOcclusion further complicates solutionAlternative is to use numerical methodsTwo step process similar to texture mapping HemisphereHemicube,23,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,