Re: [PyOpenGL-Users] PyOpenGL and stereo
Brought to you by:
mcfletch
From: Yuichi S. <yu...@cs...> - 2004-11-30 18:25:25
|
Hi David, It is under the condition described below that I have succeeded in presenting stereo graphics: *Machine: Mac G4 (866MHz-dual processors) *OS: MacOS 10.3.5 or 10.3.6 (either is ok.) *Videoboard: ATI RADEON9000PRO *LCD glasses: StereoEYES WIRED (STEREOGRAPHICS) or [FE-1 (good) & NEO TEK (cheap)] http://www.stereographics.com/news_about_us/01news/sew-pr.htm http://www.crsltd.com/catalog/fe-1/ *Monitor: 20-in. monochrome monitor (Monoray Model M20ECD5RE, Clinton Electronics) *Software: A python code attached below using PyOpenGL and VisionEgg library (ver. 0.9.9). http://www.visionegg.org/ (Note that I'm using OpenGL blue line syncing signal not VSG.) http://developer.apple.com/samplecode/GLUTStereo/GLUTStereo.html http: //www.crsltd.com/catalog/vsg25/ This code seems to present stereo graphics at the intended rate at least at 120Hz of CRT refresh rate (60Hz for each eye) under the condition described above. Note that I'm using the Core.py of VisionEgg 0.9.9 inserting "pygame.display.gl_set_attribute(pygame.locals.GL_STEREO,1)" just after "pygame.display.gl_set_attribute(pygame.locals.GL_ALPHA_SIZE,a)". For more information about VisionEgg, see http://www.visionegg.org/ If some information needed is lacking, please let me know. Thanks, Yuichi """Sticking out FixPoint (stereo) & Random dots.""" # A simple stereo program. # written by Yuichi Sakano (2004.10.9) import VisionEgg VisionEgg.start_default_logging(); VisionEgg.watch_exceptions() from VisionEgg.Core import * from VisionEgg.Dots import * import pygame from pygame.locals import * from OpenGL.GL.GL__init__ import * screen = get_default_screen() screen.parameters.bgcolor = (0.0,0.0,0.0) # black (RGB) disparity = 10 # pixels dots = DotArea2D( position = ( screen.size[0]/2.0, screen.size[1]/2.0 ), size = ( 300.0 , 300.0 ), signal_fraction = 0.1, signal_direction_deg = 180.0, velocity_pixels_per_sec = 10.0, dot_lifespan_sec = 5.0, dot_size = 3.0, num_dots = 300) fixation_spotR = FixationSpot(position=(screen.size[0]/2-disparity/2,screen.size[1]/2), anchor='center', color=(0,0,255,0), size=(14,14)) fixation_spotL = FixationSpot(position=(screen.size[0]/2+disparity/2,screen.size[1]/2), anchor='center', color=(0,0,255,0), size=(14,14)) blue_lineR = FixationSpot(position=(0,0),# (x,y)(lowerleft:(0,0)) anchor='lowerleft', color=(0,0,255,0), size=(screen.size[0]*0.80, 0.5)) blue_lineL = FixationSpot(position=(0,0), anchor='lowerleft', color=(0,0,255,0), size=(screen.size[0]*0.30, 0.5)) #center = (0,0,0) #left_eye = (-1,0,-10) #right_eye = (1, 0,-10) #up = (0,1,0) #left_projection = Projection().look_at( left_eye, center, up ) #right_projection = Projection().look_at( right_eye, center, up ) left_viewport = Viewport(screen=screen, # projection=left_projection, stimuli=[dots, fixation_spotL, blue_lineL]) right_viewport = Viewport(screen=screen, # projection=right_projection, stimuli=[dots, fixation_spotR, blue_lineR]) frame_timer = FrameTimer() quit_now = 0 while not quit_now: for event in pygame.event.get(): if event.type in (QUIT,KEYDOWN,MOUSEBUTTONDOWN): quit_now = 1 Buffers = [GL_BACK_LEFT, GL_BACK_RIGHT] for buffer in Buffers: glDrawBuffer(buffer) # Specify which color buffers are to be drawn into. screen.clear() # Clear the screen. if buffer == GL_BACK_LEFT: left_viewport.draw() # Set the viewport and draw stimuli. else: right_viewport.draw() swap_buffers() # Update the entire screen. (pygame.display.flip()) frame_timer.tick() frame_timer.log_histogram() On 30 Nov 2004 at 11:54 AM, David wrote: > Yuichi: > > You never did tell us what stereo hardware you are using. There are a > few makes and models of LCD glasses, and as far as I know they do not > use any common protocols for configuration. > > Are you using eDimensional's LCD glasses? > > David > > > On Tue, 30 Nov 2004 11:27:37 -0500, Yuichi Sakano <yu...@cs...> > wrote: >> Hi. >> >> Finally, I have succeeded in using stereo with PyOpenGL (and VisionEgg >> library). >> http://www.visionegg.org/ >> Thanks so much for anyone who helped me. >> >> Thanks, >> Yuichi >> >> >> >> >> On 20 Sep 2004 at 11:35 AM, Yuichi Sakano wrote: >> >>> Hi. >>> >>> My previous mail seems to have lacked some information. Sorry. >>> >>> I'm using a pair of liquid crystal shutter glasses (closing the >>> shutters in front of the eyes alternately synchronizing with the CRT >>> refresh rate). So, I'd like to present the graphics for the left and >>> right eyes alternately synchronizing with the CRT refresh rate. >>> >>> Thanks, >>> Yuichi >>> >>> >>> On 18 Sep 2004 at 11:59 PM, David Keeney wrote: >>> >>>> On 17 Sep 2004 at 16:40, Yuichi Sakano wrote: >>>> >>>>> Hi. >>>>> >>>>> Is anyone using stereo (not audio but vision) with PyOpenGL? I'm >>>>> trying >>>>> to using it, but I'm at a loss how to use it. If you have succeeded >>>>> in >>>>> it, would you let me know how (if possible, send the script) >>>>> please? >>>> >>>> What hardware are you using for the stereoscopic vision? >>>> >>>> Take a look at stereo_zoe, which is a simple OpenGL rendering >>>> engine adapted to show stereo graphics using Edimensional's LCD >>>> glasses and top/bottom display mode. >>>> >>>> http://sourceforge.net/project/showfiles.php?group_id=110483&pac >>>> kage_id=119667 >>>> >>>> -or- >>>> http://www.sourceforge.net/project/pduel >>>> >>>> David Keeney >>>> >>>>> >>>>> Actually, I have checked the archive of this mailing list and found >>>>> that Jack Jansen had sent a similar question mail. >>>>> http://sourceforge.net/mailarchive/message.php?msg_id=1579199 >>>>> But no one seems to have responsed to it using this mailing list. >>>>> >>>>> I'm using Mac G4 (OS10.2.8, 866MHz-dual processors) and ATI RADEON >>>>> graphics board. >>>>> I can use stereo with C and OpenGL using a sample code. >>>>> http://developer.apple.com/samplecode/GLUTStereo/GLUTStereo.html >>>>> >>>>> Thanks for any help. >>>>> >>>>> Yuichi >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 >>>>> Project Admins to receive an Apple iPod Mini FREE for your >>>>> judgement >>>>> on >>>>> who ports your project to Linux PPC the best. Sponsored by IBM. >>>>> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php >>>>> _______________________________________________ >>>>> PyOpenGL Homepage >>>>> http://pyopengl.sourceforge.net >>>>> _______________________________________________ >>>>> PyOpenGL-Users mailing list >>>>> PyO...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/pyopengl-users >>>>> >>>> >>>> >>>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 >>> Project Admins to receive an Apple iPod Mini FREE for your judgement >>> on >>> who ports your project to Linux PPC the best. Sponsored by IBM. >>> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php >>> _______________________________________________ >>> PyOpenGL Homepage >>> http://pyopengl.sourceforge.net >>> _______________________________________________ >>> PyOpenGL-Users mailing list >>> PyO...@li... >>> https://lists.sourceforge.net/lists/listinfo/pyopengl-users >>> >>> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real >> users. >> Discover which products truly live up to the hype. Start reading now. >> http://productguide.itmanagersjournal.com/ >> >> >> _______________________________________________ >> PyOpenGL Homepage >> http://pyopengl.sourceforge.net >> _______________________________________________ >> PyOpenGL-Users mailing list >> PyO...@li... >> https://lists.sourceforge.net/lists/listinfo/pyopengl-users >> > > > -- > dk...@tr... > Pitcher's Duel -> pduel.sourceforge.net > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > |