[DIY] homemade NVIDIA 3dVision interface code

Tutorials on how to create your own rigs, pics, movies, and everything that has to do with S-3D at home!
danmarell
One Eyed Hopeful
Posts: 1
Joined: Mon Jun 07, 2010 9:48 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by danmarell »

Is there any way we can recreate the exisitng driver for the 3d vision usb emitter, but have a control for slight delay/offset in the sync of the glasses. this would help with ghosting issues with current 120hz LCD 3d monitors such as the samsung 2233rz and acer gd245hq.
dragonfax
One Eyed Hopeful
Posts: 2
Joined: Thu Dec 31, 2009 2:20 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by dragonfax »

This is great! Last time I checked this thread, it only had cms' original code. I took that, ran with it a bit, but only made a little progress on my own before I gave up. I'm glad to see people kept moving forward with this in the last year.

My own situation is that I'd like to use the glasses on my Mitsubishi 73" DLP, without the need for an nvidia card at all. So I can use the glasses for watching movies or playing games on the ps3. (and thus avoid shelling out another $200 for other shutter glasses when I already bought these) The DLP has a VESA port. And I always have an HTPC nearby, just not one that can run the nvidia 3d vision software normally.

Originally I snooped the usb codes the driver uses when enabling 3d using a vesa port to sync, and had some limited success tricking the emitter into vesa-based 3d mode. But never got it working perfectly. I hope to do that now with the new info you guys have.
User avatar
tritosine5G
Terrif-eying the Ladies!
Posts: 894
Joined: Wed Mar 17, 2010 9:35 am
Location: As far from Hold Display guys as possible!!! ^2

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by tritosine5G »

Yup it would be nice to use the nvidia glasses ( or possibly , 100 usd SONY !!! ) , instead of the bit cauldron arriving later this year.
-Biased for 0 Gen HMD's to hell and back must be one hundred percent hell bent bias!
Dowjd
One Eyed Hopeful
Posts: 27
Joined: Sat Dec 29, 2007 11:11 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by Dowjd »

I am in the same situation as flyguy. I have an HL67A750 LED DLP and a Sony 3D bluray player w/3D firmware update. The 3D will not work with the Bluray player. I sent an email to Samsung and they say the sammy will only work with a PC in 3D mode. I will try flyguy's backdoor fix, but Samsung needs to provide a firmware update for these "older" 3D ready Tv's. They should work with a PC and a 3D Bluray player.

I'll be ticked if there is no firmware update. Dang TV cost me $2,300.00
Mymlan
One Eyed Hopeful
Posts: 7
Joined: Wed Jun 23, 2010 11:39 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by Mymlan »

Will this work with ATI graphics cards? That would rock my world! :shock:
dragonfax
One Eyed Hopeful
Posts: 2
Joined: Thu Dec 31, 2009 2:20 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by dragonfax »

they rarely provide firmware updates for tvs. especially old ones.

for my mitsubishi (73833) they put out a $100 converter that changes the modern 3d standard signal into the old non-standard one that the mits takes. that's supposed to enable it for use with a ps3, or other hardware.

I too would like to get the glasses working without the nvidia software. For use with other 3d output devices. Theres another thread on this forum about some fellows working up hardware solutions to replace the proprietary emitter. But I always have an HTPC near the tv, so I don't mind a software solution myself. But i'd prefer one that didn't require a top of the line nvidia graphics card, and some tricky program running on the computer, in this case, the 3d video player.

I did a little usb snooping when using the VESA connector. This is what I found.

bits 1 and 2 at 0x2021 apparently have to do with the vesa connector. bit 1 is on when you have something plugged into it (not sure if a signal is necessary though). bit 2 is on when you are actually syncing with the vesa port. bit 0 is still the front button, of course.

When watching 3d this means 0x2021 is 0x06. And when the nvidia drivers disables the 3d (because I hit the button) it drops to 0x02. not sure if bit 2 means we have a good signal from the tv, or we're _using_ the vesa signal to sync to.the driver continues to flip 1B (0x2022) to 0x07 between 0x03 when enabling/disabling the 3d feature.

