From: Bruce S. <Bru...@nc...> - 2006-12-03 03:30:18
|
As far as I know, I'm what passes for the/an "anaglyph expert" in the VPython community, because I added that piece of the stereo machinery after the fundamental work by Hugh Fisher and John Zelle to implement active and passive stero. Thanks much for your detailed technical comments. I wasn't aware of problems -- I think the stereo capability of VPython has been so little used as to not evoke useful critiques. As it happens, I don't have difficulty myself in seeing VPython stereo in any of its modes. I would think that the separation problems you point to should also be a a problem for some viewers in active or passive stereo mode. The only problem I was previously aware of had to do specifically with anaglyph stereo, but not with separation. The cheap 50-cent red-cyan glasses I use let quite a lot of the "wrong" color through each lens, presumably in part because of the cheap filters but also because the "red" phosphor of displays has a fair amount of non-red in the emission, and the "green" plus "blue" phosphors have a fair amount of red in them. So I see the other kind of ghosts: the "red" image inappropriates shows faintly in my right ("cyan") eye, and vice versa. It is not true that "The anaglyph color separation in vpython is done strictly by masking the color channels, so they are all or none." As you must have noticed, the colors are pastelized, some white being added to both images, so that a "red" sphere is actually pink (red plus white), since otherwise there were be nothing for the right eye to view. However, you go on to say, "with no attempt to blend them the way that the matrix transformation in the comparison web site does," and that's definitely not something I took into account in my ignorance. From what you say it does sound important to make eye separation controllable by program. I say again, if separation is a problem, it is presumably just as serious a problem with active and passive stereo. Thanks for the critique, and for the pointers to additional information. Bruce Sherwood Stanley M Sokolow wrote: >Hi, VPythoners, > >I'm trying to get nice looking stereo anaglyphs of VPython models, but >the built-in anaglyph rendering seems to have some problems for my eyes, >and maybe everyone else's eyes, too. I'm no expert in anaglyphs but >have been learning lately on various Internet sites. I bought some good >quality red/cyan eyeglasses (with diopter compensation in the red lens) >and a clip-on red/blue pair that I clip onto the red/cyan glasses and >flip up or down to remove or use them as necessary for particular >anaglyphs. I can also clip the red/blue set onto my regular glasses to >use alone. When I set some of the VPython demos to render in red/cyan >or red/blue anaglyphs (for example, "scene.stereo = 'redblue' "), the >rendering does produce anaglyph displays but I have pretty bad >"ghosting" problems. That is, my eyes and brain can merge the left and >right eye images into a stereo virtual scene only in a portion of the >visual depth. A significant part of the rendering has too much >horizontal separation between the red/cyan or red/blue pair of images, >which is beyond my capability of merging visually. I can see the red >and blue eye images separated rather than merged. This is "ghosting." >I wonder if other users have the same problem. > >I have seen many examples of good and bad anaglyphs on the web. Look at >this red/blue anaglyph image: >http://www.dogfeathers.com/3d/povray/3dgdddd.html . >Even though this is a synthetic object (that is, constructed by a >program, not an actual camera photograph), it has excellent 3d and >little or no ghosting to my eyes, when viewed with red/blue glasses. >It came from this site, which has more excellent examples: >http://www.dogfeathers.com/3d/povray/index.html . I haven't been able >to get such good, clean 3d from the VPython demos. > >Here's another example of remarkably good anaglyphs from computed >objects: http://www.dogfeathers.com/java/ccppoly.html . Set the Java >applet's stereo mode to "anaglyph" and its color scheme to >"red-blue-black", put on your red/blue eyeglasses, and set the >"sequence" to the left side of the slider, then work your way up through >the first few "sequence" settings for an eye-popping experience. You >can play with image separation by adjusting a slider on the applet. >It's also an experience to adjust the "roundness". This display looks >best to me when I use both of my anaglyph eyeglasses together (red/cyan >with red/blue also). This reduces the ghosting to almost zero, but it >does make a rather dark image. > >Here's a site with astonishingly good anaglyphs that were created either >from stereo pair photographs or from ordinary flat photographs that were >carefully, artistically, retouched into stereo using the software >created by the web site's Italian owner. This is a "must-see" if you >have stereo anaglyph eyeglasses: http://digilander.libero.it/kems/ . >If you don't have anaglyph stereo viewing eyeglasses, it's worth >searching the Internet for stereo sites to buy a set (such as >http://www.berezin.com/3d/ where I bought mine). > >Here are some examples of various anaglyph rendering transformations, >which show full-color, half-color, greyscale, etc. comparisons. >http://www.3dtv.at/Knowhow/AnaglyphComparison_en.aspx You'll see that >some have a lot of ghosting while others give up some or all of the >color information in order to reduce or eliminate ghosting. The >anaglyph color separation in vpython is done strictly by masking the >color channels, so they are all or none, with no attempt to blend them >the way that the matrix transformation in the comparison web site does. > >I think one problem with VPython's anaglyph rendering is that the eye >separation attribute is hardcoded to be 1/30 of the focal length of the >camera lens. (Actually, the comment in the VPython code says 1/30 but >the actual division is 1/60, but maybe that's a result of some other >factor of 1/2 in there -- the math for the focal length isn't clear to >me.) Some people's vision need less eye separation in the anaglyph, >resulting in less differential between the left eye and right eye images >in the superimposed rendering. The 1/30 rule comes from general >experience with cameras. Most people can see merged stereo if the >distance between the two cameras is 1/30 of the distance from the >cameras to the nearest object in the scene. That's not the same as 1/30 >of the focal length of the camera lens, of course. (But maybe due to >the way that vpython computes its camera "focal length," the result may >be equivalent to the photographer's 1/30 rule. It does not seem >equivalent to me, though.) However, in macro (close-up) stereo >photography the eye separation needs to be reduced and in landscape >photography it is greatly increased to obtain a good stereo effect. > >I think VPython should expose the eye separation parameter (1/30 or >whatever) as an attribute of the Python "scene" object, that is, so you >can set the scene eye separation by "scene.eyeseparation" just as you >can set "scene.stereodepth." That way the display can be customized by >the user to whatever eye separation works for his eyes. It doesn't seem >like a difficult change to make, since it would be quite similar to the >other settable attributes of the scene. It's just beyond my programming >skills to make the change to the C++ code, otherwise I would try it >before suggesting it here. > >My point in all of this is that I think VPython's anaglyph rendering >could be better with a few changes. Are there any comments from the >anaglyph experts in the group? > >Stan Sokolow > > >------------------------------------------------------------------------- >Take Surveys. Earn Cash. Influence the Future of IT >Join SourceForge.net's Techsay panel and you'll get the chance to share your >opinions on IT & business topics through brief surveys - and earn cash >http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >_______________________________________________ >Visualpython-users mailing list >Vis...@li... >https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |