{"id":237,"date":"2015-01-03T01:56:23","date_gmt":"2015-01-03T01:56:23","guid":{"rendered":"http:\/\/int03.co.uk\/blog\/?p=237"},"modified":"2016-02-12T18:50:08","modified_gmt":"2016-02-12T18:50:08","slug":"persuading-nvidia-3d-vision-pro-to-sync-with-an-unsupported-projector","status":"publish","type":"post","link":"https:\/\/int03.co.uk\/blog\/2015\/01\/03\/persuading-nvidia-3d-vision-pro-to-sync-with-an-unsupported-projector\/","title":{"rendered":"Persuading NVIDIA 3D Vision Pro to Sync with an unsupported Projector"},"content":{"rendered":"<p>Recently I did some work to persuade\u00a0the NVIDIA 3D Vision Pro glasses work with six Optoma EW610ST Projectors, and made some interesting discoveries in the process. This projector is not an officially supported model on the NVIDIA compatibility list.<\/p>\n<p>The projectors in our setup are connected in Mosaic mode, and we were using active stereo at 1280&#215;720 and 120Hz on each projector, with the 3-pin VESA stereo sync cable from the graphics card connected to the NVIDIA Pyramid.\u00a0In the default set up, it results in terrible ghosting (cross-talk) when used with the NVIDIA glasses.<\/p>\n<p>The first problem is that these projectors have only one 3D mode: DLP-Link. This is unfortunate as DLP-Link uses a white flash to synchronise the glasses, whereas the NVIDIA 3D Vision Pro glasses use RF. The real DLP-Link glasses will obviously blank themselves during the white flash, but the NVIDIA shutters are open, so this results in poor contrast (effectively, slightly increasing the brightness of the entire scene). This was a problem in our case, as we were edge-blending the projectors. Black level blending with an offset would be possible, but would reduce the contrast of the whole image. The solution to this first problem was to simply disable 3D mode on the projector! It still seems to display\u00a0120Hz frame sequential stereo with 3D disabled.<\/p>\n<p>The next problem is that there is really bad ghosting, because the timing of the glasses is wrong. To find out what was going on, I decided to measure the light output of the projector against the stereo sync signal.<\/p>\n<p>I didn&#8217;t have a light sensor to hand, but fortunately\u00a0LEDs can be used as a (rather insensitive)\u00a0light sensor. In this case, I used a clear infra-red LED situated about 1cm from the lens, connected directly across one input of my &#8216;scope. To improve the response speed, I put a 1K resistor in parallel with the LED to help discharge it quickly.<\/p>\n<p><a href=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/led_meets_projector.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-239\" src=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/led_meets_projector.jpg\" alt=\"LED as Light Sensor\" width=\"640\" height=\"391\" srcset=\"https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/led_meets_projector.jpg 640w, https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/led_meets_projector-300x183.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>I connected the stereo sync signal (output from the graphics card) to the second input of the scope, and set the &#8216;scope to trigger from the sync input.<\/p>\n<p>Then I wrote some OpenGL code to draw pure white on the left stereo channel, and pure black on the right channel, so the projector was flickering full-screen white\/black at 120Hz.\u00a0The results are shown below. The red trace is the stereo sync signal, and the yellow trace is projector light output.<\/p>\n<p><a href=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig1_presentation_no_delay.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-240\" src=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig1_presentation_no_delay.png\" alt=\"Optoma EW610ST Stereo Phase\" width=\"678\" height=\"468\" srcset=\"https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig1_presentation_no_delay.png 678w, https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig1_presentation_no_delay-300x207.png 300w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><\/a><\/p>\n<p>As can be seen from the graph above, the two are out of phase with some of the image visible outside the sync period. I measured this at about 316us delay, which is about 3.8% of the frame time (which is 8.33ms for 120Hz).<\/p>\n<p>The strange shape of the yellow waveform is due in part to the way the DLP projector works, with a spinning colour wheel which has separate segments for red, green, blue and white (some models use different colour combinations). Also, amongst other effects, the different colour components have different luminance levels, and we are only looking at a subset of the mirror array with our sensor.<\/p>\n<p>Since the stereo sync is out of phase with the projector, the logical next step is to delay the sync signal.<\/p>\n<p>Ideally\u00a0this sort of stereo phase adjustment would be possible from the NVIDIA drivers (at least on the Pro version), but it doesn&#8217;t seem to be? I couldn&#8217;t find one, and there don&#8217;t seem to be any functions in the NVAPI for altering the timings either.<\/p>\n<p>There are some specific parameters for each projector manufacturer\/model stored in the registry (and driver INF file), which look like possible timings for the glasses:<\/p>\n<pre data-iceapw=\"4\" data-iceapc=\"1\"><code data-iceapw=\"4\">HKLM\\System\\CurrentControlSet\\Services\\NvStUSB\\Parameters\\SAM_8524\r\n<\/code><\/pre>\n<p data-iceapw=\"4\" data-iceapc=\"1\">However, the format is proprietary and undocumented. I made a start at successfully understanding some of these, but it occurred to me that these parameters might not be used at all when the pyramid is fed with external sync, so it seemed easier to take the direct approach of making some hardware to delay the sync.<\/p>\n<p>I decided\u00a0to try and rectify this phase error in the sync signal, by delaying the sync signal before feeding it to the NVIDIA pyramid. To achieve this, I used an <a title=\"STM8S Discovery\" href=\"http:\/\/www.st.com\/web\/catalog\/tools\/FM116\/SC959\/SS1673\/PF247087?sc=internet\/evalboard\/product\/247087.jsp\" target=\"_blank\">STM8S Discovery<\/a> board which is very low-cost, easily programmed via USB, and capable of high timing precision.<\/p>\n<p>The hardware is very simple: the sync output from the PC is connected via a 1K resistor to a GPIO input on the STM8S (the 1K resistor is just a precaution against toasting the very expensive graphics card!) Another GPIO output is used to feed the sync input of the NVIDIA pyramid. The only other connection is the common ground, and the board\u00a0is powered over USB.<\/p>\n<p><a href=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/stm8s_sync_shifter.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-238\" src=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/stm8s_sync_shifter.jpg\" alt=\"STM8S Discovery Board\" width=\"640\" height=\"348\" srcset=\"https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/stm8s_sync_shifter.jpg 640w, https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/stm8s_sync_shifter-300x163.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>The firmware uses interrupts to detect the high\/low transition of the input, then schedules an onboard timer to generate another interrupt after a specified delay period has elapsed. It then drives the output high or low as required. This method will support any vertical refresh rate, and allows very high precision adjustment.<\/p>\n<p>Having set this up to generate a 316us delay, the sync signal is now in phase with the projector:<\/p>\n<p><a href=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig2_presentation_316us_delay.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-241\" src=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig2_presentation_316us_delay.png\" alt=\"Optoma EW610ST with delayed sync\" width=\"679\" height=\"468\" srcset=\"https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig2_presentation_316us_delay.png 679w, https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig2_presentation_316us_delay-300x207.png 300w\" sizes=\"(max-width: 679px) 100vw, 679px\" \/><\/a><\/p>\n<p>However, the projector is illuminating\u00a0the full frame period, and there is no dark interval at all for the glasses. This is due to the projector being set up in &#8220;Presentation&#8221; display mode, which is designed to maximise image brightness. In our case, this will result in ghosting, because the LCD shutters take a little time to &#8216;open&#8217; and &#8216;close&#8217;, during which time we need the display to be dark.<\/p>\n<p>The solution to this last problem is to alter the projector settings to select a mode which gives a reasonable dark interval for the glasses. On the EW610ST, this can be achieved by setting the Display Mode to sRGB. The final result with the 316us delay and sRGB mode selected is shown below:<\/p>\n<p><a href=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig3_sRGB_316us_delay.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-242\" src=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig3_sRGB_316us_delay.png\" alt=\"Optoma EW610ST acceptable stereo mode\" width=\"678\" height=\"468\" srcset=\"https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig3_sRGB_316us_delay.png 678w, https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/01\/fig3_sRGB_316us_delay-300x207.png 300w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><\/a><\/p>\n<p>Finally, I tried this with\u00a0the NVIDA glasses, and the ghosting had been eliminated. In a realistic scene, there is imperceptible ghosting, even with very high contrast areas.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I did some work to persuade\u00a0the NVIDIA 3D Vision Pro glasses work with six Optoma EW610ST Projectors, and made some interesting discoveries in the process. This projector is not an officially supported model on the NVIDIA compatibility list. The projectors in our setup are connected in Mosaic mode, and we were using active stereo &hellip; <a href=\"https:\/\/int03.co.uk\/blog\/2015\/01\/03\/persuading-nvidia-3d-vision-pro-to-sync-with-an-unsupported-projector\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Persuading NVIDIA 3D Vision Pro to Sync with an unsupported Projector<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/posts\/237"}],"collection":[{"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":5,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":566,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions\/566"}],"wp:attachment":[{"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}