POV-Ray is an open-source 3D ray-tracing tool (check out the Hall of Fame for examples of its use). After listening to Peter Messmer’s excellent introduction to POV-Ray scene creation and seeing VisIt’s export to POV-Ray capability, I thought it wouldn’t be that hard to make an object graphics destination. To use it, create the scene as usual and then have the POV-Ray destination send its output to files for input into POV-Ray (the same as using IDLgrWindow).
The image shown is a direct export of a simple object graphics scene with an IDLgrPolygon (cow10.sav) with VERT_COLORS and SHADING=1, a directional light source, and a green IDLgrPolygon. Right now the POV-Ray destination supports ambient and directional lights, polygons, and surfaces. Only a few properties for polygons are supported: vertex colors, shading, and color. I’ll add more property and atom support as needed. The only problem right now is that POV-Ray uses a left-handed coordinate system, so I’m trying to think of the most elegant way to turn things around so that its scene matches the IDL scene.
I’m not sure what I’m going to do with the source code right now. I’ve added it to a “visualization library” that I’ve been using. Let me know if you are interested in trying it out.
UPDATE: it’s not hard to turn the POV-Ray output into a movie.

March 10th, 2008 at 1:42 pm
I love this stuff.
Kelly Dean
Fort Collins, CO
March 10th, 2008 at 7:56 pm
I guess I’m not sure what exactly you mean by “POV-Ray destination”. Do you create a POV-Ray device and output to that? Can you “shed some more light” on this? Thanks.
March 10th, 2008 at 8:03 pm
I have a destination class VISgrPOVRay (like IDLgrWindow or IDLgrBuffer) that has a draw method. So it would something like:
IDL> pov = obj_new('VISgrPOVRay', file_prefix='output')
IDL> pov->draw, oview
This will produce a file output.ini (and a bunch of others) that can be run through POV-Ray.
March 10th, 2008 at 11:17 pm
It’s greate. I am looking for the methods which IDL can export graphic object to other 3D files, such as pov-ray, blender, 3Dmax, VTK and so on. Can I try it?
March 11th, 2008 at 9:18 am
Cool. I’d like to give a try. Thanks.
May 16th, 2008 at 2:45 am
Hello,
I am using currently using a bunch of 3D softwares to get my 3D objects processed and finally converted to a POV scene (With IDL as glue between all those elements). Having the possibility of directly exporting the scene from IDLgrWindow to a PoV file would make my life simpler. I would be very grateful to get a copy of your source (strictly for academic usage).
With my warmest regards and thanks,
Thomas
October 6th, 2008 at 12:03 am
[...] spent some time improving the POV-Ray destination for object graphics I talked about in a previous article. I can now produce visualizations of actual data (like the one on the right) using this destination [...]