From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Jan 23 2020 - 10:50:08 CST

Robin,
  That's a very creative workaround. I wouldn't have guessed that adding
a delay would have helped alleviate the observed problem. That would seem
to indicate that there's some sort of race condition in the driver's
OpenGL buffer swapchain (or its interaction with the windowing system's
compositor, etc). Because VMD sends commands that swap buffers
(and implicitly cause global synchronization between the app, the windowing
 system, and OpenGL) at the end of each frame draw, it shouldn't
be possible for OpenGL to pick up the wrong or outdated
buffer when it reads the pixels and writes them to a disk file,
but it sounds like that (or something similar) is precisely what is
happening.

Can you send the OpenGL renderer info stringis VMD reports when it starts on
your system? It would be useful for me to collect driver/hardware combinations
that are affected by this. If it affects a wide enough swath of Intel
integrated GPUs and driver versions, I might be able to provide other
workarounds by adding in additional synchronization calls, which would
likely outperform the VMDMSECDELAYHACK approach, while also giving
correct behavior.

Best,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Jan 22, 2020 at 11:51:57AM -0800, Robin Betz wrote:
> Hi Sebastian,
> I've had similar problems where the render window doesn't update in time
> for the snapshot to be captured.
> I believe premature optimization on the part of the display driver is to
> blame.
> The environment variable VMDMSECDELAYHACK sets the number of milliseconds
> between render calls. I have found values of 50-100 can fix this problem
> for me, although you will want to find the sweet spot between rendering at
> a reasonable rate and getting frame skipping.
> Hope this helps,
> Robin
> On Wed, Jan 22, 2020 at 11:33 AM Sebastian Reiter
> <[1]Sebastian.Reiter_at_campus.lmu.de> wrote:
>
> Hi,
>
> I am trying to make a movie of a protein with the ViewChangeRender and
> Movie Maker plugins and the snapshot render command. Particularly, I
> would like to slowly zoom into a specific site of a protein. However,
> snapshot sometimes seems to randomly zoom out a little from the current
> viewpoint. This causes the movie to stutter because the zooming motion
> is not continuous but interrupted by randomly offset frames.
>
> I know that it has something to do with snapshot, because a dry run with
> Movie Maker looks just fine. Also, the same thing happens, when I render
> a static scene with snapshot.
>
> Has anyone experienced this kind of issue before and knows a solution?
> If possible, I would like to stay with snapshot, because I am quite
> happy with the look and because more sophisticated rendering engines are
> too slow on my machine for a movie with a few hundred frames.
>
> I am using VMD 1.9.3 on a Ubuntu 18.04 64bit machine. The startup
> information of VMD says the following about the available graphics:
>
> Info) Multithreading available, 4 CPUs detected.
> Info) CPU features: SSE2 AVX AVX2 FMA
> Info) Free system memory: 3816MB (48%)
> Info) No CUDA accelerator devices available.
> Warning) Detected X11 'Composite' extension: if incorrect
> display
> occurs
> Warning) try disabling this X server option. Most OpenGL
> drivers
> Warning) disable stereoscopic display when 'Composite' is
> enabled.
> Info) OpenGL renderer: Mesa DRI Intel(R) HD Graphics 630 (Kaby
> Lake
> GT2)
> Info) Features: STENCIL MSAA(4) MDE CVA MTX NPOT PP PS
> GLSL(OVFS)
> Info) Full GLSL rendering mode is available.
> Info) Textures: 2-D (16384x16384), 3-D (512x512x512),
> Multitexture (8)
>
> Thanks in advance and best regards
>
> Sebastian
>
> References
>
> Visible links
> 1. mailto:Sebastian.Reiter_at_campus.lmu.de

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