Dynamic Ambient Occlusion and Indirect Lighting
This sample was presented on the Nvida witesite, which detail a new idea to calculate the ambient occlusion and indirect lighting for dynamic objects under real time mode while still keep a good performace.
The basic idea of such kind of dynamic ambient occlusion and indirect lighting is take the vertex relationships into account. The relationship means whether one vertex cast shadow to other, what will happen when one caster already in shadow, and the most important one is how much one cast to other. After serveral calculation pass for all those dynamic vertex array, we could get a value for all vertex that could be used to dark the surface. That is for the ambient occlusion.
If we could find a way to calculate how one vertex cast shadow to others, we could find some similar method to calculate how one vertex re-light to others. Those light means indirect lights bound among those vertexs. That is indirect lighting. Here is screen shot about the dynamic ambient occlusion effect will be:
The technique provided here is one method that could get more realistic image. The best one is the phsyical lighting, which is too time consuming to implment it at real time. But some one already find some methods to improve the ambient lighting, like light mapping, spherical harmonic pre-lighting, BRDF with simplified fuction (or precaluted some values into texture) and so on. All of them could have a good performance.
I download the source code, and try to re-built on my compute. But I was failed because of the hardware limitation, it seems my computer OpenGL Pixel Shader Language could not support ‘while’ instruction. To make the program could run I have to replace the ‘while’ loop with a limit ‘for’ loop. The ‘while’ loop used to go though find all vertex that will cast shadow to a given one vertex. I think this part could be improved by find the most n items that contributes the most instead of list all items. Or Maybe I could find this issue by using some higher version OpenGL library. OpenGL ARB fuction too old not to use some advacned features on windows OS.
Here is the screen shot that work with limit first 12 items ‘for’ loop and ‘while’ removed: (use loop 12 times because of the limitation of the pixel shader instructions size, it seems the shader compile will convert loop instruction into un-loop instruction, that mean duplicate the code with looped times )
The full source code and translated document could be found from here.
Dynamic Ambient Occlusion and Indirect Lighting的更多相关文章
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十一章:环境光遮蔽(AMBIENT OCCLUSION)
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十一章:环境光遮蔽(AMBIENT OCCLUSION) 学习目标 ...
- Ambient Occlusion
一般在光照模型中,ambient light的计算方法为:A = l * m,其中l表示表面接收到的来自光源的ambient light的总量,而m表示表面接收到ambient light后,反射和吸 ...
- GLSL实现Ambient Occlusion 【转】
http://blog.csdn.net/a3070173/archive/2008/11/04/3221181.aspx 相信使用OpenGl或DirectX3D的朋友都知道到固定功能管线在光照处理 ...
- TSSAO Temporal Screen-Space Ambient Occlusion (Unity3d 5 示例实现)
前提 环境光(ambient occlusion)是一种GI,其简化形式SSAO可以用“微量高效”来形容,消耗得很少,得到的效果很好.环 境光遮蔽(ambient occlusion)的本质是计算在一 ...
- [帖子收集]环境光遮蔽(Ambient Occlusion)
环境光遮蔽,效果示例图 图片左边是一条龙的简单模型,呈现在一个均匀照明的环境中.尽管模型中有一些明暗不同的区域,但大部分光照都是均匀的.虽然模型有着相当复杂的几何形状,但看上去比较光滑平坦,没有明显的 ...
- Cesium源码剖析---Ambient Occlusion(环境光遮蔽)
Ambient Occlusion简称AO,中文没有太确定的叫法,一般译作环境光遮蔽.百度百科上对AO的解释是这样的:AO是来描绘物体和物体相交或靠近的时候遮挡周围漫反射光线的效果,可以解决或改善漏光 ...
- unity5.6里Baked Lighting下面几个Lighting Mode的解释
这个似乎是新增的功能,目前在官方文档里还没有解释,但有一个链接指向『草案』, 可是链接在被墙的google doc上,为了方便阅读和备忘,全部贴过来整在一起: 因为原文太长,把总结写在前面吧: 1.四 ...
- 【Unity】13.2 通过Lighting Window设置相关参数
分类:Unity.C#.VS2015 创建日期:2016-05-19 一.简介 Unity 5.3.4的Lighting Window有3个选项卡:Object.Scene.Lightmaps. 二. ...
- Unity Lighting(一)光照练习
Unity 2018.1.2f1 原文链接:https://www.youtube.com/watch?v=VnG2gOKV9dw Unity Lighting练习最终效果 眼睛.光源与物体 光学基础 ...
随机推荐
- VS code 自定义快捷输入
本文是从简书复制的, markdown语法可能有些出入, 想看"正版"和更多内容请关注 简书: 小贤笔记 位置 ctrl+shift+p 搜索: snippets 输入类型: 比如 ...
- Windows API 编程----将错误代码转换成错误描述信息
Windows编程有时会因为调用函数而产生错误,调用GetLastError()函数可以得到错误代码.如果错误代码为0,说明没有错误:如果错误代码不为0,则说明存在错误. 而错误代码不方便编程人员或用 ...
- VC6.0开发OCX按钮控件
原文:http://www.cnblogs.com/joinclear/archive/2013/05/21/3091934.html 0前言 1.OCX是典型的ActiveX控件,常见的OCX控件有 ...
- AS开发实战第二章学习笔记——其他
第二章学习笔记(1.19-1.22)像素Android支持的像素单位主要有px(像素).in(英寸).mm(毫米).pt(磅,1/72英寸).dp(与设备无关的显示单位).dip(就是dp).sp(用 ...
- 在 IDEA 中 配置 Maven
1.从 Maven官网下载 最新版的 Maven 2.设置Java相关环境变量 JAVA_HOME AVA_HOME=C:\jdk1.5.0_06 PATH ...
- 关于“为什么不加friend就会提示参数过多”
#include <iostream> using namespace std; class Complex { double real, imag; public: Complex(do ...
- Oracle GoldenGate 详解
一.Oracle GoldenGate介绍 GoldenGate软件是一种基于日志的结构化数据复制软件.GoldenGate 能够实现大量交易数据的实时捕捉.变换和投递,实现源数据库与目标数据库的数据 ...
- 教你如何封装异步网络连接NSURLConnection实现带有百分比的下载
教你如何封装异步网络连接NSURLConnection实现带有百分比的下载 注:本教程需要你对block有着较为深刻的理解,且对如何封装对象有着一些经验. 也许你已经用惯了AFNetworking2. ...
- flashback回收站知识汇总
查看回收站是否开启:SELECT Value FROM V$parameter WHERE Name = 'recyclebin'; 查看回收站中的数据:SELECT * FROM DBA_RECYC ...
- jemter 使用if控制器,选择需要的内容
背景:需要根据人员传入的变量,来选择运行的环境,调用不同的参数,进行拼接,使用到if控制器 取到的数据,调用的就是test1的数据