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.

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

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.

photonmap.png

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.

kdtree1.png
Cornell box radius 250cm: found 100
kdtree.png
Radius 50cm; found 100 photons
kdtree3.png
Radius 30cm; found 34 photons
kdtree4.png
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.

tree1.jpg
Rendering of a tree using a two-sided material with translucency
room-2048.jpg
Rendering of interior

 

cydc_012.png
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-material2.jpg
Blend material with reflective and rough refractive materials
twosided.png
The front face is shaded with the red material and the back is shaded with the blue material
two-sided1.png
Two-sided material with “Translucency” enabled

References

http://blog.turbosquid.com/2014/06/09/turbotips-v-ray-blend-material-part-1/

http://docs.chaosgroup.com/display/VRAY3MAX/Translucent+Two-Sided+Material+%7C+VRay2SidedMtl

http://www.ramyhanna.com/2008/06/translucent-leaves.html

http://www.josefbsharah.net/v-rayforc4d-basic-startup-part2-basix/