Rendering solution

So I know I’m dating myself (badly) here, but a lot of my personal art code still relies on PovRay in order to make “nice” renders of things. The problem is that PovRay has been entirely dead for the past six or seven years, and now doesn’t even compile and install on my exciting new Mavericks laptop. Which meant it was time for a change.

The criteria were pretty simple: I had to be able to render from Mathematica, since most of my work these days uses it in some form or another. And I had to be able to use it as a scriptable command-line interface from Ridgerunner, in case I want to go back and make animations and so forth.

Some web research revealed a couple of candidates:

  1. The RenderMan clones Pixie (www.pixierender.org) and Aqsis (www.aqsis.org). After all, Mathematica outputs RIB files, so in theory I could just render the RIB file directly. Unfortunately, Pixie hasn’t been updated since 2009, and Aqsis chokes on Mathematica‘s RIB output. No luck.
  2. The “academic” renderer PBRT. This even comes with a Mathematica interface, so I figured that I was in good shape! Unfortunately, the Mathematica interface is written for Mathematica 3.0 and uses various features that are by now not only deprecated, but actually not functional. I briefly considered fixing the interface, but then I discovered…
  3. LuxRender. LuxRender is a PBRT fork which includes a number of nice enhancements, and seems to have an active user community. Plus, the scene file format is well-documented, and includes direct support for the PLY mesh format. PLY isn’t something that I currently support in tube, but there’s a reasonable straight-C selection of source code available from the old days, and it wouldn’t be so hard to get PLY output from tube directly if I needed to add it in. Further, Mathematica at least claims to support Graphics3D output as PLY, so all I’d have to translate would be the camera stuff.

This means that today’s project is going to be to try to hack together some kind of Mathematica -> LuxRender interface by exporting the scene geometry as PLY and writing out the camera parameters and lighting (and so forth) as text directly into a LuxRender scene file. Hopefully, we’ll be able to run LuxRender directly from inside Mathematica so that we can debug the whole thing as needed.

Comments are Disabled