Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [PyMOL] Re: [ccp4bb]: Pymol stereo question

 [PyMOL] Re: [ccp4bb]: Pymol stereo question From: Richard Gillilan - 2003-06-05 14:11:43 ```On Wednesday, June 4, 2003, at 07:53 PM, Tim F wrote: >> >> The fact that points on the object that are very close to the viewer >> or >> very far away appear double (and out of focus) is also exactly what >> happens with real vision. Here's an experiment to try: >> > > True, but you're describing horizontal (distance between left and right > eye projections relative to the focal plane) parallax - vertical > parallax > (difference in vertical height of two points between the two > stereoscopic > images) is the subject at hand with scene rotations. Ok, after looking at that web link you suggested (nice theory section), I understand what you are talking about. When you look at a screen off-axis, (as each eyeball does slightly) one really needs to apply a transformation to the image to correct for foreshortening (points on the screen more distant from the viewer need to be enlarged slightly so that everything appears to have the proper size. When this is not done, you can see it in a stereo image as vertical separation. Cool ... I didn't know you could spot the distortions that way. When you are in a VR CAVE, the person with the tracking system can stand dramatically off axis to a projection wall and the system will compensate by really stretching the image. It looks normal to the person with the tracker, but really distorted to anyone looking at the screen on axis. Yes, I think it's a really good idea to do this transformation. I'm not sure how or if the parallel line-of-sight method actually accomplishes this. If I remember correctly, the complete transformations are found in Carolina Cruz Neira's thesis on the CAVE (available from UMI). I'm sure they must appear somewhere else in the literature that is easier to get, but I don't know where. I have a copy somewhere and could look. Richard ```

 [PyMOL] RE: [ccp4bb]: Pymol stereo question From: Warren L. DeLano - 2003-06-04 16:26:29 ```Flip, Thanks for answering that question -- actually, the new PyMOL release (version 0.88, downloadable from http://pymol.sf.net ) makes this a little easier. ray angle=-3 png image1.png ray angle=3 png image2.png This is superior to using the "turn" command because it also rotates the light source. That way shadows will look right. The problem with having PyMOL generate a stereo pair in a single image is that without knowing the final pixel scaling, PyMOL couldn't guarantee that 66 mm separation. Thus, even with the new version, you have to create two images in PyMOL, and then assemble them outside of PyMOL. We'll make this foolproof in a future version. Cheers, Dr. PyMOL -- mailto:warren@... Warren L. DeLano, Ph.D. Principal Scientist DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 -----Original Message----- From: owner-ccp4bb@... [mailto:owner-ccp4bb@...] On Behalf Of Flip Hoedemaeker Sent: Wednesday, June 04, 2003 3:55 AM To: Claudine Mayer; CCP4 Subject: RE: [ccp4bb]: Pymol stereo question *** For details on how to be removed from this list visit the *** *** CCP4 home page http://www.ccp4.ac.uk *** Hi Claudine, First of all, there's an excellent bulletin board available for Pymol, where your questions are answered by Mr Pymol himself, Warren Delano.... see details below. If you want to save stereo pics with ray tracing (side-by-side) you have to generate them separately, e.g. create left pic, ray, png left.png, then rotate around Y by 2-3 degrees and ray, png right.png. If you print them side by side for viewing, remember to scale in such a way that equivalent atoms in both pics are 66 mm apart. Flip ---Pymol list details-------- Send PyMOL-users mailing list submissions to pymol-users@... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/pymol-users or, via email, send a message with subject or body 'help' to pymol-users-request@... You can reach the person managing the list at pymol-users-admin@... ---end Pymol list details ---- -----Original Message----- From: owner-ccp4bb@... [mailto:owner-ccp4bb@...]On Behalf Of Claudine Mayer Sent: Wednesday, June 04, 2003 11:12 To: CCP4 Subject: [ccp4bb]: Pymol stereo question *** For details on how to be removed from this list visit the *** *** CCP4 home page http://www.ccp4.ac.uk *** Dear ccp4 and Pymol users, I am wondering how you manage to generate raytraced stereo pictures. When we display stereo, and as soon as we use the command "ray", stereo is disappearing ! Any helps would be really appreciated . Cheers, Claudine -- ************************************************************************ * Dr Claudine MAYER LMCP Universite Paris 6 Boite courrier 115 Tour 16 2eme etage couloir 16-15, porte 8 4, place Jussieu 75252 PARIS Cedex 05 tel : 01 44 27 52 41 fax : 01 44 27 37 85 ou 01 44 27 45 84 e-mail : mayer@... ************************************************************************ * ```
 [PyMOL] RE: [ccp4bb]: Pymol stereo question From: jparrish - 2003-06-04 18:32:24 ```>> ray angle=3D-3 >> png image1.png >> ray angle=3D3 >> png image2.png >> > >This method of generating stereo images is correct, but also leads to >quite a bit of vertical parallax (the so-called "toe-in" projection) - >this is why many stereoscopic images are hard to view properly (usually, >edges of the image are out of focus). What you really want is a >non-symmetric camera frustrum (dunno how hard this is to do in pymol....) >where the two images should look along parallel vectors separated by some >distance (something like 1/20 the focal length). Check out Paul Bourke's >page for all the details: > >http://astronomy.swin.edu.au/~pbourke/stereographics/ > >Hope this helps. > >=09Regards, >=09Tim F I believe this would only be true for perspective projections, not orthographic, since there is no real "eye" position in orthographic projections (which are more common in molecular diagrams). Of course, feel free to correct me if I am wrong :) Jonathan ******************************************************* Jonathan Parrish ph(780)-492-8249 Alberta Synchrotron Institute University of Alberta Edmonton, Alberta, Canada T6G 2E1 ******************************************************* "Trusting to escape scrutiny by fixing the public gaze upon the exceeding brightness of military glory, that attractive rainbow that rises in showers of blood =96 that serpent's eye, that charms to destroy, he plunged into war." -Abraham Lincoln ******************************************************* ```
 [PyMOL] RE: [ccp4bb]: Pymol stereo question From: Warren L. DeLano - 2003-06-04 18:56:55 ```You're both right. "Perfect" ray-traced stereo pictures are impossible in PyMOL because the built-in ray tracer is limited to an orthographic projection. Unfortunately, I optimized all the vector code for this, so we're talking a major rewrite to change that : (. Rotating by a small angle is the best it can currently do unless you send the geometries to an outside rendering package, such as PovRay. Warren -- mailto:warren@... Warren L. DeLano, Ph.D. Principal Scientist DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 -----Original Message----- From: jparrish [mailto:jparrish@...] Sent: Wednesday, June 04, 2003 10:34 AM To: Warren L. DeLano; Tim F Cc: pymol-users@...; Claudine Mayer; Flip Hoedemaeker Subject: RE: [ccp4bb]: Pymol stereo question >> ray angle=-3 >> png image1.png >> ray angle=3 >> png image2.png >> > >This method of generating stereo images is correct, but also leads to >quite a bit of vertical parallax (the so-called "toe-in" projection) - >this is why many stereoscopic images are hard to view properly (usually, >edges of the image are out of focus). What you really want is a >non-symmetric camera frustrum (dunno how hard this is to do in pymol....) >where the two images should look along parallel vectors separated by some >distance (something like 1/20 the focal length). Check out Paul Bourke's >page for all the details: > >http://astronomy.swin.edu.au/~pbourke/stereographics/ > >Hope this helps. > > Regards, > Tim F I believe this would only be true for perspective projections, not orthographic, since there is no real "eye" position in orthographic projections (which are more common in molecular diagrams). Of course, feel free to correct me if I am wrong :) Jonathan ******************************************************* Jonathan Parrish ph(780)-492-8249 Alberta Synchrotron Institute University of Alberta Edmonton, Alberta, Canada T6G 2E1 ******************************************************* "Trusting to escape scrutiny by fixing the public gaze upon the exceeding brightness of military glory, that attractive rainbow that rises in showers of blood - that serpent's eye, that charms to destroy, he plunged into war." -Abraham Lincoln ******************************************************* ```
 [PyMOL] Re: [ccp4bb]: Pymol stereo question From: Tim F - 2003-06-04 23:54:03 ```On Wed, 4 Jun 2003, Richard Gillilan wrote: > > The fact that points on the object that are very close to the viewer or > very far away appear double (and out of focus) is also exactly what > happens with real vision. Here's an experiment to try: > True, but you're describing horizontal (distance between left and right eye projections relative to the focal plane) parallax - vertical parallax (difference in vertical height of two points between the two stereoscopic images) is the subject at hand with scene rotations. If you want to make the eyeball analogy, toe-in is similar to viewing things in double (i.e. cross-eyed) vision. > > Sorry, I offer no fixes here. > Agreed, toe-in tends to work just fine (and its used extensively), but the problem increases as the size of the field of view increases, to the point where its too difficult to view. On Wed, 4 Jun 2003, jparrish wrote: > > I believe this would only be true for perspective projections, not > orthographic, since there is no real "eye" position in orthographic > projections (which are more common in molecular diagrams). Of course, > feel free to correct me if I am wrong :) > Yes, although the depth of the object can't be large relative to the focal distance (I forget how much...). Regards, Tim F -- --------------------------------------------------------- Tim Fenn fenn@... Rosenstiel Basic Medical Sciences Research Center Brandeis University, Mail Stop 029 415 South Street Waltham, MA 02454 Phone: (781) 736-4942 FAX: (781) 736-2405 --------------------------------------------------------- ```
 [PyMOL] Re: [ccp4bb]: Pymol stereo question From: Richard Gillilan - 2003-06-05 14:11:43 ```On Wednesday, June 4, 2003, at 07:53 PM, Tim F wrote: >> >> The fact that points on the object that are very close to the viewer >> or >> very far away appear double (and out of focus) is also exactly what >> happens with real vision. Here's an experiment to try: >> > > True, but you're describing horizontal (distance between left and right > eye projections relative to the focal plane) parallax - vertical > parallax > (difference in vertical height of two points between the two > stereoscopic > images) is the subject at hand with scene rotations. Ok, after looking at that web link you suggested (nice theory section), I understand what you are talking about. When you look at a screen off-axis, (as each eyeball does slightly) one really needs to apply a transformation to the image to correct for foreshortening (points on the screen more distant from the viewer need to be enlarged slightly so that everything appears to have the proper size. When this is not done, you can see it in a stereo image as vertical separation. Cool ... I didn't know you could spot the distortions that way. When you are in a VR CAVE, the person with the tracking system can stand dramatically off axis to a projection wall and the system will compensate by really stretching the image. It looks normal to the person with the tracker, but really distorted to anyone looking at the screen on axis. Yes, I think it's a really good idea to do this transformation. I'm not sure how or if the parallel line-of-sight method actually accomplishes this. If I remember correctly, the complete transformations are found in Carolina Cruz Neira's thesis on the CAVE (available from UMI). I'm sure they must appear somewhere else in the literature that is easier to get, but I don't know where. I have a copy somewhere and could look. Richard ```
 [PyMOL] RE: [ccp4bb]: Pymol stereo question From: Tim F - 2003-06-04 17:51:44 ```On Wed, 4 Jun 2003, Warren L. DeLano wrote: > > ray angle=-3 > png image1.png > ray angle=3 > png image2.png > This method of generating stereo images is correct, but also leads to quite a bit of vertical parallax (the so-called "toe-in" projection) - this is why many stereoscopic images are hard to view properly (usually, edges of the image are out of focus). What you really want is a non-symmetric camera frustrum (dunno how hard this is to do in pymol....) where the two images should look along parallel vectors separated by some distance (something like 1/20 the focal length). Check out Paul Bourke's page for all the details: http://astronomy.swin.edu.au/~pbourke/stereographics/ Hope this helps. Regards, Tim F -- --------------------------------------------------------- Tim Fenn fenn@... Rosenstiel Basic Medical Sciences Research Center Brandeis University, Mail Stop 029 415 South Street Waltham, MA 02454 Phone: (781) 736-4942 FAX: (781) 736-2405 --------------------------------------------------------- ```
 [PyMOL] Re: [ccp4bb]: Pymol stereo question From: Richard Gillilan - 2003-06-04 20:22:11 ```I experimented with this method a decade ago when I was working on a stereo 16mm film for the late Kent Wilson. The parallel line-of-sight method was described in a popular book on stereo methods .. sorry I don't remember the reference and it would take a lot of digging to find it. To be honest, I have never liked this parallel method. I feel that it simply fails to give as good a stereo effect as the traditional "toe-in" method (in my subjective opinion). As the apparent object comes closer to the face, it seems to me that the approximation of parallel lines of sight separated by a small constant simply breaks down. Why not try both and judge for yourself. The fact that points on the object that are very close to the viewer or very far away appear double (and out of focus) is also exactly what happens with real vision. Here's an experiment to try: Put the index finger of one hand a few inches from your nose and place the index finger of your other hand about a foot away. Now keep your vision focused on the far finger. The near finger, which should remain out of focus, will in fact appear double. Why then is it a problem? In real vision we can change our focal point (the place where the image is in focus and the lines of sight of our two eyes converge) at will. In a fixed stereo image (not dynamic as in VR), we are stuck with the point the artist chooses. When we are distracted to look at another part of the object, it looks wrong. This effect is minor when objects are far away. There is also another phenomenon at work here too, which I learned about when I worked in virtual reality. If you project a stereo image on a wall (say 5 feet away from the viewer) but depict an object that is very close to the viewer (or visa versa), it will appear out of focus when viewed with both eyes and in focus when viewed with one eye. The brain takes its cue for focus from the degree of convergence of the eyes. Sorry, I offer no fixes here. There is a very cool stereo supply company worth looking at however: http://www.stereoscopy.com/reel3d/ Also be sure to check out Richard Gillilan MacCHESS, Cornell > > This method of generating stereo images is correct, but also leads to > quite a bit of vertical parallax (the so-called "toe-in" projection) - > this is why many stereoscopic images are hard to view properly > (usually, > edges of the image are out of focus). What you really want is a > non-symmetric camera frustrum (dunno how hard this is to do in > pymol....) > where the two images should look along parallel vectors separated by > some > distance (something like 1/20 the focal length). Check out Paul > Bourke's > page for all the details: > > http://astronomy.swin.edu.au/~pbourke/stereographics/ > > Hope this helps. > > Regards, > Tim F > ```