SECTION 3
åò 3 áæ 3.0 jeffl@darwin3d.com,.,...,,,.,,..???.. 260
ëìêããò Éîíì âõäî 3.0., Gouroud.,.,. 3,..,. 261
åò 3áÆ 3.1 aht@hig.se tony.barrera@spray.se ewert@cb.uu.se.,..., (ambient light).,.,.,,. 262 [Blinn77][Phong75].
ÄÃÖŒÚåì ãô ãôœãã È ãøíî âæåó Éû ëõ -áã ÈÖŒ åõüô ÜõÉòÈ 3.1 3.1.1 diffuse specular... [Foley97]... [ 3.1.1].. [Hearn97].,. 3.1.2 diffuse 263
åò 3áÆ [ 3.1.2],, diffuse...., diffuse I d 5 N. L.. diffuse, diffuse... [ 3.1.1] I s I a.,, I d 5 N. L! 0. [ 3.1.2] q [0, 1]. [ 3.1.2] I a, diffuse. q, I d 50 I I a. ( 0 ).. q. I d, I a (1 2 q) I a. diffuse., diffuse 0. [ 3.1.3] 264
ÄÃÖŒÚåì ãô ãôœãã È ãøíî âæåó Éû ëõ -áã ÈÖŒ åõüô ÜõÉòÈ 3.1 3.1.3. [ 3.1.4]. q. [ 3.1.2] q.,.. diffuse. diffuse. diffuse., (local light model) ( global light model ). 265
åò 3áÆ q 5 0.0 q 5 0.10 q 5 0.20 q 5 0.30 q 5 0.40 q 5 0.50 q 5 0.60 q 5 0.70 q 5 0.80 q 5 0.90 q 5 1.00 3.1.4 q [Blinn77] Blinn, J. F., Model of Light Reflection for Computer Synthesized Pictures, Proceedings SIGGRAPH 1997: pp. 192 198. [Foley97] Foley, J. D., et al, Computer Graphics: Principles and Practice, 2nd ed., Addison-Wesley: pp. 729-732. 1997. [Gouraud71] Gouraud, H., Continuous Shading of Curved Surfaces, IEEE Transactions on Computers Vol. c 20, no. 6 (1971 6 ). [Hearn97] Hearn, D., M. P. Baker, Computer Graphics, C version, 2, Prentice Hall: pp. 558, 559. 1997. 266
ÄÃÖŒÚåì ãô ãôœãã È ãøíî âæåó Éû ëõ -áã ÈÖŒ åõüô ÜõÉòÈ 3.1 [Phong75] Phong, B. T., Illumination for Computer Generated Pictures, Communication of the ACM, Vol. 18, no. 6, (1975 6 ). [Williams78] Williams, L. Casting Curved Shadows on Curved Surfaces, Computer Graphics12, 3 (1978 8 ): 270 274. 267
åò 3 áæ 3.2 szirmay@iit.bme.hu benedek@digitaldream.hu CD CD-ROM.., (radiance)..., 2. 1 2.,...,., (stochastic iteration). (Monte Carlo) [Szirmay00]. p (z) V z 1,, z M. 268
áœíúœâìâ åóâãôœ åõüô ãã È ãøíìâ íúœöà ÈÖõ Âåóœ áìâáõ œ 3.2 [ 3.2.1] z p(z), F(z)/p(z).,.. [Glassner89].,.,.. [Kajiya86]. [ 3.2.2] L x w, L e, L r x. (light transport operator). [ 3.2.3] S, w y x y x, f r (Bidirectional Reflectance Distribution Function, BRDF), G(x, y). [ 3.2.4] v(x, y) 1, 0 269
åò 3 áæ, q x, q y y x. [ 3.2.1] (view importance)., [ 3.2.2]., W e (x, w). L(x, w). W e (x, w) x w 1, 0 (measuring function). W e.. [ 3.2.5] R e (x, w y x ) 5 W e (x, w)f r (w y x, x, w) x, 0. BRDF. [ 3.2.5], y, W e (x, w)f r (w y x, x, w)g(x, y)., 3.2.1 270
áœíúœâìâ åóâãôœ åõüô ãã È ãøíìâ íúœöà ÈÖõ Âåóœ áìâáõ œ 3.2. W(x, w),. R(x, w) BRDF.., L[n] 5 L e 1 T L[n 2 1].. (finite-element techniques). A 1, A 2,..., A K. i. [ 3.2.6] L[n] 5 L e 1 T L[n 2 1], n 2 1 n. [ 3.2.7].,.. [ 3.2.8] y x y x., p (y x). 271
åò 3 áæ [ 3.2.9],... l p. (importance sampling) [Szirmay00]., T *.,,.. [Szirmay99].. [ 3.2.10] [ 3.2.11]..,. [ 3.2.12]. [ 3.2.13], x y. 272
áœíúœâìâ åóâãôœ åõüô ãã È ãøíìâ íúœöà ÈÖõ Âåóœ áìâáõ œ 3.2 3.2.2 [ 3.2.14] [ 3.2.2],.,., ( )... x, y.,. [ 3.2.15]. L(y, w y x ) y, R(x, w y x )/A i (gathering) x, G (x, y).,., 273
åò 3 áæ... x, y y x,. (backward samples). (forward samples),..,.,... (multiple importance sampling), [Veach98]. m z P m (z). m P m. d(z) 5 Ï m P m p m (z)., (, ).,.. (fluctuation).,.,.. 274
áœíúœâìâ åóâãôœ åõüô ãã È ãøíìâ íúœöà ÈÖõ Âåóœ áìâáõ œ 3.2 1 : (Radiance Shooting) L(y, w y x )cosq y y w y x. F j /F j. F j 5 A j L j (w) cosq y dw j F. j y 1/A j w y x L j (w y x ) cosq y, y x. ( ), L F,., (luminance). Lum. y x. [ 3.2.16] p 1 (y x). y x, x y ( ),. p 1 (y x)., p 1 (y x),. 2 : (Radiance Gathering).. x R (x, w y x ). x w y x.., Œ i /Œ i. Œ i 5 R i (x, w)cosq x dw i, Œ 5 Ï k Œ k. 275
åò 3 áæ 1/A i x. R(x, w y x )cosq x x,, y., y x x, y. [ 3.2.17], p 2 (y x). 3 :... x 2 Œ i /(ŒA i )., y 1 F j /(FAj)., y x (, ). y x y.,. x, y. [ 3.2.18]. (nondiffuse),,. [Sillion94]. 276
áœíúœâìâ åóâãôœ åõüô ãã È ãøíìâ íúœöà ÈÖõ Âåóœ áìâáõ œ 3.2 3.2.3.,..,. [ 3.2.3]., BRDF f r (w in, w), f d Df r (w in, w)., f r (w in, w) 5 f d 1 Df r (w in, w). L d.,. w Iin (irradiance) I. n, I ( ) w Iin., 0. w L r (w) 5 IDf r (w Iin, w) 1 L d.. R d, W, w Win.. L d R d., I [n]. Df r (w Iin, w)( ),. 0,,.. I [n],,. 0,,.. S. 277
åò 3 áæ S. I [n]. [ 3.2.19] Da BRDF Df r (albedo, ) C. [ 3.2.20]. I [n] Lum(I [n]da)/c,. Lum(I [n]da) [Kelemen03]., I [n]. Lum(I [n]da) Lum(IDa), I w Iin. Lum(I [n]da) Lum(IDa) Lum(I [n]da)/lum(ida). y, L j (w)cosq y w. L e, L d, w Iin I. w. [ 3.2.21], (main part), (difference part) (, Lum(F e )/A, Lum(L d ), C ).,.,., BRDF. 278
áœíúœâìâ åóâãôœ åõüô ãã È ãøíìâ íúœöà ÈÖõ Âåóœ áìâáõ œ 3.2. ÖŒâÃêà 3.2.1,...., n n, n,..,.,.. F F w w w Œ Œ w w w F F Œ Œ 279
åò 3 áæ..,.,...,..,..,..., [0, 1]. (random total luminance)..,.,. 280
áœíúœâìâ åóâãôœ åõüô ãã È ãøíìâ íúœöà ÈÖõ Âåóœ áìâáõ œ 3.2,....,,.., (coherence)., 1., k D [Szecsi03]..,.,.,. (walk-through).,. [ 9]. 2 3 1.3 GHz 85. [Glasssner89] Glassner, A.S., An Introduction to Ray Tracing, Academic Press, 1989. 281
åò 3 áæ [Kajiya86] Kajiya, J.T., The Rendering Equation, Computer Graphics (SIGGRAPH 86 Proceedings), pp. 143 150, 1986. [Kelemen03] Kelemen, Cs., B. Benedek, L. Szirmay-Kalos, L. Szécsi, Bi-directional Rays in Global Illumination, WSCG 2003, 11 th International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision, Plzen, 2003. [Shirley96] Shirley, P., C. Wang, K. Zimmerman, Monte Carlo Techniques for Direct Lighting Calculations, ACM Transactions on Graphics, Vol 15, no. 1, pp. 1 36, 1996. [Sillion94] Sillion, F., C. Puech, Radiosity and Global Illumination, Morgan Kaufmann Publishers, 1994. [Szecsi03] Szécsi, L., An Effective Implementation of the k-d Tree, in Graphics Programming Methods, Charles River Media, 2003. [Szirmay99] Szirmay-Kalos, L., Stochastic Iteration for Non-Diffuse Global Illumination, Computer Graphics Forum (Eurographics 99), Vol 18, no. 3, pp. 233 244, 1999. [Szirmay00] Szirmay-Kalos, L., Monte-Carlo Methods in Global Illumination, Script. Vienna University of Technology, 2000. CD-ROM [Veach98] Veach, E., Robust Monte Carlo Methods for Light Transport Simulation, PhD thesis, Stanford Univerity, http://graphics.stanford.edu/papers/ veach_thesis, 1997. 282
ÜÆåìœãø áì ÜÆ Â åóâãôœ åõüô ãìèäõöœåã ÚãòâóãÕ ÜòêÃÖõëõ ÈÖŒâà ëõáõ  éæéæ È 3.3 3.3 szirmay@iit.bme.hu gyantal@mailbox.hu CD CD-ROM. (walk).,. (quadratures) [Szirmay00]. p (z) M z 1,..., z m. [ 3.3.1] F (z)/p(z). F p,. [Szirmay00]. d u 5 p (z)d z. 283
åò 3 áæ [ 3.3.2] p (z) z, u. z. z. U (primary sample space). p d z d u.,,., z, V, F. (,, ), F,. p, F I.,. (BRDFs), p. BRDF [Kaji86] BRDF. [Shirley96]. (Russian roulette) 0.,, p., BRDF., BRDF,.,, [Veach97a].,.. 284
ÜÆåìœãø áì ÜÆ Â åóâãôœ åõüô ãìèäõöœåã ÚãòâóãÕ ÜòêÃÖõëõ ÈÖŒâà ëõáõ  éæéæ È 3.3.. z i+1 (tentative transition function) T(z i z t ) z t.. (acceptance probability) a(z i z t )., 1,.. ÖŒâÃêà à 3.3.1 r p,. [ 3.3.3],.. j. I., I., 285
åò 3 áæ., Veach [Veach97a]. a, 1 a.,. a 1 a.,. ÖŒâÃêà à 3.3.2., b..., 286
ÜÆåìœãø áì ÜÆ Â åóâãôœ åõüô ãìèäõöœåã ÚãòâóãÕ ÜòêÃÖõëõ ÈÖŒâà ëõáõ  éæéæ È 3.3 (ergodicity [Veach97a]),..., BRDF,,, [Kelemen02].,.... [ 3.3.1].. (direct light source computation, next event estimation [Kajiya86]) ( ). u 1, u 2 x 1.,, x 1.,. [ 3.3.1],., x 1 u 3., u 3 x 1 BRDF (, 1 ) BRDF.. u 4, u 5, BRDF. x 1 x 2., u 6., x 2 u 6 (albedo,, 287
åò 3 áæ 3.3.1 ),. z 5 (, x 2, x 1, ). u 5 (u 1, u 2..., u 6 ). BRDF, z (u). u 5 (u 1, u 2..., u 6 ). u 3 u 6 BRDF.,.,.,.,.,.. (Large Steps) ergodicity (, 0 )., 0. 288
ÜÆåìœãø áì ÜÆ Â åóâãôœ åõüô ãìèäõöœåã ÚãòâóãÕ ÜòêÃÖõëõ ÈÖŒâà ëõáõ  éæéæ È 3.3, ergodicity.,,. [Kelemen02]. (, ).. 0, ergodicity., (start-up bias error) (seed) [Veach97a]. [Veach95].,, b. b,., b. : (Lazy Evaluation) (, )..., 10. 30.., 10, 30. [Kelemen02]....,..,. 289
åò 3 áæ ( ) un 3.3.2 :. (, ). (, ).,., time. modifytime.. large_step_time.,., modifytime large_step_time., modify Time large_step_time. time max(modifytime, large_step_time) ([ 3.3.2] ).. i. PrimarySample i newpath.large_step. newpath.large_ step 1, 0. 290
ÜÆåìœãø áì ÜÆ Â åóâãôœ åõüô ãìèäõöœåã ÚãòâóãÕ ÜòêÃÖõëõ ÈÖŒâà ëõáõ  éæéæ È 3.3 ÖŒâÃêà 3.3.3.,. ÖŒâÃêà à 3.3.4 MutateValue., [Veach97a] 1/x. [20.03, 0.03]. 291
åò 3 áæ..., p 1 (u) M 1, p 2 (u) M 2., (balance heuristic) [Veach95],. M 1 p 1 (u) 1 M 2 p 2 (u).., p 1 (u) 5 I(z(u))/b 5 I *(u)/b., p 2 (u) 5 1. p large, p large. M 1 5 M M 2 5 p large. M. (I *(u)/b 1 plarge )M. a, 1 a.,. [ 3.3.4],. a,. [ 3.3.5],. 292
ÜÆåìœãø áì ÜÆ Â åóâãôœ åõüô ãìèäõöœåã ÚãòâóãÕ ÜòêÃÖõëõ ÈÖŒâà ëõáõ  éæéæ È 3.3 [ 3.3.6] large_step 1 0,.. [ 3.3.7].,.....,.,. k D [Szecsi03].,. (oldpath newpath).. ÖŒâÃêà à 3.3.5 293
åò 3 áæ,.., (modifytime, value) (pop). newpath nusedrandcoords. ContributePath( ),..,,. [ 10]. 250. 0.016(a) 0.012(b) msec. III/1.5GHz 9(a) 8(b) 294
ÜÆåìœãø áì ÜÆ Â åóâãôœ åõüô ãìèäõöœåã ÚãòâóãÕ ÜòêÃÖõëõ ÈÖŒâà ëõáõ  éæéæ È 3.3. [Kajiya86] Kajiya, J.T., The Rendering Equation, Computer Graphics (SIGGRAPH 86 Proceedings), pp. 143 150, 1986. [Kelemen02] Kelemen, Cs., L. Szirmay-Kalos, G. Antal, F. Csonka, A Simple and Robust Mutation Strategy for the Metropolis Light Transport Algorithm, Computer Graphics Forum (Eurographics 2002), Vol 21, no.3, pp. 531 540, 2002. [Shirley96] Shirley, P., C. Wang, K. Zimmerman, Monte Carlo Techniques for Direct Lighting Calculations, ACM Transactions on Graphics, Vol 15, no.1, pp.1 36, 1996. [Szécsi03] Szecsi, L., An Effective Implementation of the kd-tree, in Graphics Programming Methods, Charles River Media, 2003. [Szirmay00] Szirmay-Kalos, L., Monte-Carlo Methods in Global Illumination Script, Vienna University of Technology, 2000. CD-ROM [Veach95] Veach, E. L. Guibas, Optimally Combining Sampling Techniques for Monte Carlo Rendering, in Rendering Techniques 94, pp. 147 162, 1994. [Veach97a] Veach, E. L. Guibas, Metropolis Light Transport, Computer Graphics (SIGGRAPH 97 Proceedings), pp. 65 76, 1997. [Veach97b] Veach, E., Robust Monte Carlo Methods for Light Transport Simulation,, Stanford University, http://graphics.stanford. edu/papers/veach_thesis, 1997. 295
åò 3 áæ 3.4 wleeson@indigo.ie CD CD-ROM. (Bidirectional Scattering Distribution Function, BSDF). BSDF, (BRDF),., (Probabitlity Density Function, PDF). (rejection sampling),. [Whitlock86, Meyn93, Rubinstein81, Swartz00] 3.4.1. ( ), ( ) 296
ÜòêÃÖõëõ ÈÖŒâà ܌ÈÉõ éæåó 3.4., [ 3.4.1]..... (startup-bias). f (x) Markov., (detailed balance condition) [Whitlock86, Meyn93, Rubinstein81, Swartz00]. [ 3.4.1] T(x x9) x x9 a(x x9) x x9.. (MH)[Swartz00]. [ 3.4.2] a(x x9) Markov. [0, 1]z a(x x9),. T(x y) [ 3.4.2]., [ 3.4.2]., (scrambling)..,. a, b, c 297
åò 3 áæ z(a), z(b), z(c), z p (x y). z(a) b, c,. [ 3.4.3] a a b c,. [ 3.4.4] [ 3.4.3],. [ 3.4.5]. [ 3.4.6] p (x x9) a(x x9) T (x x9)., 1/4., 1/2, 1/4. 3.4.2 298
ÜòêÃÖõëõ ÈÖŒâà ܌ÈÉõ éæåó 3.4 ( ). [Kajiya86],. [Pattanaik93], ( )... 0..,. z i.,,.,., (Density Estimation, DE)[Silverman86]. DE,., ( ) ( ),., DE. [ 3.4.3]. DE. 299
åò 3 áæ 3.4.3 ( ).,... (x ) [ 3.4.7] n h ( ).. 300
ÜòêÃÖõëõ ÈÖŒâà ܌ÈÉõ éæåó 3.4, ( ),. ((x - h, x 1 h) ) [ 3.4.8]., K.. [ 3.4.9],.. [ 3.4.10] X i.,.. 3.4.4 301
åò 3 áæ ([ 3.4.4] ). k. [ 3.4.11] d k (t) x k. (photon mapping) [Jensen00].,.. [ 3.4.12] d j, k X j k., [Silverman86],. [Collins97] (Gaussian)., [ 3.4.1]. (indicator function). 0, Epanechnikov,. 302
ÜòêÃÖõëõ ÈÖŒâà ܌ÈÉõ éæåó 3.4 3.4.1 DE.,., x, n, X/n.,.., [Swartz00]. DE. 303
åò 3 áæ. CD-ROM, ([Kelemen2002] ).. ( ).. k D [Bentley75]., ( ).,.. MH ( ),...,.,.,.. 304
ÜòêÃÖõëõ ÈÖŒâà ܌ÈÉõ éæåó 3.4... 1., (, 1 ).,..,.. ( ). MH,., Zlib [Zlib], 1/3. MH BSDF.,. Veach MLT [Veach97] 3.4.5 305
åò 3 áæ. Veach DE. ( ). MLT. MH ([ 3.4.5] ). DE.. Trinity College Dublin Image Synthesis Group.. [Bentley75] Bentley, Jon Louis, Multidimensional Binary Search Trees used for Associative Searching, In Communications of ACM, volume 18, 509 517, 1975. [Collins97] Collins, Steven, Wavefront Tracking for Global Illumination Solutions,, Dept. of Computer Science, Trinity College Dublin, 1997 1 [Jensen00] Jensen, Henrik Wann, A Practical Guide to Global Illumination Using Photon Maps, SIGGRAPH 2000 CD-ROM, 2000 8 [Kajiya86] James T. Kajiya, The Rendering Equation, Computer Graphics (Proceedings of SIGGRAPH 86) Volume 20 No 4, 1986. [Meyn93] Meyn, S.P. and R.L. Tweedie, Markov Chains and Stochastic Stability, Springer-Verlag, 1993. [Pattanaik93] S. N. Pattanaik and S. P. Mudur, The Potential Equation and Importance in Illumination Computations, Computer Graphics Forum Volume 12 No2, 1993. 306
ÜòêÃÖõëõ ÈÖŒâà ܌ÈÉõ éæåó 3.4 [Rubinstein81] Rubinstein, Reuven Y., Simulation and the Monte Carlo Method, John Wiley and Sons, New York, 1981. [Silverman86] Silverman, B.W., Density Estimation for Statistics and Data Analysis, Chapman and Hall, 11 New Fetter Lane, London EC4P 4EE, 1986. [Swartz00] Michael Evans and Tim Swartz, Approximating Integrals via Monte Carlo and Deterministic Methods, Oxford University Press, Great Clarendon Street, Oxford OX2 6DP,, 2000. [Veach97] Veach, Eric and Leonidas J. Guibas, Metropolis Light Transport, Proceedings of SIGGRAPH 97, pp. 65 6, 1997 8. ISBN 0-89791?96-7. Los Angeles, California [Whitlock86] Kalos, Malvin H. and Paula A. Whitlock. Basics, Volume 1 of Monte Carlo Methods. John Wiley and Sons, New York, Chichester, Brisbane, Toronto and Singapore, 1986. [Zlib] Jean-loup Gailly and Mark Adler, Zlib, http://www. info-zip.org/pub/infozip/zlib/ 307