Hello,
I'm trying to filter the output of vision egg on a per pixel basis and I'm
having a few problems. I am doing stereostopic back projection, and the way it
works is that one large screen sends the left half of the screen to the left
eye projector and the right half to the right projector. So I have two
viewport objects connected to one screen, and that works very nicely.
However because I am back projecting there is a very bright spot in the
screen, this isn't all bad as we wanted a gaussian shaped mask over the
stimulus anyway, so I have written code that uses
get_framebuffer_as_array/put_pixels to adjust the bright spot into a nice
gaussian shaped mask (incidently I don't care about speed as my stimuli are
static, but I do care about exactly what luminence I get at each pixel, which
is why I have chosen this rather slow way of doing things).
Since get_framebuffer_as_array/put_pixels are screen method I thought I would
get both viewports but what I actualy seem to get is the contents of what
viewport I drew in last.
If I do this:
screen.clear()
left_viewport.set(stimuli = left_stimulus)
left_viewport.draw()
right_viewport.set(stimuli = right_stimulus)
right_viewport.draw()
output_filters.filter_screen(screen)
I get exactly what I want for the right eye. If I do this:
screen.clear()
left_viewport.set(stimuli = left_stimulus)
left_viewport.draw()
output_filters.filter_screen(screen)
right_viewport.set(stimuli = right_stimulus)
right_viewport.draw()
I get mostly the right thing for the left eye but the right half of the left
eye is black.
If I do this:
screen.clear()
left_viewport.set(stimuli = left_stimulus)
left_viewport.draw()
output_filters.filter_screen(screen)
right_viewport.set(stimuli = right_stimulus)
right_viewport.draw()
output_filters.filter_screen(screen)
It mostly looks correct excet that the right half of the left eye is black and
the right eye has the left half black.
So my question is, is this the right approach to useing put_pixels with
multiple viewports? If so what am I doing wrong, and if not what should I be
doing?
Any help would be greatly appreciated!
Thanks, Graeme Phillipson.
====================================== The Vision Egg mailing list Archives: //www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html