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.

最新文章

  1. java入门笔记
  2. ORA-00060:等待资源时检测到死锁的一种处理方法
  3. [BZOJ1407][NOI2002]Savage(扩展欧几里德)
  4. log4j2配置
  5. ThinkPHP系的两个东东OneThink和ThinkCMF
  6. html中rel标签是什么意思
  7. Oracle报错,ORA-28001: 口令已经失效
  8. 函数lock_rec_get_n_bits
  9. 【POJ1330】Nearest Common Ancestors(树链剖分求LCA)
  10. sql 判断表、列、视图等是否存在
  11. 使用pager进行分页
  12. SQLSERVER2012 列存储索引的简单研究和测试
  13. hadoop-1.1.0 rpm + centos 6.3 64虚拟机 + JDK7 搭建分布式集群
  14. 关于数据结构的10个面试题(c语言实现)
  15. 基于HTTP协议的下载功能实现
  16. JavaScriptOOP
  17. 如何导入css和js?
  18. LeetCode专题-Python实现之第7题:Reverse Integer
  19. 用C#代码来安装、卸载、启动、关闭服务
  20. 游戏AI玩伴,是“神队友”还是“猪队友”?

热门文章

  1. 日常捕获的野生知识 - javascript 与 类
  2. hdu 4513 吉哥系列故事——完美队形II (manachar算法)
  3. android测试Code
  4. python schedule 任务调度
  5. pt-variable-advisor(percona toolkit)
  6. linux防火墙放行了端口,但是仍然访问不到
  7. 【转载】Kali-linux安装之后的简单设置
  8. monodevelop 基础用法
  9. 如何写Paper
  10. C#检验IIS版本、SQL Server版本、SilverLight版本