RSL Shaderop Plug-in / February, 2013


I wrote RSL Shaderop plug-in that creates craters. It uses Renderman point cloud for position, direction, size and all the attributes of each craters. It doesn’t rely on UV, so it can easily be applied for any type of geometry.


I implemented it as RSL plug-in because it needs to deal with a lot of arrays which have to be sorted because one crater should be able to cover the other craters. I don’t think there is an easy way to sort elements in RSL. Even if I could sort in RSL, I really wanted to avoid sorting things in every micro-polygon especially if the number of craters is millions. In RSL shaderop plug-in, I could initialize the plug-in at the beginning of render and do some expensive processing like sorting.

I’m using distance from the center line which is extended normal for sculpting each crater.


Each crater has a number of attributes like radius, height, width of slope or thickness of ridge.


So far, I have not added any noise displacement. The noisy look is from interference of each crater.


Each crater has to have certain order to properly cover the others, which means that each shading point has to have multiple crater’s information. I am sorting all crater’s depth in the beginning once, but still I have to run a loop for all craters in all shading points, which became a big problem especially when the number of craters got more then a couple thousands. I could search the neighboring points, but that mean I have sort the neighbor points in each search, which means sorting in all shading points.

For now, I’m using the render regions that generate many small images just like bucket, but each region has it’s own point cloud that has much fewer points to loop. I’m using Houdini’s “over” Cop to combine all those small images, which works fine. All process is automated in python, so one button renders 96 images and combine them and cleanup the small images.

Later, I might test using shading grid in a RSL plug-in where I can search the neighboring points and sort them for all shading points in the shading grid.

Update(8/6/2013): I tried this, but the number of shading grids is still a lot, so it doesn’t seem to be a good solution.


The source code is not ready to share yet. I’ll update it with few useful output attributes that I will use for next project.
Update(8/6/2013): The source code is worse now… It will never be shared, but here are some pretty pics… :)







Powered by Wordpress, Theme by Hosuk