{"id":486,"date":"2013-12-16T10:06:30","date_gmt":"2013-12-16T15:06:30","guid":{"rendered":"https:\/\/jasoncantarella.com\/wordpress\/?p=486"},"modified":"2014-06-04T14:14:42","modified_gmt":"2014-06-04T18:14:42","slug":"rendering-solution","status":"publish","type":"post","link":"https:\/\/jasoncantarella.com\/wordpress\/rendering-solution\/","title":{"rendered":"Rendering solution"},"content":{"rendered":"<p>So I know I&#8217;m dating myself (badly) here, but a lot of my personal art code still relies on PovRay in order to make &#8220;nice&#8221; renders of things. The problem is that PovRay has been entirely dead for the past six or seven years, and now doesn&#8217;t even compile and install on my exciting new Mavericks laptop. Which meant it was time for a change.<\/p>\n<p>The criteria were pretty simple: I had to be able to render from <em>Mathematica, <\/em>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.<\/p>\n<p>Some web research revealed a couple of candidates:<\/p>\n<ol>\n<li>The RenderMan clones Pixie (www.pixierender.org) and Aqsis (www.aqsis.org). After all,\u00a0<em>Mathematica<\/em> outputs RIB files, so in theory I could just render the RIB file directly. Unfortunately, Pixie hasn&#8217;t been updated since 2009, and Aqsis chokes on\u00a0<em>Mathematica<\/em>&#8216;s RIB output. No luck.<\/li>\n<li>The &#8220;academic&#8221; renderer PBRT. This even comes with a\u00a0<em>Mathematica<\/em> interface, so I figured that I was in good shape! Unfortunately, the\u00a0<em>Mathematica<\/em> interface is written for\u00a0<em>Mathematica<\/em> 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&#8230;<\/li>\n<li>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&#8217;t something that I currently support in tube, but there&#8217;s a reasonable straight-C selection of source code available from the old days, and it wouldn&#8217;t be so hard to get PLY output from tube directly if I needed to add it in. Further,\u00a0<em>Mathematica<\/em> at least claims to support Graphics3D output as PLY, so all I&#8217;d have to translate would be the camera stuff.<\/li>\n<\/ol>\n<p>This means that today&#8217;s project is going to be to try to hack together some kind of\u00a0<em>Mathematica<\/em> -&gt; 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&#8217;ll be able to run LuxRender directly from inside Mathematica so that we can debug the whole thing as needed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I know I&#8217;m dating myself (badly) here, but a lot of my personal art code still relies on PovRay in order to make &#8220;nice&#8221; renders of things. The problem is that PovRay has been entirely dead for the past six or seven years, and now doesn&#8217;t even compile and install on my exciting new [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-486","post","type-post","status-publish","format-standard","hentry","category-art"],"_links":{"self":[{"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/posts\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/comments?post=486"}],"version-history":[{"count":1,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/posts\/486\/revisions"}],"predecessor-version":[{"id":487,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/posts\/486\/revisions\/487"}],"wp:attachment":[{"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/media?parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/categories?post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasoncantarella.com\/wordpress\/wp-json\/wp\/v2\/tags?post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}