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的更多相关文章

  1. Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十一章:环境光遮蔽(AMBIENT OCCLUSION)

    原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十一章:环境光遮蔽(AMBIENT OCCLUSION) 学习目标 ...

  2. Ambient Occlusion

    一般在光照模型中,ambient light的计算方法为:A = l * m,其中l表示表面接收到的来自光源的ambient light的总量,而m表示表面接收到ambient light后,反射和吸 ...

  3. GLSL实现Ambient Occlusion 【转】

    http://blog.csdn.net/a3070173/archive/2008/11/04/3221181.aspx 相信使用OpenGl或DirectX3D的朋友都知道到固定功能管线在光照处理 ...

  4. TSSAO Temporal Screen-Space Ambient Occlusion (Unity3d 5 示例实现)

    前提 环境光(ambient occlusion)是一种GI,其简化形式SSAO可以用“微量高效”来形容,消耗得很少,得到的效果很好.环 境光遮蔽(ambient occlusion)的本质是计算在一 ...

  5. [帖子收集]环境光遮蔽(Ambient Occlusion)

    环境光遮蔽,效果示例图 图片左边是一条龙的简单模型,呈现在一个均匀照明的环境中.尽管模型中有一些明暗不同的区域,但大部分光照都是均匀的.虽然模型有着相当复杂的几何形状,但看上去比较光滑平坦,没有明显的 ...

  6. Cesium源码剖析---Ambient Occlusion(环境光遮蔽)

    Ambient Occlusion简称AO,中文没有太确定的叫法,一般译作环境光遮蔽.百度百科上对AO的解释是这样的:AO是来描绘物体和物体相交或靠近的时候遮挡周围漫反射光线的效果,可以解决或改善漏光 ...

  7. unity5.6里Baked Lighting下面几个Lighting Mode的解释

    这个似乎是新增的功能,目前在官方文档里还没有解释,但有一个链接指向『草案』, 可是链接在被墙的google doc上,为了方便阅读和备忘,全部贴过来整在一起: 因为原文太长,把总结写在前面吧: 1.四 ...

  8. 【Unity】13.2 通过Lighting Window设置相关参数

    分类:Unity.C#.VS2015 创建日期:2016-05-19 一.简介 Unity 5.3.4的Lighting Window有3个选项卡:Object.Scene.Lightmaps. 二. ...

  9. Unity Lighting(一)光照练习

    Unity 2018.1.2f1 原文链接:https://www.youtube.com/watch?v=VnG2gOKV9dw Unity Lighting练习最终效果 眼睛.光源与物体 光学基础 ...

随机推荐

  1. FastJson 常见问题

    一.场景 在使用序列化的时候,Object里包含了两个一模一样的对象,所以解析的时候,只有第一个能解析出来,另外一个无法显示. 查看了json的序列化源码,发现是DisableCircularRefe ...

  2. Echarts按需引入后没有显示图例问题

    因为Echarts官网的例子都是引入整个Echarts.js.如果使用按需引入对应模块就要记得引入legend模块,才能显示出图例. 例如这样: require("echarts/lib/c ...

  3. webpack简单学习的入门教程

    前言,如果按照官网的安装办法: npm install webpack -g 安装的是最新版的,然后就莫名其妙的有问题(可以安装,但运行有问题).我是小白,我也不知道具体原因,所以我换成2.5.1版本 ...

  4. Python基础-月考

    1. 8<<2等于? # 解释:将8按位左移2位 # 8 0 0 0 0 1 0 0 0 # 32 0 0 1 0 0 0 0 0 2. 通过内置函数计算5除以2的余数 print(div ...

  5. 007API网关服务Zuul

    001.POM配置 和普通Spring Boot工程相比,增加了Eureka Client.Zuul依赖和Spring Cloud依赖管理 <dependencies> <depen ...

  6. [小北De编程手记] : Lesson 04 - Selenium For C# 之 API 上

    这一部分,我准备向大家介绍Selenium WebDriver的常用API,学习这部分内容需要大家最好有一些简单的HTML相关知识,本文主要涉及到以下内容: Selenium API:元素检查 Sel ...

  7. C++基础--回调的应用

    一.类成员函数的回调 1. 类成员函数的回调,函数的调用必须通过类来调用: CallBack.h #pragma once class CallBack { public: CallBack(); ~ ...

  8. Thinkphp中在本地测试很好,在服务器上出错,有可能是因为debug缓存的问题

    define('APP_DEBUG',false); 这个设置从true改为false后,一定要清空缓存,否则会出错.

  9. mobile webiste 中的css的font-size em及line-height等换算

    在mobile web设计 中,我们常常需要使用em这个字体大小的单位.em到底是多少呢? em到底应该设置为多少个em呢?通常换算成方法是1em=target fontsize we want/fo ...

  10. 面对IBM与亚马逊的犄角攻势,微软云如何招架?

    亚马逊AWS和微软Azure是全球公有云的焦点.不就前公布的财报不久前公布的财报,这两家公司云计算的收入越来越接近,从数据显示来看,亚马逊的利润比微软稍高,有人称微软云的高增长来自于捆绑销售,背后真正 ...