From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Dec 16 2003 - 20:47:04 CST

Dear Paul,
  At present VMD doesn't have any support for rendering to off-screen
OpenGL buffers. The "snapshot" render command is only available when
using OpenGL, and since VMD doesn't have code for off-screen buffers,
this means that in order to use it, you MUST be running VMD with the
OpenGL window displayed. To be clear, even this is not strictly sufficient
to guarantee that everything will work fine: the VMD OpenGL window must
normally be the "top" window displayed, i.e. not obscured by any other
windows, as the glReadPixels() routine VMD uses to grab the OpenGL
buffers can behave strangely on some implementations if the window
is obscured by other windows. (even though its double-buffered)
Similarly, you wouldn't want a screen saver to kick on while VMD
is in the middle of making a movie as this has also been known to
cause problems on some platforms (corrupt movie images..).

Down the road I may have time to add code to VMD for rendering to
off-screen OpenGL buffers, but this is tricky and requires a connection
to the local windowing system. If I were to implement such a feature,
it'd probably get a new display device name such as "pbuffer" which
is the term OpenGL uses for these off-screen pixel buffers.

For now, you'll either need to use the ray tracers (you can tune
the rendering speed a number of ways by running on SMP machines,
reducing the number of antialiasing samples taken per pixel, etc),
or you'll have to run VMD as usual rather than in text-only batch mode.
If you must truly run in batch mode, then the ray tracers are probably
the best option, and I can make a few suggestions for improving your
performance if you tell me what kind of machine(s) you're using, and
what operating system you're on.

Thanks,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Dec 16, 2003 at 04:07:33PM -0000, barrett wrote:
> Hi
>
> I want to make movies in VMD in "batch mode" i.e. using vmd -e [file].
>
> I can do this successfully when I run VMD normally within X windows on
> Linux.
>
> However if I run "vmd -dispdev none ..." (which is important for what Im
> trying to achieve) there is no screen for the snapshot renderer to get
> its image from and the movie doesn't work.
>
> I can successfully get around this by picking a ray tracing renderer,
> e.g. tachyon but it is much much slower.
>
> So the question is... can anyone advise me how to make movies quickly in
> batch mode when -dispdev is set to none? E.g. is there a way of
> rendering a snapshot of the non-existant window?(!)
>
> Many thanks
>
> Paul
>
> Dr Paul Barrett
> Laboratory of Molecular Biophysics
> Department of Biochemistry
> University of Oxford
> Oxford
> OX1 3QU
>
> Tel 01865 275380
> Fax 01865 275182
>
> barrett_at_biop.ox.ac.uk
> hellopaul1_at_hotmail.com
>
>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078