* Tsjerk Wassenaar <t.a.wassen...@chem.rug.nl> [2004-02-19 04:30] wrote:
> 
> Hi Guys,
> 
> I seem to have some trouble rendering with povray. The render starts and 
> finishes fine, and the image is created, but Pymol crashes with a 
> segmentation fault as soon as the rendering is done. The image is not 
> loaded to the viewer. I'm using povray 3.5 with Pymol 0.93 on a laptop 
> (Intel Centrino) with SuSe 9.0. I have changed povray_exe in povray.py 
> in modules to "povray".

I never use the povray rendering directly from within PyMOL.  I find the
PyMOL ray-tracer is great for most things and if it isn't sufficient, I
want to be able to edit the povray input as you suggest below.

> Any hints?

Yes!

> Than to Warren probably, it would be great if Pymol would be able to 
> write a povray object (include file) from a given selection. That would 
> combine the strong points of pymol where it comes to showing the thing 
> as you want it, with those of Povray, where it comes to lighting, 
> positioning, colouring, textures and so on. Since Pymol is already 
> capable of producing povray input it wouldn't be very hard I would guess?

It can do this. I use a simple little script that I call make_pov.py:

######################################
# make_pov.py
from pymol import cmd

def make_pov(file):
  (header,data) = cmd.get_povray()
  povfile=open(file,'w')
  povfile.write(header)
  povfile.write(data)
  povfile.close()
######################################

Load the file with 'run make_pov.py' and then within pymol do:

make_pov('povray.input')

Then outside PyMOL feed this file to povray with whatever command-line
options you need. You do need to look at the size of the image reported
by the make_pov.  It looks something like:

  PyMOL>make_pov('povray.input')
   RayRenderPOV: w 1100 h 900 f   63.349 b  102.310
   RayRenderPOV: vol  -17.316   17.316  -14.168
   RayRenderPOV: vol   14.168   63.349  102.310
   RayRenderPovRay: processed 714 graphics primitives.
   Ray: total time: 0.03 sec. = 123885.9 frames/hour. (0.03 sec. accum.)

You'll need to use the same width and height (or the same ratio) to
make your povray output have the correct width to height ratio, e.g.:

  povray +Ipovray.input +W550 +H450

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.                         <r...@post.queensu.ca>
Senior Research Associate                            phone: 613-533-6821
Dept. of Biochemistry, Queen's University,             fax: 613-533-2497
Kingston, ON K7L 3N6  Canada       http://adelie.biochem.queensu.ca/~rlc
    PGP Fingerprint: 9B49 3D3F A489 05DC B35C  8E33 F238 A8F5 F635 C0E2

Reply via email to