




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 食品添加剂安全性评估与合理使用在调味品行业的应用报告
- 小学教育信息化建设反思试题及答案
- 教育园区建设对2025年社会稳定风险评估与风险监测报告
- 机械装备制造业智能化升级与产品质量提升研究报告
- 教师教育教学改进表现的试题及答案
- 小学教师反思与校本培训的重要性试题及答案
- 山东石油化工学院《工程管理类软件应用含技术》2023-2024学年第一学期期末试卷
- 工业互联网平台安全升级之道:2025年漏洞扫描技术前瞻报告
- 曲阜远东职业技术学院《食品分析含实验》2023-2024学年第二学期期末试卷
- 市政公用工程法律法规试题及答案
- 设备维护工程师简历
- 2023版押品考试题库必考点含答案
- 挖孔桩基施工方案(水磨钻)
- 变电检修技能考试计算
- 国际经济法学(湘潭大学)智慧树知到答案章节测试2023年
- 以案说德发言四篇
- 大气污染控制工程课后题答案解析
- 临床试验伦理委员会伦理审查不同意见沟通的标准操作规程
- 梅毒诊疗指南(2023年)
- 高中物理3-3热学练习题(含答案)
- DB32-T 3916-2020建筑地基基础检测规程-(高清现行)
评论
0/150
提交评论