Modifying POV-Ray Input Files

From CrystalExplorer Wiki
Revision as of 06:41, 23 July 2013 by CrystalExplorer (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



CrystalExplorer writes a basic scene-description in a scene.pov file. Most of the common changes to the scene can be made by modifying either scene.pov or

Tip: Rendering the surfaces can be time consuming. When manipulating the scene, set the surfaces to be hidden (e.g. ShowSurface0 0) until you have the scene you like then turn them back on. has been setup to make it easy to modify the following:

  • showing/hiding parts of the scene, for example, surfaces.
  • the camera (how you are looking at the scene)
  • object opacity/transparency
  • the display of both coordinate system axes and unit cell box.


The y-axis is up. Increasing the y-value of the camera location means you are looking from slightly 'above' the model. The model is placed at the centre of the scene and the position of the camera is specified by CameraPoint.

Coordinate System Axes

These axes are worth including initially to help manipulate the scene. The colors of the axes: red, green, blue, correspond to x, y, z. The positive directions are indicated by the arrows. The "black marks" along the axes correspond to translations of 1 unit. They can be enabled by setting ShowAxes to 1.



Increasing the ambient_light setting will reduce shadows, but might wash-out the scene a little.

global_settings {  ambient_light 4.0 }

The directed light source is located at the position of the camera by default.

Creating Animations

Creating the frames of animation is possible by uncommenting the Frame and Clock lines from the scene.ini file. The clock variable is incremented for each frame. For a great tutorial on creating POV-Ray animations, see Friedrich A. Lohmüller's Website.

Including Images


Images, such as PNG images, can easily be included.

For example, we submitted a cover picture to Chem Comm. which features a surface with a fingerprint plot on the 'floor'. You could do this with any image - the code we used to achieve this is below. Note that you need a transparent background on the image (which is why we've used a PNG image generated from the postscript fingerprint plot).

The fingerprint plot sits just above (0.2 Å) the floor plane, leaving a subtle shadow. You will need to experiment with the translate and scale commands to make the image appear in the right spot.

plane { 
  y, -8.3 
  texture { 
    pigment {
      image_map { 
        png "FloorImage5.png"
	map_type 0
      translate -0.5
      scale <30,30,1>
      rotate -90*x
      translate <1,10,-26>