import{_ as d,c as a,a as m,b as Q,d as l,o as t}from"./app-DPgwpJxh.js";const n="/assets/reflectance_equation-CS7cZbpx.jpg",e={},s={class:"MathJax",jax:"SVG",style:{position:"relative"}},o={style:{"vertical-align":"-0.357ex"},xmlns:"http://www.w3.org/2000/svg",width:"2.371ex",height:"2.271ex",role:"img",focusable:"false",viewBox:"0 -846 1047.9 1003.8","aria-hidden":"true"},r={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},g={style:{"vertical-align":"-2.028ex"},xmlns:"http://www.w3.org/2000/svg",width:"36.252ex",height:"5.107ex",role:"img",focusable:"false",viewBox:"0 -1361 16023.4 2257.4","aria-hidden":"true"},h={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},H={style:{"vertical-align":"-2.028ex"},xmlns:"http://www.w3.org/2000/svg",width:"45.623ex",height:"5.107ex",role:"img",focusable:"false",viewBox:"0 -1361 20165.3 2257.4","aria-hidden":"true"},i={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},p={style:{"vertical-align":"-2.028ex"},xmlns:"http://www.w3.org/2000/svg",width:"73.137ex",height:"5.107ex",role:"img",focusable:"false",viewBox:"0 -1361 32326.4 2257.4","aria-hidden":"true"},u={class:"MathJax",jax:"SVG",style:{position:"relative"}},c={style:{"vertical-align":"-0.355ex"},xmlns:"http://www.w3.org/2000/svg",width:"6.828ex",height:"1.926ex",role:"img",focusable:"false",viewBox:"0 -694 3018.2 851.1","aria-hidden":"true"},L={class:"MathJax",jax:"SVG",style:{position:"relative"}},f={style:{"vertical-align":"-0.186ex"},xmlns:"http://www.w3.org/2000/svg",width:"5.592ex",height:"1.724ex",role:"img",focusable:"false",viewBox:"0 -680 2471.4 762","aria-hidden":"true"},M={class:"MathJax",jax:"SVG",style:{position:"relative"}},Z={style:{"vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"20.521ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 9070.1 1000","aria-hidden":"true"},x={class:"MathJax",jax:"SVG",style:{position:"relative"}},D={style:{"vertical-align":"0"},xmlns:"http://www.w3.org/2000/svg",width:"2.378ex",height:"1.545ex",role:"img",focusable:"false",viewBox:"0 -683 1051 683","aria-hidden":"true"},w={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},V={style:{"vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"37.37ex",height:"2.48ex",role:"img",focusable:"false",viewBox:"0 -846 16517.4 1096","aria-hidden":"true"},b={class:"MathJax",jax:"SVG",style:{position:"relative"}},v={style:{"vertical-align":"-0.464ex"},xmlns:"http://www.w3.org/2000/svg",width:"2.128ex",height:"2.059ex",role:"img",focusable:"false",viewBox:"0 -705 940.7 910","aria-hidden":"true"},y={class:"MathJax",jax:"SVG",style:{position:"relative"}},j={style:{"vertical-align":"-0.439ex"},xmlns:"http://www.w3.org/2000/svg",width:"13.618ex",height:"2.009ex",role:"img",focusable:"false",viewBox:"0 -694 6019.1 888","aria-hidden":"true"},O={class:"MathJax",jax:"SVG",style:{position:"relative"}},R={style:{"vertical-align":"-0.464ex"},xmlns:"http://www.w3.org/2000/svg",width:"2.128ex",height:"2.059ex",role:"img",focusable:"false",viewBox:"0 -705 940.7 910","aria-hidden":"true"},C={class:"MathJax",jax:"SVG",style:{position:"relative"}},k={style:{"vertical-align":"-0.357ex"},xmlns:"http://www.w3.org/2000/svg",width:"2.28ex",height:"1.902ex",role:"img",focusable:"false",viewBox:"0 -683 1008 840.8","aria-hidden":"true"},A={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},B={style:{"vertical-align":"-2.028ex"},xmlns:"http://www.w3.org/2000/svg",width:"21.814ex",height:"5.107ex",role:"img",focusable:"false",viewBox:"0 -1361 9641.6 2257.4","aria-hidden":"true"},X={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},F={style:{"vertical-align":"-2.159ex"},xmlns:"http://www.w3.org/2000/svg",width:"43.287ex",height:"5.821ex",role:"img",focusable:"false",viewBox:"0 -1618.4 19132.7 2572.7","aria-hidden":"true"},S={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},G={style:{"vertical-align":"-0.464ex"},xmlns:"http://www.w3.org/2000/svg",width:"11.22ex",height:"2.059ex",role:"img",focusable:"false",viewBox:"0 -705 4959.1 910","aria-hidden":"true"},J={class:"MathJax",jax:"SVG",style:{position:"relative"}},N={style:{"vertical-align":"-0.357ex"},xmlns:"http://www.w3.org/2000/svg",width:"2.28ex",height:"1.902ex",role:"img",focusable:"false",viewBox:"0 -683 1008 840.8","aria-hidden":"true"},E={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},P={style:{"vertical-align":"-0.357ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.128ex",height:"1.902ex",role:"img",focusable:"false",viewBox:"0 -683 4476.5 840.8","aria-hidden":"true"},q={class:"MathJax",jax:"SVG",style:{position:"relative"}},z={style:{"vertical-align":"-0.357ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.585ex",height:"1.902ex",role:"img",focusable:"false",viewBox:"0 -683 3794.5 840.8","aria-hidden":"true"},I={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},K={style:{"vertical-align":"-0.464ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.653ex",height:"2.464ex",role:"img",focusable:"false",viewBox:"0 -883.9 13106.7 1088.9","aria-hidden":"true"},U={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},W={style:{"vertical-align":"-1.577ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.43ex",height:"4.613ex",role:"img",focusable:"false",viewBox:"0 -1342 3284.3 2039","aria-hidden":"true"},Y={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},$={style:{"vertical-align":"-1.577ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.43ex",height:"4.106ex",role:"img",focusable:"false",viewBox:"0 -1118 3284.3 1815","aria-hidden":"true"},_={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},Q1={style:{"vertical-align":"-2.389ex"},xmlns:"http://www.w3.org/2000/svg",width:"21.213ex",height:"5.514ex",role:"img",focusable:"false",viewBox:"0 -1381 9376 2437","aria-hidden":"true"},T1={class:"MathJax",jax:"SVG",style:{position:"relative"}},a1={style:{"vertical-align":"0"},xmlns:"http://www.w3.org/2000/svg",width:"1.695ex",height:"1.538ex",role:"img",focusable:"false",viewBox:"0 -680 749 680","aria-hidden":"true"},t1={class:"MathJax",jax:"SVG",style:{position:"relative"}},m1={style:{"vertical-align":"-0.355ex"},xmlns:"http://www.w3.org/2000/svg",width:"2.117ex",height:"1.926ex",role:"img",focusable:"false",viewBox:"0 -694 935.6 851.1","aria-hidden":"true"},l1={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},d1={style:{"vertical-align":"-2.389ex"},xmlns:"http://www.w3.org/2000/svg",width:"60.236ex",height:"5.669ex",role:"img",focusable:"false",viewBox:"0 -1449.5 26624.4 2505.5","aria-hidden":"true"},n1={class:"MathJax",jax:"SVG",display:"true",style:{position:"relative"}},e1={style:{"vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"20.602ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 9106.1 1000","aria-hidden":"true"};function s1(o1,T){return t(),a("div",null,[T[73]||(T[73]=m('
',4)),Q("p",null,[T[2]||(T[2]=l("计算反射表面反射到")),Q("mjx-container",s,[(t(),a("svg",o,T[0]||(T[0]=[m('',1)]))),T[1]||(T[1]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])])])],-1))]),T[3]||(T[3]=l("方向上的来自于上半球所有方向入射光的辐射率"))]),T[74]||(T[74]=Q("figure",null,[Q("img",{src:n,alt:"",tabindex:"0",loading:"lazy"}),Q("figcaption")],-1)),Q("mjx-container",r,[(t(),a("svg",g,T[4]||(T[4]=[m('',1)]))),T[5]||(T[5]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mo",null,"="),Q("msub",null,[Q("mo",{"data-mjx-texclass":"OP"},"∫"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"normal"},"Ω")])]),Q("mi",null,"f"),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mi",null,"cos"),Q("mo",{"data-mjx-texclass":"NONE"},""),Q("msub",null,[Q("mi",null,"θ"),Q("mi",null,"i")]),Q("mi",null,"d"),Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")])])],-1))]),T[75]||(T[75]=Q("p",null,"上式称为反射方程(Reflectance Equation),用来计算表面反射辐射率",-1)),T[76]||(T[76]=Q("h3",{id:"_1-2-渲染方程",tabindex:"-1"},[Q("a",{class:"header-anchor",href:"#_1-2-渲染方程"},[Q("span",null,"1.2 渲染方程")])],-1)),T[77]||(T[77]=Q("p",null,[l("将反射方程增加上自发光因素,可以得到渲染方程("),Q("a",{href:"https://en.wikipedia.org/wiki/Rendering_equation",target:"_blank",rel:"noopener noreferrer"},"Rendering equation"),l(")")],-1)),Q("mjx-container",h,[(t(),a("svg",H,T[6]||(T[6]=[m('',1)]))),T[7]||(T[7]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"L"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",null,"o")])]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mo",null,"="),Q("msub",null,[Q("mi",null,"L"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",null,"e")])]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mo",null,"+"),Q("msub",null,[Q("mo",{"data-mjx-texclass":"OP"},"∫"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"normal"},"Ω")])]),Q("mi",null,"f"),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mi",null,"cos"),Q("mo",{"data-mjx-texclass":"NONE"},""),Q("msub",null,[Q("mi",null,"θ"),Q("mi",null,"i")]),Q("mi",null,"d"),Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")])])],-1))]),T[78]||(T[78]=Q("p",null,"完整形式的渲染方程,需要考虑到反射平面所处的位置、时间,光的波长这些因素,具体形式为",-1)),Q("mjx-container",i,[(t(),a("svg",p,T[8]||(T[8]=[m('',1)]))),T[9]||(T[9]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"bold"},"x")]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mi",null,"λ"),Q("mo",null,","),Q("mi",null,"t"),Q("mo",{stretchy:"false"},")"),Q("mo",null,"="),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"e")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"bold"},"x")]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mi",null,"λ"),Q("mo",null,","),Q("mi",null,"t"),Q("mo",{stretchy:"false"},")"),Q("mo",null,"+"),Q("msub",null,[Q("mo",{"data-mjx-texclass":"OP"},"∫"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"normal"},"Ω")])]),Q("mi",null,"f"),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"bold"},"x")]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mi",null,"λ"),Q("mo",null,","),Q("mi",null,"t"),Q("mo",{stretchy:"false"},")"),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"bold"},"x")]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mi",null,"λ"),Q("mo",null,","),Q("mi",null,"t"),Q("mo",{stretchy:"false"},")"),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,"⋅"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"bold"},"n")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mi",null,"d"),Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")])])],-1))]),T[79]||(T[79]=Q("h2",{id:"_2-反射方程分解",tabindex:"-1"},[Q("a",{class:"header-anchor",href:"#_2-反射方程分解"},[Q("span",null,"2. 反射方程分解")])],-1)),Q("p",null,[T[18]||(T[18]=l("根据前面的微表面理论分析,入射光能量在材质表面分解为两部分,高光反射部分,比例为")),Q("mjx-container",u,[(t(),a("svg",c,T[10]||(T[10]=[m('',1)]))),T[11]||(T[11]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("msub",null,[Q("mi",null,"k"),Q("mi",null,"s")]),Q("mo",null,"="),Q("mi",null,"F")])],-1))]),T[19]||(T[19]=l(",折射到材质内部的部分,比例为")),Q("mjx-container",L,[(t(),a("svg",f,T[12]||(T[12]=[m('',1)]))),T[13]||(T[13]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("mn",null,"1"),Q("mo",null,"−"),Q("mi",null,"F")])],-1))]),T[20]||(T[20]=l(",这部分能量一部分在材质内部转换为其他能量消失掉(对于金属材质为全部),一部分重新从表面发射出去,称为漫反射,所以漫反射的比例为")),Q("mjx-container",M,[(t(),a("svg",Z,T[14]||(T[14]=[m('',1)]))),T[15]||(T[15]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("msub",null,[Q("mi",null,"k"),Q("mi",null,"s")]),Q("mo",null,"="),Q("mo",{stretchy:"false"},"("),Q("mn",null,"1"),Q("mo",null,"−"),Q("mi",null,"F"),Q("mo",{stretchy:"false"},")"),Q("mo",{stretchy:"false"},"("),Q("mn",null,"1"),Q("mo",null,"−"),Q("mi",null,"M"),Q("mo",{stretchy:"false"},")")])],-1))]),T[21]||(T[21]=l(",其中")),Q("mjx-container",x,[(t(),a("svg",D,T[16]||(T[16]=[Q("g",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"scale(1,-1)"},[Q("g",{"data-mml-node":"math"},[Q("g",{"data-mml-node":"mi"},[Q("path",{"data-c":"1D440",d:"M289 629Q289 635 232 637Q208 637 201 638T194 648Q194 649 196 659Q197 662 198 666T199 671T201 676T203 679T207 681T212 683T220 683T232 684Q238 684 262 684T307 683Q386 683 398 683T414 678Q415 674 451 396L487 117L510 154Q534 190 574 254T662 394Q837 673 839 675Q840 676 842 678T846 681L852 683H948Q965 683 988 683T1017 684Q1051 684 1051 673Q1051 668 1048 656T1045 643Q1041 637 1008 637Q968 636 957 634T939 623Q936 618 867 340T797 59Q797 55 798 54T805 50T822 48T855 46H886Q892 37 892 35Q892 19 885 5Q880 0 869 0Q864 0 828 1T736 2Q675 2 644 2T609 1Q592 1 592 11Q592 13 594 25Q598 41 602 43T625 46Q652 46 685 49Q699 52 704 61Q706 65 742 207T813 490T848 631L654 322Q458 10 453 5Q451 4 449 3Q444 0 433 0Q418 0 415 7Q413 11 374 317L335 624L267 354Q200 88 200 79Q206 46 272 46H282Q288 41 289 37T286 19Q282 3 278 1Q274 0 267 0Q265 0 255 0T221 1T157 2Q127 2 95 1T58 0Q43 0 39 2T35 11Q35 13 38 25T43 40Q45 46 65 46Q135 46 154 86Q158 92 223 354T289 629Z"})])])],-1)]))),T[17]||(T[17]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("mi",null,"M")])],-1))]),T[22]||(T[22]=l("表示金属度,范围从0到1,所以可以将反射方程中的BRDF分解为两部分"))]),Q("mjx-container",w,[(t(),a("svg",V,T[23]||(T[23]=[m('',1)]))),T[24]||(T[24]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("mi",null,"f"),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mo",null,"="),Q("msub",null,[Q("mi",null,"k"),Q("mi",null,"d")]),Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"d")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mo",null,"+"),Q("msub",null,[Q("mi",null,"k"),Q("mi",null,"s")]),Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"s")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,","),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")")])],-1))]),T[80]||(T[80]=Q("h2",{id:"_3-lambert漫反射模型",tabindex:"-1"},[Q("a",{class:"header-anchor",href:"#_3-lambert漫反射模型"},[Q("span",null,"3. Lambert漫反射模型")])],-1)),Q("p",null,[T[33]||(T[33]=Q("a",{href:"https://zhuanlan.zhihu.com/p/21489591",target:"_blank",rel:"noopener noreferrer"},"参考",-1)),T[34]||(T[34]=l(" Lambert模型认为,材质的漫反射是均匀发射到所有方向的,所以")),Q("mjx-container",b,[(t(),a("svg",v,T[25]||(T[25]=[m('',1)]))),T[26]||(T[26]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"d")])])],-1))]),T[35]||(T[35]=l("是一个常数,先设想一个最简单的情况,材质只有漫反射,也就是")),Q("mjx-container",y,[(t(),a("svg",j,T[27]||(T[27]=[m('',1)]))),T[28]||(T[28]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("msub",null,[Q("mi",null,"k"),Q("mi",null,"d")]),Q("mo",null,"="),Q("mn",null,"1"),Q("mo",null,","),Q("msub",null,[Q("mi",null,"k"),Q("mi",null,"s")]),Q("mo",null,"="),Q("mn",null,"0")])],-1))]),T[36]||(T[36]=l(",入射光均匀遍布所有的方向,而且每个方向的亮度都是相同的常数。因为这样")),Q("mjx-container",O,[(t(),a("svg",R,T[29]||(T[29]=[m('',1)]))),T[30]||(T[30]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"d")])])],-1))]),T[37]||(T[37]=l("和")),Q("mjx-container",C,[(t(),a("svg",k,T[31]||(T[31]=[m('',1)]))),T[32]||(T[32]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")])])],-1))]),T[38]||(T[38]=l("都是常数,可以提到积分外面。反射方程变成"))]),Q("mjx-container",A,[(t(),a("svg",B,T[39]||(T[39]=[m('',1)]))),T[40]||(T[40]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"o")]),Q("mo",null,"="),Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"d")]),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")]),Q("msub",null,[Q("mo",{"data-mjx-texclass":"OP"},"∫"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"normal"},"Ω")])]),Q("mi",null,"cos"),Q("mo",{"data-mjx-texclass":"NONE"},""),Q("msub",null,[Q("mi",null,"θ"),Q("mi",null,"i")]),Q("mi",null,"d"),Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")])])],-1))]),T[81]||(T[81]=Q("p",null,"计算这个半球积分",-1)),Q("mjx-container",X,[(t(),a("svg",F,T[41]||(T[41]=[m('',1)]))),T[42]||(T[42]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("mstyle",{displaystyle:"true",scriptlevel:"0"},[Q("mrow",{"data-mjx-texclass":"ORD"},[Q("msub",null,[Q("mo",{"data-mjx-texclass":"OP"},"∫"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"normal"},"Ω")])]),Q("mi",null,"cos"),Q("mo",{"data-mjx-texclass":"NONE"},""),Q("mi",null,"θ"),Q("mi",null,"d"),Q("mi",null,"ω"),Q("mo",null,"="),Q("msubsup",null,[Q("mo",{"data-mjx-texclass":"OP"},"∫"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mo",null,"−"),Q("mi",null,"π")]),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",null,"π")])]),Q("msubsup",null,[Q("mo",{"data-mjx-texclass":"OP"},"∫"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mn",null,"0")]),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",null,"π"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mo",null,"/")]),Q("mn",null,"2")])])]),Q("mi",null,"sin"),Q("mo",{"data-mjx-texclass":"NONE"},""),Q("mo",{stretchy:"false"},"("),Q("mi",null,"θ"),Q("mo",{stretchy:"false"},")"),Q("mi",null,"cos"),Q("mo",{"data-mjx-texclass":"NONE"},""),Q("mo",{stretchy:"false"},"("),Q("mi",null,"θ"),Q("mo",{stretchy:"false"},")"),Q("mi",null,"d"),Q("mi",null,"θ"),Q("mi",null,"d"),Q("mi",null,"ϕ"),Q("mo",null,"="),Q("mi",null,"π")])])],-1))]),T[82]||(T[82]=Q("p",null,"得到",-1)),Q("mjx-container",S,[(t(),a("svg",G,T[43]||(T[43]=[m('',1)]))),T[44]||(T[44]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"o")]),Q("mo",null,"="),Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"d")]),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")]),Q("mi",null,"π")])],-1))]),Q("p",null,[T[47]||(T[47]=l("考虑一下,如果所有方向都有射向球面的光,而且每个方向的光强度都等于")),Q("mjx-container",J,[(t(),a("svg",N,T[45]||(T[45]=[m('',1)]))),T[46]||(T[46]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")])])],-1))]),T[48]||(T[48]=l(",那么小平面受到的入射光照度,应该等于光强度乘以半球面积。"))]),Q("mjx-container",E,[(t(),a("svg",P,T[49]||(T[49]=[m('',1)]))),T[50]||(T[50]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"E"),Q("mi",null,"i")]),Q("mo",null,"="),Q("mn",null,"2"),Q("mi",null,"π"),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")])])],-1))]),Q("p",null,[T[53]||(T[53]=l("根据能量守恒,光出射度")),Q("mjx-container",q,[(t(),a("svg",z,T[51]||(T[51]=[m('',1)]))),T[52]||(T[52]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("msub",null,[Q("mi",null,"M"),Q("mi",null,"o")]),Q("mo",null,"="),Q("msub",null,[Q("mi",null,"E"),Q("mi",null,"i")])])],-1))])]),Q("mjx-container",I,[(t(),a("svg",K,T[54]||(T[54]=[m('',1)]))),T[55]||(T[55]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"M"),Q("mi",null,"o")]),Q("mo",null,"="),Q("mn",null,"2"),Q("mi",null,"π"),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"o")]),Q("mo",null,"="),Q("mn",null,"2"),Q("msup",null,[Q("mi",null,"π"),Q("mn",null,"2")]),Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"d")]),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")]),Q("mo",null,"="),Q("mn",null,"2"),Q("mi",null,"π"),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")])])],-1))]),T[83]||(T[83]=Q("p",null,"可知",-1)),Q("mjx-container",U,[(t(),a("svg",W,T[56]||(T[56]=[m('',1)]))),T[57]||(T[57]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"d")]),Q("mo",null,"="),Q("mfrac",null,[Q("mn",null,"1"),Q("mi",null,"π")])])],-1))]),T[84]||(T[84]=Q("p",null,"考虑材质的颜色,在这里颜色可定义为对三原色的吸收比例,比如白色(1,1,1)表示不吸收任何光,红色(1,0,0)表示将绿色和蓝色完全吸收掉,所以最终漫反射的BRDF为",-1)),Q("mjx-container",Y,[(t(),a("svg",$,T[58]||(T[58]=[m('',1)]))),T[59]||(T[59]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"d")]),Q("mo",null,"="),Q("mstyle",{displaystyle:"true",scriptlevel:"0"},[Q("mfrac",null,[Q("mi",null,"c"),Q("mi",null,"π")])])])],-1))]),T[85]||(T[85]=Q("h2",{id:"_4-最终形式",tabindex:"-1"},[Q("a",{class:"header-anchor",href:"#_4-最终形式"},[Q("span",null,"4.最终形式")])],-1)),T[86]||(T[86]=Q("p",null,"Cook-Torrance模型其实就是一种材质的高光模型,公式",-1)),Q("mjx-container",_,[(t(),a("svg",Q1,T[60]||(T[60]=[m('',1)]))),T[61]||(T[61]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"f"),Q("mi",null,"s")]),Q("mo",null,"="),Q("mfrac",null,[Q("mrow",null,[Q("mi",null,"D"),Q("mi",null,"G"),Q("mi",null,"F")]),Q("mrow",null,[Q("mn",null,"4"),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"n"),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,"⋅"),Q("msub",null,[Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"ω"),Q("mo",{stretchy:"false"},"→")])]),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},")"),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"n"),Q("mo",{stretchy:"false"},"→")])]),Q("mo",null,"⋅"),Q("msub",null,[Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"ω"),Q("mo",{stretchy:"false"},"→")])]),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},")")])])])],-1))]),Q("p",null,[T[66]||(T[66]=l("中的")),Q("mjx-container",T1,[(t(),a("svg",a1,T[62]||(T[62]=[Q("g",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"scale(1,-1)"},[Q("g",{"data-mml-node":"math"},[Q("g",{"data-mml-node":"mi"},[Q("path",{"data-c":"1D439",d:"M48 1Q31 1 31 11Q31 13 34 25Q38 41 42 43T65 46Q92 46 125 49Q139 52 144 61Q146 66 215 342T285 622Q285 629 281 629Q273 632 228 634H197Q191 640 191 642T193 659Q197 676 203 680H742Q749 676 749 669Q749 664 736 557T722 447Q720 440 702 440H690Q683 445 683 453Q683 454 686 477T689 530Q689 560 682 579T663 610T626 626T575 633T503 634H480Q398 633 393 631Q388 629 386 623Q385 622 352 492L320 363H375Q378 363 398 363T426 364T448 367T472 374T489 386Q502 398 511 419T524 457T529 475Q532 480 548 480H560Q567 475 567 470Q567 467 536 339T502 207Q500 200 482 200H470Q463 206 463 212Q463 215 468 234T473 274Q473 303 453 310T364 317H309L277 190Q245 66 245 60Q245 46 334 46H359Q365 40 365 39T363 19Q359 6 353 0H336Q295 2 185 2Q120 2 86 2T48 1Z"})])])],-1)]))),T[63]||(T[63]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("mi",null,"F")])],-1))]),T[67]||(T[67]=l("就是高光反射的分量比例")),Q("mjx-container",t1,[(t(),a("svg",m1,T[64]||(T[64]=[m('',1)]))),T[65]||(T[65]=Q("mjx-assistive-mml",{unselectable:"on",display:"inline"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[Q("msub",null,[Q("mi",null,"k"),Q("mi",null,"s")])])],-1))]),T[68]||(T[68]=l(",所以结合在一起,得到最终的渲染方程为"))]),Q("mjx-container",l1,[(t(),a("svg",d1,T[69]||(T[69]=[m('',1)]))),T[70]||(T[70]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mo",null,"="),Q("msub",null,[Q("mi",null,"L"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",null,"e")])]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"o")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mo",null,"+"),Q("msub",null,[Q("mo",{"data-mjx-texclass":"OP"},"∫"),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mi",{mathvariant:"normal"},"Ω")])]),Q("mrow",{"data-mjx-texclass":"INNER"},[Q("mo",{"data-mjx-texclass":"OPEN"},"("),Q("msub",null,[Q("mi",null,"k"),Q("mi",null,"d")]),Q("mstyle",{displaystyle:"true",scriptlevel:"0"},[Q("mfrac",null,[Q("mi",null,"c"),Q("mi",null,"π")])]),Q("mo",null,"+"),Q("mstyle",{displaystyle:"true",scriptlevel:"0"},[Q("mfrac",null,[Q("mrow",null,[Q("mi",null,"D"),Q("mi",null,"G"),Q("mi",null,"F")]),Q("mrow",null,[Q("mn",null,"4"),Q("mo",{stretchy:"false"},"("),Q("msub",null,[Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"ω"),Q("mo",{stretchy:"false"},"→")])]),Q("mi",null,"o")]),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"n"),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mo",{stretchy:"false"},"("),Q("msub",null,[Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"ω"),Q("mo",{stretchy:"false"},"→")])]),Q("mi",null,"i")]),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"n"),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")")])])]),Q("mo",{"data-mjx-texclass":"CLOSE"},")")]),Q("msub",null,[Q("mi",null,"L"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"("),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")]),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mo",{stretchy:"false"},"("),Q("msub",null,[Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"ω"),Q("mo",{stretchy:"false"},"→")])]),Q("mi",null,"i")]),Q("mrow",{"data-mjx-texclass":"ORD"},[Q("mover",null,[Q("mi",null,"n"),Q("mo",{stretchy:"false"},"→")])]),Q("mo",{stretchy:"false"},")"),Q("mi",null,"d"),Q("msub",null,[Q("mi",null,"ω"),Q("mi",null,"i")])])],-1))]),T[87]||(T[87]=Q("p",null,"其中",-1)),Q("mjx-container",n1,[(t(),a("svg",e1,T[71]||(T[71]=[m('',1)]))),T[72]||(T[72]=Q("mjx-assistive-mml",{unselectable:"on",display:"block"},[Q("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[Q("msub",null,[Q("mi",null,"k"),Q("mi",null,"d")]),Q("mo",null,"="),Q("mo",{stretchy:"false"},"("),Q("mn",null,"1"),Q("mo",null,"−"),Q("mi",null,"F"),Q("mo",{stretchy:"false"},")"),Q("mo",{stretchy:"false"},"("),Q("mn",null,"1"),Q("mo",null,"−"),Q("mi",null,"M"),Q("mo",{stretchy:"false"},")")])],-1))])])}const g1=d(e,[["render",s1],["__file","render_function_1.html.vue"]]),h1=JSON.parse('{"path":"/note/graphics/illumination_model/render_function/render_function_1.html","title":"渲染方程(一)","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"1. 定义","slug":"_1-定义","link":"#_1-定义","children":[{"level":3,"title":"1.1 反射方程","slug":"_1-1-反射方程","link":"#_1-1-反射方程","children":[]},{"level":3,"title":"1.2 渲染方程","slug":"_1-2-渲染方程","link":"#_1-2-渲染方程","children":[]}]},{"level":2,"title":"2. 反射方程分解","slug":"_2-反射方程分解","link":"#_2-反射方程分解","children":[]},{"level":2,"title":"3. Lambert漫反射模型","slug":"_3-lambert漫反射模型","link":"#_3-lambert漫反射模型","children":[]},{"level":2,"title":"4.最终形式","slug":"_4-最终形式","link":"#_4-最终形式","children":[]}],"git":{},"filePathRelative":"note/graphics/illumination_model/render_function/render_function_1.md"}');export{g1 as comp,h1 as data};