File formats/Ray Tracing
File Formats for Ray Tracing Images Exported from Jmol
Recent versions of Jmol application and signed applet can export models to several high-quality image formats that can be displayed and edited in ray tracing programs like POV-Ray and Tachyon.
Jmol can export, with limited features, the current view of a model into POV-Ray format. This can be done from script or from the pop-up menu, but is better controled using the top menu in the Jmol application, which opens a dialog with options.
- Home page for POV-Ray, the Persistence of Vision Raytracer.
- Information on POV-Ray on Wikipedia.
- Home page for MegaPOV, an extension of POV-Ray.
POV-Ray for Mac
The following concerns POV-Ray for Mac, as of Oct 2013. The latest official release for Mac from POV-Ray is 3.6, dating from somewhere around 2007. It runs only on Power PC Macs, not on Intel Macs, ie. it is not a Mac OS X Universal Binary (containing IBM Power-PC and Intel binaries). Release 3.7 is available for Windows, and introduces SMP abilities, ie. can run on all cores of a chip. This appears to date from about 2009.
Mac OS X 10.6 can allegedly have the Rosetta IBM Power-PC emulator installed, see http://support.apple.com/kb/ph6531 This was on by default in 10.5 and earlier, and was the means by which older Power-PC apps could be run on the Intel Macs. It is being phased out by Apple and I believe it could be problematic at 10.6.
However MegaPOV which is much more active has released a "3.7 Unofficial" release for Mac in 2013. Available at http://megapov.inetart.net/povrayunofficial_mac/index.html This runs ok on Mac OS X 10.6.8 (Snow Leopard) and allegedly later, ie. 10.7 Lion and 10.8 Mountain Lion. If you search for "povray 3.7 unofficial mac" you will find the announcements and some discussion.
The 3.7 Unofficial release appears to utilise 2 cores fully. It runs the model.pov and model.pov.ini files generated by Jmol 13.0.18 and produces fine images.
The (laborious) technique which has worked for me is:
- Adjust Jmol window size to 800x600
- Get your Jmol scene how you want it.
- Use the Jmol Console to save a scene with "write POVRAY scene.pov" .. this produces scene.pov and scene.pov.ini
- In POV-Ray Unofficial3.7, in Control Panel / Files & Paths, specify scene as your scene.pov, image as scene.png (*)
- Also in that panel, Tick 'Use Ini File', and specify scene.pov.ini
- Also in that panel, if any standard POV-ray include files are needed, specify <path>/POV-Ray 3.7Unofficial/include as a search path for includes.
- In the panel Image & Quality, select 800x600. (This laborious matching of 800x600 is not fully necessary but it will get you going).
- In Misc, you can also set a path for all output images, which overrides setting (*) above.
Some examples are at http://ptmgallery.s3.amazonaws.com/list.html
I will try to find and document a command-line technique to do all the above, and to allow the direct Render button from the Jmol standalone app to work.
Saving from Jmol application
The application's top menu bar has
File > Export > Render in POV-Ray
which produces images that can be displayed and edited in this ray tracing program (using a dialog with options).
Saving from Jmol application and signed applet
The pop-up menu also allows in these cases (not in the normal, unsigned applet) to save a snapshot of the model in
POV-Ray format. Open the pop-up menu (right-click, or Ctrl+click, or click on Jmol frank) and choose
File > Save (or directly
Save in older versions). After choosing a format, a dialog will open to choose the location and filename.
In this method, no other options for the export will be offered.
You can also export using a script (e.g. from the console) with the
write command (see the scripting documentation).
Jmol can export, with limited features, the current view of a model into Tachyon format. Currently this can only be done from script.