3D Display Demo 1 -- Setting up a 3D Display ================================================================================== This demo is where things start getting serious and evolved. We are going to set up our device to display in 3D using 'blue line' to synchronise the glasses. The blue line is a single line at the bottom of the display which our device uses to determine if the current frame is the left or right frame and to synchronise our 3D goggles. On a PROPixx projector, there is a polarizing filter for passive 3D and on the VIEWPixx and VIEWPixx /3D, there is an infra-red emitter to synchronise the active 3D glasses. You will need to open a screen using PTB's PsychImaging command. To setup the 3D, we call the following functions: ``Datapixx('EnableVideoScanningBacklight');`` ``Datapixx('EnableVideoStereoBlueline');`` ``Datapixx('SetVideoStereoVesaWaveform', 2);`` If you are using a VIEWPixx /3D, the command ``Datapixx('EnableVideoLcd3D60Hz');`` is required to use the optimized 3D parameters. .. Warning:: Some systems can move the blue line by themselves, and in these cases we need to modify the blue line parameters (which are handled by PTB):: SetStereoBlueLineSyncParameters(windowPtr, windowRect(4)+10); % on some SetStereoBlueLineSyncParameters(windowPtr, windowRect(4)); % on others That parameter might not be needed. In this demo, we handle the blue lines ourselves so that the above parameter is not required. The blue line is on the last horizontal line and the first quarter of the line represents the left eye, and from the start to 3/4 of the screen represent the right eye. We put the rest of the line black (represented as left and right off). This 3D stimulus is a square of dots which has a 3D bump moving inside. There is a red border for one eye and green for the other, causing it to appear as yellow. More PTB information on this demo can be found in `ImagingStereoDemo.m `_, that comes with PTB. This demo can also use VPixx devices with a ``ImagingStereoDemo(1,1)`` call. .. literalinclude:: ../DatapixxToolbox/DatapixxDemos/DatapixxImagingStereoDemo.m :language: matlab :emphasize-lines: 57-60, 81, 103-106, 169, 184 :linenos: