Pointclouds and brickmaps can improve the render performance greatly since they “bake” a 3d model with any shader data that is needed for the render just once, and can be used over and over again. In some cases the original model doesn’t even have to be used for the render, brickmap which is free of polygon, or nurbs data can be rendered easily and very fast without encountering any problems that modeling techniques may cause while deforming the object. In this example baking techniques have been used for creating an occlusion pass.

The car model used for this example was brought in from an earlier version of XSI as an obj file. It caused problems with normals in Maya. But that was easily solved with averaging the normals by a very small value which is a built in function in Maya. That solution worked for MentalRay.

But with RenderMan there was another problem, the model seemed not to have any s and t values at all. After working on it for some time I figured out that applying automatic texture projection to the model added the proper s and t values to the rib file. I believe this problem was caused by the obj export plug-in in XSI, which actually built a shader network that worked well with Maya and MentalRay, but probably messed up the u and v coordinates.

Here is how it works

The shader is responsible for creating a pointcloud if it doesn’t exist. Then the rib file takes over and bakes the pointcloud into a brickmap, which is tiny in size compared to the pointcloud and faster to render as well.

This takes some time with heavy models and pointcloud file size can easily go over 100-150 megs. After it is complete another rib file reads the brickmap as if it is an object, and renders it. At this point I tried adding render-heavy shaders to the brickmap and got a much much better performance than using the actual model.

The first picture shows the glass shader that usually takes more than 10 minutes to render on this model per frame. On the brick map it rendered in less than a minute with a HDR environment map.

The image to the right shows a test I ran with raytrace just to see what would I get. I was expecting a very noisy shadow with tiny holes everywhere. But the points in the brickmap were so close to each other, raytracing worked as if it was a real geometry. Brickmap is rendered with defaultsurface shader.

Here is the result with a glass shader and an HDR map applied.. looks cool.

Previous Post Next Post