




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、makebettergamesrendering outdoor light scattering in real timenaty hoffmanwestwood sarcot j preethamati r makebettergamesoutline basics atmospheric light scattering radiometric quantities from radiance to pixels scattering theory absorption, out-scattering, in-scattering rayleigh and mie scattering
2、implementation aerial perspective, sunlight, skylight vertex shader future workmakebettergames is caused by a variety of particles molecules, dust, water vapor, etc. these can cause light to be: scattered into the line of sight (in-scattering) scattered out of the line of sight (out-scattering) abso
3、rbed altogether (absorption)atmospheric light scattering illuminates the skyatmospheric light scattering attenuates and colors the sunatmospheric light scattering attenuates and colors distant objectsatmospheric light scatteringatmospheric light scattering varies by time of day weather pollutionatmo
4、spheric light scattering varies by time of day weather pollutionatmospheric light scattering varies by time of day weather pollutionatmospheric light scattering varies by time of day weather pollution varies between planetsatmospheric light scatteringmakebettergames extinction (absorption, out-scatt
5、ering) phenomena which remove light multiplicative: in-scattering: phenomenon which adds light additive: combined: atmospheric light scattering0exextinctionlflinlin0exscatteringllflmakebettergamesradiometric quantities radiant flux radiance irradiancemakebettergamesradiometric quantities radiant flu
6、x quantity of light through a surface radiant power (energy / time) wattmakebettergamesradiometric quantities radiance l quantity of light in a single ray radiant flux / area / solid angle watt / (meter2 * steradian)makebettergamesradiometric quantities irradiance e quantity of light incident to a s
7、urface point incident radiant flux / area (watt / meter2) radiance integrated over hemispheremakebettergamesfrom radiance to pixels compute radiance incident to eye through each screen pixelmakebettergamesfrom radiance to pixels pixel value based on radiance but radiance is distributed continuously
8、along the spectrum we need three numbers: r, g, bmakebettergamesfrom radiance to pixels spd (spectral power distribution) to rgb fast approach: do all math at r, g, b sample wavelengths correct approach: use spds, convert final radiance to rgb 400nm 500nm 600nm 700nmsmlmakebettergamesabsorption abso
9、rption cross section absorbed radiant flux per unit incident irradiance units of area (meter2)abeabmakebettergamesabsorption absorption cross sectionabeabeababmakebettergamesabsorption absorption coefficient particle densitytimes absorption cross section units of inverse length (meter-1)abababmakebe
10、ttergamesabsorption total absorption cross section: probability of absorption:adsdsa aabababababababab aapdsmakebettergamesabsorption attenuation of radiance from travel through a constant-density absorptive medium: selslab0l0l(s)smakebettergamesout-scattering exactly as in the absorption case scatt
11、ering cross section scattering coefficient attenuation due to out-scattering in a constant-density medium: selslsc0scscscscscmakebettergamesextinction both absorption and out-scattering attenuate light they can be combined as extinction extinction coefficient total attenuation from extinction selsle
12、x0 sesfexexscabexmakebettergamesin-scattering light is scattered into a view ray from all directions from the sun from the sky from the ground we will only handle in-scattering from the sunmakebettergamesin-scattering where does a scattered photon go? scattering phase function if a photon is scatter
13、ed, gives the probability it goes in direction most atmospheric particles are spherical or very small:,f, ff,makebettergamesin-scattering how do we usefor in-scattering? in-scatter probability: in-scatter radiance :eye raysun f sunf sunsunsuneflfsunmakebettergamesin-scattering in-scattering over a p
14、ath radiance from a single event: over a distance ds: angular scattering coefficient in-scattering over ds: units of: meter-1 * steradian-1 fscsc sunef dsefscsun dsescsun scmakebettergamesin-scattering added radiance from solar in-scattering through a constant-density scattering medium: seeslex11,sc
15、sunexins,inslmakebettergamesextinction and in-scattering ,f,inex0slslsl sesexexf seeslex11,scsunexins, sl0lmakebettergamesextinction and in-scattering ,f,inex0slslsl compare to hardware fog: monochrome extinction added color completely non-directional scslslff-1fog0makebettergamesrayleigh scattering
16、 small particles is proportional to05. 0rsc4makebettergamesrayleigh scattering phase function: 2rcos1163frayleigh scatteringmakebettergamesmie scattering larger, spherical particles phase function approximation: henyey-greenstein 2/322hgcos2141gggf0-0.5-0.750.50.75makebettergamesmie scattering wavel
17、ength dependence complex and depends on exact size of particle in practice, air usually contains a mix of various sizes of mie particles in the aggregate these tend to average out any wavelength dependencemie scatteringmakebettergamescombined scattering in practice, air contains both rayleigh and mi
18、e scatterers absorption is usually slight we will use:miescrayleighscex hgmiescrrayleighscsc ffmakebettergames atmospheric parameters: constant? affected by extinction constant:parametersmiescrayleighschggsune0sunewith scatteringwithout scatteringhow ?implementation aerial perspective extinction &am
19、p; inscattering rays low in atmosphere constant density good approximation implementations sunlight is white density is not constant! use a more accurate model for fex?implementationex0sungroundsunfee0sunegroundsune0sune sunlight: virtual sky dome, use simple modelimplementationdensitydistance r r s
20、 sky color: density is not constant! more accurate model too expensive many computations needed per frame sky geometry virtual sky domeimplementation,inskyflmakebettergamesimplementation compute: can be done with textures 1d texture for texture coordinate is a function of s 2d texture for texture co
21、ords are functions of s, combine in pixel shader we decided on a different approach ,f,inex0slslslexfinlmakebettergamesimplementation compute: use vertex shader to compute apply as vertex interpolated colors in pixel shader, or even fixed pipeline pros: doesnt use valuable texture slots can change a
22、tmosphere properties cons: somewhat dependent on tessellationinex,fl ,f,inex0slslslmakebettergamesvertex shaderrhggextf od0positionmin od1lsun directioneye positionvertexshadertransform matrixconstants:suneoutputs:makebettergamesvertex shader sesmrexf seeslmr1,sunmrmrin ,f,inex0slslsl 2rrcos1163 2/3
23、22mmcos21141gggmakebettergamesvertex shader current implementation: 33 instructions not including macro expansion could probably be optimized 8 registersx=l0fexl0 * fexl = l0 * fex + linpixel shader+=l0 * fexlinl = l0 * fex + linl = l0 * fex + linpixel shaderresultsrayleigh scattering - highmie scat
24、tering - lowsun altitude - highrayleigh scattering - lowmie scattering - highsun altitude - highrayleigh scattering - mediummie scattering - mediumsun altitude - lowplanet mars like scatteringdemomakebettergamesconclusion scattering is easy to implement. easy to add to an existing rendering framewor
25、k compute fex and lin apply these to existing color to get final colormakebettergamesfuture work in-scattering from sky clouds (scattering and extinction) volumetric cloud shadows non-uniform density distributions full-spectrum math?makebettergamesacknowledgements we would like to thank kenny mitchell for the terrain engine used in our demo solomon srinivasan for help with the demo m
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 河北學(xué)生團(tuán)建活動方案
- 榜樣宣講活動方案
- 四年級下冊期末作文押題《難忘的一件事》
- 2024年度安全質(zhì)量年度工作總結(jié)
- 休閑童裝品牌消費者購買決策的影響因素分析及應(yīng)對策略
- 化學(xué)職前教師教學(xué)策略選擇機(jī)制研究
- 聚羧酸減水劑對水泥水化產(chǎn)物熱分解特性的影響及動力學(xué)機(jī)制探討
- 合作是否能夠提升充電運營商的能力
- 高糖環(huán)境對人體視網(wǎng)膜微血管細(xì)胞的損傷機(jī)制與修復(fù)策略
- 燕子專列說課課件
- 2025年黑龍江省龍東地區(qū)中考語文試卷真題(含標(biāo)準(zhǔn)答案解析)
- 冠心病不穩(wěn)定型心絞痛護(hù)理查房講課件
- 微風(fēng)發(fā)電可行性研究報告
- 第一套路面工程考試試題及答案
- GB∕T 22590-2021 軋鋼加熱爐用耐火澆注料
- 研發(fā)部程序文件bom管理
- 大件運輸管理制度
- 結(jié)構(gòu)化思維PPT通用課件
- 跨境電商模擬試題 (1)
- PE管閉水試驗表
- 沈陽市內(nèi)中小學(xué)教育培訓(xùn)機(jī)構(gòu)調(diào)查研究報告
評論
0/150
提交評論