Nicolas Sievers
Caustics
Last update: 04/19
Assignment:
Not really an assignment, but it is work towards generating caustics and refractions that we will use on the model I made
My Analysis:
Pretty tricky getting caustics to work properly. Took a lot of experimentation with the tutorials that come in the Renderman Docs. First just tried getting the chrome caustics to work by generating a photon map. I then placed a glass sphere in the scene to show some variety.
A photon map needs to be produced in the first pass then the produced photon map can be used in the render. Code that needs to be used, the following needs to be placed in your rib file to produce the photon map:
Hider "photon" "emit" 1000000
Attribute "photon" "causticmap" "causticrefl.cpm"
Then this code snippet needs to be placed above the geometry and then choose one of the types of photon caustic map properties. One of the rib files I used was caustic.rib this one was used for my final render seen neart the bottom of this page.
Attribute "photon" "shadingmodel" ["matte"|"translucent"|"chrome"|"glass"|"water"|"transparent"]
After the photon map is produced then it can be used for the scene. So then the following code would be used in your rib file to produce the scene:
Attribute "visibility" "trace" 1 # make objects visible to rays
Attribute "visibility" "transmission" "opaque" # for shadows
Attribute "photon" "causticmap" "causticrefl.cpm" Attribute "photon" "estimator" 200
Here is one of the first renders. This is with a chrome shader on the box and a glass shader on the sphere. There is just a regular spotlight in the scene. I forgot to save a screen shot of the generated photon map but I will show one from another render.

The previous photon map was used to produce the render below. This time there is glass shaders on both objects. I also changed the light to a spotlight with ray traced shadows.
The shadow were a little hard and the caustics reflection on the sphere could not be seen so I translated the light down and change the light to a "spherical pseudo area light" of which is in the Renderman documentation as the light shader 'spherelight'. The changes can be seen in the image to the right.

I then just changed up the scene a little back to the chrome/mirror shader. Here is the render with the accompanying photon map.

So for the following I placed the geometry I modeled and produced a map for it that is seen on the right. However if you take a look at the sphere in the right image there seems to be a problem. The refraction seems to be off as the top of the chrome box, which is reflecting yellow is being refracted in the glass. However the top of the box should not even be able to be seen by the sphere from that angle as the chrome sphere is completely opaque.

Code Links:
caustic.rib
causticlight.sl
glassrefr.sl