it still sends timing details like cms' original code pasted here does. they look identical. even though its going to use the vesa (3d dlp link) to do the real syncing.

It never sends any flip commands though, like cms' original code does. just the initial timing details. and a constant 'status' request of location 0x18. which as I said is usually either 0x000006 during normal operation. I don't have any screens that work at 100hz, so I've never seen the glasses operate in any normal fashion, without a vesa connection.

the driver is smart enough to know if you didn't plug the vesa in, and displays a warning on screen. obvious it can see that 0x2021 is 0x00. if I plug the vesa in but dont turn 3d mode on the mits, then it probably figures it out through the hdmi negotation, and displays a different error message to the fact. when I try to use 3d anywyas. the 0x2021 is 0x02. implying the mits always provides some sort of signal over the vesa.

I'm running a x64 windows 7 system.
vpl3d
One Eyed Hopeful
Posts: 2
Joined: Wed Jul 07, 2010 3:46 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by vpl3d »

I tried compiling the Activator code following the instructions from drowhunter, but get the following link errors:

fbo.obj : error LNK2001: unresolved external symbol __imp____glewCheckFramebufferStatusEXT
fbo.obj : error LNK2001: unresolved external symbol __imp____glewFramebufferRenderbufferEXT
fbo.obj : error LNK2001: unresolved external symbol __imp____glewRenderbufferStorageEXT

...and 10 other similar ones. It seems it can't find the glew libraries even though I specify glew32.lib to be included. Any suggestions? Thanks in advance!
vpl3d
One Eyed Hopeful
Posts: 2
Joined: Wed Jul 07, 2010 3:46 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by vpl3d »

Nevermind, figured it out. I had to compile as release and input a couple extra libraries. Thanks anyway.
strange007
One Eyed Hopeful
Posts: 2
Joined: Wed Jul 21, 2010 7:48 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by strange007 »

Thank you a lot!
It's a good program.
VadersApp
Cross Eyed!
Posts: 133
Joined: Mon May 28, 2007 5:39 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by VadersApp »

Great tool! It´s the program that made me buy an ati 5870 2gb now.
Found out that my Samsung DLP had ghosting when i used the tool. But got rid of it by putting 110 hz in the config file of the tool.
It´s perfectly synced and there is no ghosting, don´t know why but it works.
Thats with 3d vision deactivaded and iz3d Checkerboard and this great tool on my 2x 280 gtx.
mgb
One Eyed Hopeful
Posts: 10
Joined: Fri Aug 06, 2010 11:29 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by mgb »

The demo executable almost works - but vsync is set to false so there is a lot of tearing.
I'm having some problems building it (vs2008, win7 32 and 64bit, sfml1.6, glew-1.5.5)

1>app.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
1>nvidiaShutterGlasses.obj : error LNK2001: unresolved external symbol __imp__memmove_s
1>nvidiaShutterGlasses.obj : error LNK2001: unresolved external symbol __imp___invalid_parameter_noinfo
1>nvidiaShutterGlasses.obj = a whole bunch of linker errors about std::string ...

1>main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall sf::Thread::~Thread(void)" (??1Thread@sf@@UAE@XZ) ... lots more mutex and threading linker errors

Does the code need a particular SVN version of sfml?
supcaj
One Eyed Hopeful
Posts: 3
Joined: Mon Aug 23, 2010 11:09 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by supcaj »

Just to clarify, is it possible that the 3d Vision glasses could be used with the iz3d driver using this activator? IE,

-Use Iz3d shutter glasses mode
-fire up 3d vision activator
-launch game using iz3d driver


Anyone tried it?
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by magestik »

Great Work ! There is some problems but that's really a good work !

I managed to extract the firmware directly from Linux :
1) Download the driver NVIDIA 3D Vision v258.96 driver (or the newest version)
2) Extract files from the .exe: "cabextract NVIDIA*" (cabextract is included in many Linux repository)
3) Launch extractfw with nvstusb.sys in the same directory (extractfw must be compilled via a simple "make")
kunguz
One Eyed Hopeful
Posts: 3
Joined: Fri Aug 13, 2010 4:46 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by kunguz »

