Point cloud and Brick map
Point cloud is just a group of lots of points in 3D space. Each point can store any type of information such as surface color, normal or S and T. Below example shows point cloud that stores surface color which is just a noise color.
We could store just simple noise color, but normally we want to use it for something heavier, so it can be re-used later without expensive calculation.
So, I tried some expensive stuff like SSS, photon mapping, caustic, and final gathering. I followed “Photon Mapping for General Shaders”, “Translucency and Subsurface Scattering”, and “Caustics” in Pixar document.
First I tried SSS and found point cloud is not only used to store data but also used to calculate SSS or photon mapping using stand-alone software called ptfilter.
Direct illumination point cloud
I made a point cloud file that stores just a direct illumination data and used ptfilter to make another point cloud file that has subsurface scattering diffusion data.
ptfilter -ssdiffusion -material marble direct_rad_t.ptc ssdiffusion.ptc
Subsurface scattering diffusion point cloud
One of interesting things about generating SSS effect in ptfilter is that it has several material presets whose parameter names are “chicken1”, “ketchup” or “cream”. I tried all of thier presets and here are some.
Next step was to make brick map. Brick map is almost same as point cloud, but it can have multiple resolution so memory efficient. One of the known problems of point cloud is that even when we want to render a part of object, renderer read entire point cloud file. In this project, my final entire scene’s point cloud file size was 3.6G and could not even be opened in ptviewer because of lack of memory. Converted brick map size was 200Mb.
As I mentioned before, Point cloud can be used to make photon map. In Renderman 13.5, photons can be emitted from point cloud which was done by light source in previous version.
Hider "photon" "emit" 1000000 "emissionpointcloud" "box_direct.ptc"
Also, color bleeding can be done by point cloud using this rib procedure
Attribute "photon" "shadingmodel" "pointcloud:box_scattercoeffs.ptc"
However, at this time, for some reason, my point cloud didn’t work properly, so I went to a traditional way which is using light source as a photon emitter. I’ll try point based technique later because I think it is necessary. In this project, I used also gather() for blured refraction and final gathering and felt it's almost impossible to get a production quality on time because it’s too slow.
Making caustic effect was done by photon from light. The process is pretty same as global photon mapping.
Caustic : Attribute "photon" "globalmap" "box_gpm.ptc"
Global photon map : Attribute "photon" "causticmap" "box_cpm.ptc"
Caustic point cloud
Global photon map is too noisy to be directly rendered. Even if we emit more photons it is impossible to fill every single micro polygons in the scene, so we use a technique called Final Gathering. This could be done also by point-based, but at this time, I went to traditional way, ray-tracing which I shouldn’t have done. My problem at this point was the point cloud created by this step
ptfilter -photonmap -nphotons 200 box_gpm.ptc box_rad.ptc
didn’t have “_area” data. Without “_area”, I couldn’t use point-base technique. I’ll figure it out later.
Global Photon Mapping point cloud
Global Photon Mapping with Final Gathering
Finally, I tried to combined all datas(SSS, global photon map, caustic, and final gatering) together and baked them as Cs into single point cloud and converted to brick map.
In most case, it would be better to stay separated files for later tweaking, but for this homework, I wanted to try to render brick map as Geometry which is new feature in Renderman 13.0. Honestly, still I couldn’t find a significant benefit of rendering a brick map as geometry.
Brick Map as Geometry