Participating media II

I managed to get participating media properly, well at least how I expect it to work.

Since there are only two weeks left before I have to hand in the final report I will probably stop implementing anything new and continue working on the report.

I will however try to create cover art to demonstrate the features that I have implemented thus far.

Voxel grid rendered using henyey-greenstein phase function g=-0.4
Constant volume; the light is coming from the top-right
Test render for proper occlusion with surfaces

Participating media

I have been trying to implement participating media, but it doesnt appear to be working correctly for heterogeneous media.

I am exporting the densities and temperatures out from maya, but its not producing the same results.




Photon Mapping

I have been trying to implement photon mapping following the book “realistic image synthesis using photon mapping”. Ive come into some problems like what to do with the photon’s power during the photon tracing stage and how to use the photon map for rendering. I am probably misunderstanding some parts so its producing strange results as you can see below.


KD Tree

I have been working on the data structure that is used in photon mapping during the photon emission stage. The kd tree seems to be choice so, I have been trying to implement a naive implementation just to get something working.

Below are some images debugging the data structure using opengl. They show the behaviour with different search radii with a max photon count of 100.

Cornell box radius 250cm: found 100
Radius 50cm; found 100 photons
Radius 30cm; found 34 photons
Radius 10cm; found 3 photons



Rendering Fun: Part II

I was playing around with the rendering engine some more this time trying to render  foliage and a simple interior. I hope that I can render with some better models if I have the time to.

Rendering of a tree using a two-sided material with translucency
Rendering of interior


Photograph of  Chiyodanomori Dental Clinic

The original photograph is by Daici Ano

Blend Material & Two-Sided Material

I have implemented two new materials. The first one is blend material, which adds a lot of power to the material system since you can arbitrarily use different materials on parts of the same mesh. The second material is two-sided material, which is useful for thin translucent materials like paper, lights, and leaves since it allows the back-face to receive light.

Below are three examples. The first one shows the blend material in action, the left sphere is a reflective sphere and the right is the blended material with a rough refractive material and the mask is the world map. The white parts receive 100% of material A and the black parts will receive 100% of material B, anything in-between receives a proportion of both.

For the two sided material the front facing parts relative to the camera receive material A while the back facing parts receive material B, and a flag for translucency to allow light to go through the back is optional and set as off by default. The second image shows a open cylinder with a two sided material. The third image shows an render with a spherical light place inside a tube, the interesting thing is that most of the light illuminating the scene is from indirect lighting.

Blend material with reflective and rough refractive materials
The front face is shaded with the red material and the back is shaded with the blue material
Two-sided material with “Translucency” enabled