:woot

Dear all,

I made a translation of the previous codes from C to Python. Currently, the code is located under:

http://code.google.com/p/pyusbir/" onclick="window.open(this.href);return false;

Currently, it is able to control the shutter glasses. I believe having such a module in Python will extend the algorithm on different platforms such as Windows,Linux and Mac OS X. -Currently only tried with Linux-

Soon I will finalize and come up with a installer and a demo script.

Best regards,
Kaan
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by magestik »

Me too... I'm working on this for a long time ^^

http://github.com/magestik/TuxStereoVie ... ters_nv.py" onclick="window.open(this.href);return false;

But I changed the code : I added some small fixes thanks to the usb log file !

Maybe we can merge our project ? My goal is to make a linux daemon to control many glasses (Nvidia, eDimensionnal, ATI ...)
kunguz
One Eyed Hopeful
Posts: 3
Joined: Fri Aug 13, 2010 4:46 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by kunguz »

Hey magestik,

I am surprised to hear that some else is also working for the same goal. But in my case, I am trying to have some library just for Nvidia shutter glasses, because I do not have any other glass in hand currently... My ultimate goal here is to give functionality to pygame so that people can use their own shutter glasses to use in their games.

So far I could not manage to operate the glasses at some frequency different then 120 Hz. I want to provide the users to have 60Hz (30Hz each eye) in their game as an option.

I have coded so more so far. I will share them on the project page when it will be more mature. On the other hand my email is kunguz@gmail.com, I think it would be a great idea to move forward together.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by magestik »

You can remove your email address (for preventing spam ;) ).

For those who are interested, we are planning to make a deamon for controlling the NVIDIA 3D Vision controller. The daemon would be some kind of interface between softwares and the emitter.

Code: Select all

