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



Autumn Leaf

Fixing and playing around with things while I am trying to grasp the concept of photon mapping and the k-d tree data structure. I will try to get a working implementation by the end of next week since I have to hand in the fourth progress report.

Below is an autumn leaf that is starting to decay. The textures are by Wojciech Piwowarczyk from his autumn leaves texture pack which sadly does not contain any glossy maps. Unfortunately, he has removed his photo-scanned leaves asset which do contain the geometry for the leaves and all the associated maps.

click the image for full size since wordpress compresses the images.

Render with diffuse, normal, opacity and translucency map
Render showing translucency
Render of just the normal Map
3dsmax viewport; each plane has been successively scaled by 10% and spaced 10cm apart
An early test of translucency; the front face is white and the back is green

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