Archive for July, 2013

Calculator in the RenderMan Shading Language

Wednesday, July 24th, 2013

f.0I am attending SIGGRAPH again this year (which may or may not have something to do with the fact that it’s being held a block away from Disneyland). And I’ll be at the RenderMan Users Group meeting presenting a Stupid RAT Trick, like my last one on Minesweeper.

This year, I’m showing a calculator implemented in the RenderMan shading language. It’s actually quite silly because all it does it embed the given expression into the shader code. The only tricky thing is that it takes this numerical value and displays it using the standard 7-segment calculator display.

But then, I realized that I could modify the interface to create 2d and 3d graphs. In fact, it turns out to be even easier to create graphs than it is to display numbers.

If you happen to have a copy of RenderMan and Slim, you can check out the source code. The comments at the top show how to load it. Enjoy!