[SOFTWARE] => [DAEMON] => [HARDWARE]
The goal is to prevent two different software to "talk" with the emitter at the same time. One of the other goal is to have only one code for controlling the USB dongle in place of one code per software (which would to communicate with the hardware) ... So, the daemon will take care of firmware update (when new Nvidia release a new version) and the upload to the controller (when it's detected). I think it's the best way to use it. But the daemon must support other devices (maybe eDimensional dongle, or future ATI glasses). So every software who want to be compliant with 3D glasses just have to communicate with the daemon and this one must communicate with the configured glasses... So users just have to configure the daemon (refresh rate of the display, kind of glasses ...) and software just have to "say" : "swap to left" or "swap to right" without taking care of what device is used !
^

My goal is to finish my stereo images viewer and my stereo videos player. Then I want to make a Firefox plugin to support images and later, it would be great to support 3D videos. But kunguz has another goal : he wants to make a pygame module to convert 3D games in stereo 3D games ! But the glasses will be controlled by the daemon (so we will make it together).

I hope you understand what I mean... It's pretty hard to explain all of this in english ^

Magestik
reventon
One Eyed Hopeful
Posts: 6
Joined: Tue Jun 29, 2010 6:19 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by reventon »

HI, magestik. I'm also working on a 3d video player based on 3d vision. Inspired from this thread: http://www.mtbs3d.com/phpBB/viewtopic.php?f=7&t=5072" onclick="window.open(this.href);return false; I refer to msdn and find a way to program a 3d video player using DirectShow VMR9 renderless mode. Do you use the same technique?

My goal is to play 3d videos on multiple screens which makes up a large, immersive screen. I try to use the multiple head technique in Direct X to achieve this. It works fine on 2d. But when it comes to 3d, 3d vision cannot be activated on the slave screen. I even refer to Quadro's document, and it says on win7, even quadro fails to do this, except for Quodro Plex. Since Geforce 3d vision only works on win Vista/7. It seems this goal is hard to achieve.

Now my only hope is 3d vision surround. Technically, I can use a GTX295 with 3 projectors in portrait mode. Ironically, my lab has enough 3d displays, but no 3d surround qualified graphic card. It really drives me crazy!

Do you have any suggestion to do this without 3d surround?
User avatar
tritosine5G
Terrif-eying the Ladies!
Posts: 894
Joined: Wed Mar 17, 2010 9:35 am
Location: As far from Hold Display guys as possible!!! ^2

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by tritosine5G »

Do you have any suggestion to do this without 3d surround?
http://www.dhgate.com/mp102-dvi-dual-ch ... 44158.html
http://www.widescreengamingforum.com/fo ... 65&t=18394" onclick="window.open(this.href);return false;
plus you should hack into fullHD pj's, to add LED lightning (uniformity, aging), and 120hz ;)
http://www.mtbs3d.com/phpBB/viewtopic.p ... 452#p50452" onclick="window.open(this.href);return false;
-Biased for 0 Gen HMD's to hell and back must be one hundred percent hell bent bias!
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by magestik »

reventon wrote:HI, magestik. I'm also working on a 3d video player based on 3d vision.
What you want to do is very different from what I do.

First, you want to do it for Windows. Then, you use the DirectX API (on Linux there is no API so we have to make it). Finally, I didn't start my video player yet.

Sorry I can't help you :?

For those who read this thread, kunguz managed to activate his glasses at 65 Hz (and syncrhonize them with his screen). We are going to start the daemon !
reventon
One Eyed Hopeful
Posts: 6
Joined: Tue Jun 29, 2010 6:19 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by reventon »

tritosine wrote:
Do you have any suggestion to do this without 3d surround?
http://www.dhgate.com/mp102-dvi-dual-ch ... 44158.html
http://www.widescreengamingforum.com/fo ... 65&t=18394" onclick="window.open(this.href);return false;
plus you should hack into fullHD pj's, to add LED lightning (uniformity, aging), and 120hz ;)
http://www.mtbs3d.com/phpBB/viewtopic.p ... 452#p50452" onclick="window.open(this.href);return false;
Thank you. Yeah, I have considered these 1 to N solutions. Matrox tripleheadtogo does not support 120hz. The one you recommend does not support 120hz on high resolution, either. Moreover, I think it may have longer delay so that it may have some issue on sync with the glasses. I think the best way is to link directly.
reventon
One Eyed Hopeful
Posts: 6
Joined: Tue Jun 29, 2010 6:19 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by reventon »

magestik wrote:
reventon wrote:HI, magestik. I'm also working on a 3d video player based on 3d vision.
What you want to do is very different from what I do.

First, you want to do it for Windows. Then, you use the DirectX API (on Linux there is no API so we have to make it). Finally, I didn't start my video player yet.

Sorry I can't help you :?

For those who read this thread, kunguz managed to activate his glasses at 65 Hz (and syncrhonize them with his screen). We are going to start the daemon !
On linux, NV uses opengl quad buffer which Geforce does not support. I think your job is pretty tough.
User avatar
tritosine5G
Terrif-eying the Ladies!
Posts: 894
Joined: Wed Mar 17, 2010 9:35 am
Location: As far from Hold Display guys as possible!!! ^2

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by tritosine5G »

reventon wrote:The one you recommend does not support 120hz on high resolution, either.
...for that price it'd better support any goddamn resolution , LOL. Maybe contact the guy? :mrgreen:
-Biased for 0 Gen HMD's to hell and back must be one hundred percent hell bent bias!
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by magestik »

reventon wrote:On linux, NV uses opengl quad buffer which Geforce does not support. I think your job is pretty tough.
This topic (and libnvstusb) has been created to control Nvidia 3D Glasses on Linux. My project, which is a fork, has the same goal. And it's working on any graphic card ;)
Kachan
One Eyed Hopeful
Posts: 1
Joined: Tue Sep 21, 2010 4:40 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by Kachan »

Hi all,
i'm new in this forum... I'm working into a project developed with openGL that uses an algorithm for stereoscopic vision; i need to interface it with shutter glasses NVIDIA but i can't activate them.

I need a code that can active my shutter glasses (i've the IR transmitter), to watch at the stereoscopic images coming out from the algorithm, on my screen.

Could anyone help me...? Please.....
reventon
One Eyed Hopeful
Posts: 6
Joined: Tue Jun 29, 2010 6:19 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by reventon »

magestik wrote:
This topic (and libnvstusb) has been created to control Nvidia 3D Glasses on Linux. My project, which is a fork, has the same goal. And it's working on any graphic card ;)
That means it can work with an AMD card with NV IR emitter, right? That's great.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by magestik »

Yes it works with any graphic card (ATI or Nvidia), any screen (even with 60 Hz's but ...you know ... headaches :mrgreen: ) ... I'm currently doing some fix to sync pictures with vertical refresh :) But the interface code is working just fine. Thank you kunguz :P
bombo105
One Eyed Hopeful
Posts: 2
Joined: Thu Nov 25, 2010 2:58 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by bombo105 »

I tried to run activator_release in Win7 64bit but a GUI never showed up (but the program was running in the task manager). Any ideas?

Thanks.
Last edited by bombo105 on Fri Dec 03, 2010 1:34 am, edited 2 times in total.
faker
One Eyed Hopeful
Posts: 20
Joined: Fri Jan 09, 2009 3:45 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by faker »

somebody knows where can i find the file usbdi.h?

i can´t compile the project without it.

thanks!!
evgenln
One Eyed Hopeful
Posts: 18
Joined: Tue Sep 28, 2010 5:28 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by evgenln »

faker wrote:somebody knows where can i find the file usbdi.h?

i can´t compile the project without it.

thanks!!
Which version of the SDK are you using? I compiled project a few months ago and also faced to the same problem. I found the desired file on the Internet, but I had to make an additional change in the other SDK files, Microsoft has changed some files in the new versions.
makr
One Eyed Hopeful
Posts: 2
Joined: Mon Aug 02, 2010 3:38 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by makr »

I get the feeling I'm doing something wrong. I downloaded peter64's precompiled version for Vista (I'm on Win7 x64) and I'm not able to get the glasses to respond to the 3d image on a 60hz monitor.

To make it more clear, I open the .exe, the cube starts spinning, and the green light on my emitter lights up. Then I open up something in 3d, and while the monitor shows a 3d image, the glasses just flicker rapidly the same way they do when trying to run them in an incompatible mode.

I'd appreciate any help. I'm using an Nvidia card, and the kit works just fine with a 120hz projector.
bombo105
One Eyed Hopeful
Posts: 2
Joined: Thu Nov 25, 2010 2:58 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by bombo105 »

Still can't get any GUI to show up under win7 64bit. I have V C++ 2005,2008,2010 redistributables installed too. Any ideas?
faker
One Eyed Hopeful
Posts: 20
Joined: Fri Jan 09, 2009 3:45 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by faker »

Finally i compile the project and ejecute it but i don´t know why use this sequence:

int sequence[] = { 0x00031842,
0x00180001, a, b, 0xfffff830, 0x22302824, 0x040a0805, c,
0x00021c01, 0x00000002, //note only 6 bytes are actually sent here
0x00021e01, rate*2, //note only 6 bytes are actually sent here
0x00011b01, 0x00000007, //note only 5 bytes are actually sent here
0x00031840 };

And i prove view with the glasses and i can´t see the image, only if i turn my head 90º, any idea?

Thank you!
kunguz
One Eyed Hopeful
Posts: 3
Joined: Fri Aug 13, 2010 4:46 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by kunguz »

Dear all,

Finally I managed to finish the code and made few experiments with successful results. Now, my code can drive shutter glasses at any desired refresh rate.

http://code.google.com/p/pyusbir/source ... bir.py?r=9" onclick="window.open(this.href);return false;

to use it just type

python usbir.py 115.6

Best regards,
Kaan
makr
One Eyed Hopeful
Posts: 2
Joined: Mon Aug 02, 2010 3:38 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by makr »

If only I knew software at all, maybe I wouldn't be so confused.

I downloaded the Python editor, but when I load this and go to Run Module, I only get an error saying it couldn't find usb.core. If I delete usb.core from the source, I get an error saying it can't find usb.util.


Where exactly am I supposed to type python usbir.py 115.6? Am I doing something else wrong as well?

Thanks
peter64
One Eyed Hopeful
Posts: 45
Joined: Wed May 02, 2007 12:17 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by peter64 »

for anyone trying to run the python on windows,

first you'll need to build an inf for the nvidia pyramid using libusb-win32-bin-1.2.2.0.zip then install the pyramids inf.
then second you'll need to install pyusb-1.0.0-a1.zip into your python distribution.
you might need to add the c:\windows\system32 to your PYTHONPATH variable so that libusb can find the dll it needs.
then when you run it you might get a little further.
I'm getting further now but I'm getting stuck here.

[1;33;32mID: 0x955:0x7[0m NVIDIA stereo controller found!
[1;33;32mID: 0x955:0x7[0m NVIDIA stereo controller does [1;31;40mNOT[0m have required firmware!
[1;33;32mID: 0x955:0x7[0m Started to upload the firmware to NVIDIA stereo controller!
Traceback (most recent call last):
File "C:\Work\3dvision\pyusbir\pyusbir\src\lib\usbir.py", line 175, in <module>
sys.exit(main())
File "C:\Work\3dvision\pyusbir\pyusbir\src\lib\usbir.py", line 156, in main
glass = shutterglass(0x0955,0x0007)
File "C:\Work\3dvision\pyusbir\pyusbir\src\lib\usbir.py", line 34, in __init__
self.upload_firmware(self.filepath(self.filename))
File "C:\Work\3dvision\pyusbir\pyusbir\src\lib\usbir.py", line 67, in upload_firmware
res = self.dev.ctrl_transfer(0x40, 0xA0, pos, 0x000,buf,0)
File "C:\Downloads\Firefox\3DVision\pyusbir\pyusbir-read-only\source\lib\usb\core.py", line 678, in ctrl_transfer
self.__get_timeout(timeout)
File "C:\Downloads\Firefox\3DVision\pyusbir\pyusbir-read-only\source\lib\usb\_debug.py", line 52, in do_trace
return f(*args, **named_args)
File "C:\Downloads\Firefox\3DVision\pyusbir\pyusbir-read-only\source\lib\usb\backend\libusb01.py", line 505, in ctrl_transfer
timeout
File "C:\Downloads\Firefox\3DVision\pyusbir\pyusbir-read-only\source\lib\usb\backend\libusb01.py", line 364, in _check
raise USBError(errmsg)
usb.core.USBError: libusb0-dll:err [control_msg] sending control message failed, win error: The I/O operation has been aborted because of either a thread exit or an application request.

It looks like it can read whats on the usb hub but it can't write to it? I'de really like to run your code kunguz as it looks really clean!
If you could give me any ideas why things might be stopping where they are I'de really appreciate it.
atariguy
One Eyed Hopeful
Posts: 12
Joined: Fri Aug 27, 2010 1:43 am

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by atariguy »

This is great news for Mac owners!
mmmmmmmm wrote:Last night, drawing inspiration from Kolrabi's code, and some quality time with a USB sniffer, I got our 3d vision glasses working on a Mac.

Rock solid 120Hz on a recent Viewsonic projector (PDJ6251), very little ghosting, no glitches, HDMI. This Viewsonic has two 120Hz 3d modes — the contrast ratio trashing "DLP-link" mode and a almost transparent "3d vision" mode. But the projector itself has not yet been "whitelisted" by Nvidia's drivers which, for me, was just the last straw.

I'll try to write this up properly soon, but some key facts for likeminded hackers:

1) I know hardly anything about the current state of OpenGL on Linux, but I suspect that the route being pursued here in this forum to sync the buffer swap to the glasses might be a bit of a dead end. I don't think there's any contemporary hardware on which you can say anything about how long it's going to take between a GLUT or a window system swap call and when your back buffer actually ends up as photons.

2) On the mac the solution is straightforward — we can busy loop on CGDisplayBeamPosition to pick the spot to swap (note: CGDisplayWaitForBeamPositionOutsideLines seems to be completely decoy, it returns instantly). The brute force approach of course takes most of a core, but it does give you a completely independent program that you can run in the background sending sync out while you start and stop various opengl programs (you have a 50% chance of having the eyes flipped at the start). Of course, being a little smarter about sleeping at the right time will reduce the CPU usage of this approach.

3) Like Kolrabi's code I'm currently using '0' as the offset in the eye switching packet since I can't compute any better value and I don't seem to need to. Staring closely at the USB dump it appears that both the left and right eye signals are being sent with no delay in between them, and then, around 16ms later the same thing happens. Here the offset is clearly required. In my code, I'm sending left and right with an 8.333ms delay between each.

4) It appears that all of the recent "real" graphics cards on Mac's support genuine quad buffered stereo that would appear to work with this technique without inserting additional FBO's into your code's swap routines. All in all, it seems like OS X + 3d vision is an ideal home-brew stereo hacking platform.

5) But I was unable to use Kolrabi's firmware extractor to extract the firmware from nvstusb.sys — either the most recent version or 190.62. It doesn't locate the right spot in the .sys file to make the extraction. Right now I'm booting into bootcamp once — this gets the "green light" on the unit and then rebooting into OS X. As long as the device isn't unplugged it stays useable. Of course, this means that you need to be able to install 3d vision on a windows partition in the first place, so short of illegally distributing the firmware file, ATI users remain out of luck. If it wasn't for that, I imagine it would work just fine on those cards as well.

6) And I needed a different set of magic timing numbers from Kolrabi (different from both sets that they included). The original set inside that code cause both shutters of my glasses to turn almost completely opaque (I can see a little color from the color wheel of my projector phasing in and out). The "correct" set is easily sniffed from the USB exchange that happens when you enter the "medical test image" from the 3d vision control panel. But I'm no closer to understanding the timing formulae — I have it working at 120Hz (actually 119.96Hz) and that's that.

7) Multi-screen stereo is a no-go since the clocks out of both ports of the cards we've tested have an arbitrary phase offset. If you are feeling up to it, you can check and uncheck "mirror displays" until you happen to get them close enough (you can call CGDisplayBeamPosition to find out). That can actually be automated, but seems like a ridiculous solution.

We're going to continue testing the setup here — including purchasing a new transmitter, just to make sure that there aren't multiple versions of this hardware out there (ours is from December).

In any case, it's working and working well — comparable, albeit on a far smaller scale, to our experiences working with high end digital cinema projectors and XPand x101's. It has far better contrast ratio than the XPanD x102's with consumer DLP-Link on the projectors I've tested.

It's probably time to set up a group & repository somewhere to formalize this project, no?
Ampfan2
One Eyed Hopeful
Posts: 5
Joined: Sun Jan 09, 2011 11:09 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by Ampfan2 »

"note: CGDisplayWaitForBeamPositionOutsideLines seems to be completely decoy, it returns instantly".

This is likely because "outside lines" includes horizontal retrace blanking time, so at most you are getting a 31 microsecond delay
(Horizontal line time at VGA rates). Some of the really old video cards (PC VGA) wrote a byte or two during that H retrace.
TheOracle
One Eyed Hopeful
Posts: 6
Joined: Mon Mar 30, 2009 7:33 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by TheOracle »

I can confirm that the compiled activator works in Windows XP. And get this, I managed to stabilize the sync rate of the 3D Vision glasses by connecting the Edimensional dongle to the 3D Vision emitter with the vesa sync cable.

After they were connected I started the 3D Vision activator, then started the ED activator in page flip mode. The little box popped out of the screen in perfect 120hz 3D. The 3D Vision glasses are now getting their sync from the Edimensional dongle, but they can now be activated in WinXP on command.

I'm testing right now to see if the 3DV glasses work with the IZ3D driver.
TheOracle
One Eyed Hopeful
Posts: 6
Joined: Mon Mar 30, 2009 7:33 pm

Re: [DIY] homemade NVIDIA 3dVision interface code

Post by TheOracle »

Yep, just tested it. Just played Bulletstorm using the IZ3D driver and the 3D Vision glasses and it looked amazing.

This is a dream come true guys.
Post Reply

Return to “Do it Yourself!”