[chimera-dev] stereo3D focal plane
Tom Goddard
goddard at sonic.net
Thu Apr 23 10:57:54 PDT 2015
Hi Matt,
I think the “new frame” trigger is the main useful one. There are others that tell when molecule colors or display styles change, when atoms get deleted, or models are moved. We don’t have much programming documentation but there is an example of using triggers to see when atoms change colors.
http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_AtomTrigger.html
Tom
> On Apr 21, 2015, at 1:24 PM, Dougherty, Matthew T <matthewd at bcm.edu> wrote:
>
> thanks.
>
> from chimera import triggers
> triggers.addHandler('new frame', set_focal_plane, None)
>
> was the part I could not figure out. Would like to find out more about this api and other registered triggers, will look at the code. Besides 'new frame', are there any other imporant ones that could make useful for interfaces?
>
> In my user control pane extension I have a focal widget that varies between -1,0 thru 100.
> -1 disables the widget. 0-100 is the percentage between near & far CP. Usually if I am between the two, people's eyes don't bleed, buying me some time to adjust the percentage correctly.
>
>
>
> As for zooming, I tell people here not to use it, stick with z-translation because it gives you a better spatial feel of the data set, XYZ are in unity. Plus zooming maxes out and people can't figure out why, they think they are dollying but are not. Unless they can write a command for z translation, they are stuck.
>
>
> Matthew Dougherty
> National Center for Macromolecular Imaging
> Baylor College of Medicine
> ===========================================================================
> From: Tom Goddard <goddard at sonic.net <mailto:goddard at sonic.net>>
> Sent: Tuesday, April 21, 2015 2:57 PM
> To: Dougherty, Matthew T
> Cc: chimera-dev at cgl.ucsf.edu <mailto:chimera-dev at cgl.ucsf.edu>
> Subject: Re: [chimera-dev] stereo3D focal plane
>
> Hi Matt,
>
> Here’s some Python that will update the focal plane position to always lie midway between near and far clip planes.
>
> If you zoom by moving a map or molecule closer to you (z translation) then visually the map should move from behind the screen to be in front of the screen so it looks like it is coming closer. In other words the map moves forward and the focal plane that defines the position of the screen stays fixed. That is normal Chimera behavior. The above script will defeat that. You will move the map closer to you in z, but what you will see in stereo is that the map gets bigger, but no closer. It instead feels like a magical scaling of the map, rather than getting closer to it. This isn’t natural, but I understand that because of the limited 3d depth with stereo viewing it is necessary to do something to avoid uncomfortable stereo where the models are too far in front of the screen. An optimal solution is more subtle than the above script. In fact the above script won’t prevent getting the front surface of the map too close for stereo viewing because it keeps the focal plane at the map midpoint in z. The front of the map can still get close to your eye and the stereo will not work. Basically you want to avoid having the front visible part of the models from getting too close to your eye where the stereo glasses don’t work (because the display screen is not wide enough). We have not worked on techniques to avoid stereo interactive viewing limitations. But the normal Chimera zoom uses scale factor, not z-translation, so that is the main way this problem is avoided. But you are using z-translation instead of the normal Chimera zooming and that is why you encounter this problem.
>
> Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20150423/725ef47c/attachment.html>
More information about the Chimera-dev
mailing list