Saturday, May 5, 2007
CryEngine2特性剖析 — Terrain 2.5D Ambient Occlusion Maps, Real Time Ambient Maps
CryEngine2官方文档中,对这两个技术的描述是:
Terrain 2.5D Ambient Occlusion Maps: On a per pixel level, approximates the amount of ambient(fill) light reaching an object(static or dynamic) depending on the amount of ambient occlusion created by the surrounding foliage and structures.
Real Time Ambient Maps: Pre-calculate the amount of ambient(fill) light which will be applied to indoor surfaces, to improve the quality of lighting when applying real-time per-pixel lighting and shadows. This means the current light position and color can be dynamically added to the fill light intensity applied to illuminate surfaces in interior spaces.
之所以把这两个技术放到一起说,是因为它们都是关于全局光照(Global Illumination)的。
该技术的鼻祖,应该是ILM的Hayden Landis在2002年SigGraph上题为"Production-Ready Global Illumination"的讲座。文中提到了Ambient Environment Maps和Ambient Occlusion Maps。概括来说,Ambient Environment Maps“均匀”照亮一个物体,Ambient Occlusion Maps基于Ray-Tracing对Ambient Environment Maps做Attenuation,产生soft shadow效果,在计算Ambient Occlusion Maps的过程中,同时计算出“Bent Normal”,该值将被用来调制Surface的Normal作为Ambient Environment Maps的坐标。
从CryEngine2的特性描述和Demo效果来看,应该就是这两个技术的结合,当然还要结合一些后来的改进。
与此类似,Peter-Pike Sloan在2002年的一篇文章"Precomputed Radiance Transfer for Real-Time Rendering in Dynamic, Low-Frequency Lighting Environments",基本思想如出一辙。这个文章读起来会有些累,个人建议可以看来自于SCEA的Robin Green题为"Spherical Harmonic Lighting: The Gritty Details"的文章,文中包括了技术和实现细节,超棒!再推荐一篇文章"Global Illumination Compendium",内容不多说,看了就知道。
前面提到的技术,基于Ray-Tracing,需要Pre-Computing。2005年的GPU Gems2中,Nvidia的Michael Bunnell的文章"Dynamic Ambient Occlusion and Indirect Lighting",提出了一种新的方法,舍弃了Ray-Tracing,从而可以实时计算Ambient Occlusion。
还有两篇文章,个人觉得值得关注,分别是"Approximate Ambient Occlusion For Trees"和"Real-Time Ambient Occlusion for Dynamic Character Skins"。树和人,值得用不同的技术。
应用了上面的技术,你的游戏在这些效果上也可以达到CryEngine2的水平了。
Subscribe to:
Posts (Atom)