My renderer update – Photon-Mapping(caustics) & Texture

来源:互联网 发布:淘宝 行业排名一直掉 编辑:程序博客网 时间:2024/05/16 07:15

In recent two weeks, I finished another two important components of a GI renderer: caustics and texture.

 

[Texture]: I use DevIL as the basic image loading library. DevIL also offers Mipmap building function. I adopt it directly and what I have implemented is to choose the most proper size sub-image

 

[Photon-Mapping (Caustic)]: The main reference is the seminal paper (Jenson, 1996). It requires another individual pass of photon projection from lights to objects. The photons will follow the regular paths of regular rays but they will stop on the diffuse surfaces. Each photon contains information of color & position. In the rendering pass, extra color estimation will be evaluated according to the photon densities of each pixel using reconstruction kernel functions.

 

As (Jenson 1996) mentioned, caustic computation requires high photon number, because small objects may generate a large scale of caustic due to the curvature – especially when you need high quality caustics. But I use Grid Acceleration on caustics reconstruction, so the caustic rendering now keeps a const cost of each pixel computation because of the identical grid index reference actions (but of course photon grid organization costs more time.)

 

A sample screenshot (3x anti-aliased, about 123k photons): 

 

 

Venus Caustics

 

Venus Caustics 2

 

Ring Caustics