VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jul 28 2015 - 12:53:43 CDT
I'm on vacation and can't write a long response, but you can
control focal length indirectly by changing the display settings
camera distance, screen height, and screen width, which are effectively
the same parameters that would be computed if you used a focal length or
field-of-view type of control instead. If you want a longer focal length
and narrower field of view (for less "eggy" looking spheres in the corners),
just change the screen height to be smaller, or change the screen distance
to be a larger negative value. You can compute these from a field of view
angle with a couple of lines of tcl.
I understand your request for tilt-shift type DoF optics.
At present there's no ability to tilt the focal plane, and although I'm
very familiar with tilt-shift lenses and similar optics, I think that
it would require a lot of work for end users to learn how to use this
effectively. Instead, I have been planning on implementing a
different scheme whereby the user will provide an atom selection or a
volumetric map that defines regions of crisp focus, and the rendering
code will use this to drive the focal blur effect. This would solve
the problem of creating regions of crisp focus that are unrelated to
the particular shape of the focal plane. The tilt-shift scheme would
work great for a traditional camera, but it isn't viable for things
like panoramic projections or spherical cameras, which are already
implemented in the new developmental version of VMD 1.9.3. This is
one of my motivations for considering a very different approach.
I think that users will find a selection-based focal blur scheme more
usable without having to become optical experts, but I'm certainly
willing to listen to what other people think about this too.
Writing the rendering code for a tilt-shift camera lens is easy, but
doing the user interfaces to adjust it and make it usable by non-experts
is likely to be substantially harder. Let me know what you think.
On Mon, Jul 27, 2015 at 12:59:29PM -0400, Charles McAnany wrote:
> The photographer in me has been having too much fun with the DOF features
> in the lastest VMD, and it got me thinking about the camera. There are two
> things I haven't been able to figure out how to do:
> 1. Change the focal length of the camera. As it stands, the focal lengths
> available are 'perspective' and 'orthographic'. Sometimes, the
> 'perspective' is too wide-angle and the molecule gets heavily distorted
> when I fill the screen with it. The orthographic projection, however, is
> too flat and doesn't convey the sense of depth I want (and also I can't
> use DOF with the orthographic projection). It seems that zooming in VMD is
> similar to moving the molecule relative to the camera, so the only way to
> get the perspective I want is to push the molecule away, then render, then
> crop the rendered image.
> If it's not currently possible, I think a simple slider in the display
> settings box that lets the user select a focal length (maybe a slider from
> 'perspective' to 'orthographic' to keep it straightforward) would be very
> handy for many users.
> 2. Tilt the lens relative to the film plane (see
> https://en.wikipedia.org/wiki/Tilt%E2%80%93shift_photography). For
> example, yesterday I was rendering a dimer and I wanted the interface to
> be in focus. However, with the current DOF tool, I couldn't figure out a
> way to skew the plane of focus to move it where I want. This is, to be
> sure, an unusual need, and if it'd be hard to implement in Tachyon then I
> totally understand.
> I can't think of a time when I've wanted to shift the lens when rendering
> proteins, but, again, if it's easy to implement, then it'd be a cool
> feature to have.
> Visible links
> 1. https://en.wikipedia.org/wiki/Tilt%E2%80%93shift_photography
-- 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/