Stereoscopy on Linux

Talk about everything off topic (EXCEPT POLITICS). Keep it fun!
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Stereoscopy on Linux

Post by magestik »

Hello All,

First, I'm a young French (17 years old), so excuse me for my bad English.
I'm going to promote my project. First, I want to tell you that I own (and use) a Zalman 3D display. But my favorite Operating system is Linux (Ubuntu if you know). And, in Linux there is no S-3D apps... So I've decided to make my own S-3D applications. So I'm creating a S-3D series of S-3D software.

So, I started the project on January 1th. But I worked very slowly on it ... to be sure of what I made.
My project is to make 4 kind of software :
- S-3D photo viewer
- S-3D video player
- S-3D webcam watcher
- S-3D game(s)

All my applications have to be compatible with anaglyph and interalced rendering. I want Nvidia 3D vision to run with ... but I've no Shutter (actually it's too expensive for me :P ).

About Anaglyph Rendering
The Anaglyph mode must be very large in rendering method and colors cople.

Method:
- half-colors
- full-colors

Colors :
- 3 colors: red/cyan, green/purple, blue/orange
- 2 colors: red/green, green/blue, blue/red


About Stereo Photo Viewer
I've already release a beta version of my Photo Viewer. It's work great and can open MPO or JPS files.


About Stereo Webcam Watcher
I started the next software : the stereo watcher which use 2 webcam to produce a stereo rendering (anaglyph or interlaced).
I try to acquiring 2 webcam in 1 windows : it's work. But I can't make a S-3D rendering.


About Stereo Video Player
I want it to play 3D Blu-Ray and streaming for online 3D channel (for example). Of course, I want it to play stereo video from Hard Drive.
I will make this software in a few week.

Is there any Linux user ? Is there anyone interested by helping me ?

Thank you,

Magestik
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: Stereoscopy on Linux

Post by cybereality »

Thats really cool man! I am also working on S-3D software, but on the PC. But I imagine there are people that would rather use Linux. Good luck.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

I made a Website which host S-3D images. It can display Image in Anaglyph or Interlaced.
I think my S-3D Photo Viewer could have an export button to upload S-3D image quickly.

If you are intersted by this site (preview or source) send me a MP.

Thank you ;)

Magestik
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

I use ubuntu almost exclusively.

For my past threads relating to stereo on linux look here: http://www.mtbs3d.com/phpBB/viewtopic.php?f=3&t=4316

also, look at the following link for info on using mplayer/mencoder to play/convert various 3d movie formats:

http://www.mtbs3d.com/phpBB/viewtopic.php?f=24&t=4521" onclick="window.open(this.href);return false;

ps: where can i find your work so far?
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

mickeyjaw> Waoh interesting. I believed that nobody used Linux. Good :D
:shock: :shock: :shock: I have just tested some command line which are on the other topic :O
It's work :woot

Thank you very much. I'm going to make the Stereo player :D

For my S-3D photo viewer, I'll make a new release tomorrow ... If you can wait ;)

EDIT: (30 minutes later) Good news: I've made a (python) tube between my Video Wtcher and Mplayer. It's work fine :D
I think I can make a release of it tomorrow ... too ;)
User avatar
iondrive
Sharp Eyed Eagle!
Posts: 367
Joined: Tue Feb 10, 2009 8:13 pm

Re: Stereoscopy on Linux

Post by iondrive »

hi guys,

I've been away for a while and still need to post more on the mplayer thread. I suppose mickeyjaw knew I would show up here sooner or later. Anyway it's nice to see this and I just want to say that I think the way to go would be to write an OpenGL driver that outputs in interlaced mode or others like over/under, etc. The problem is that I think this would be hard because even though OpenGL is a standard, it has some flexibility so that programmers can do similar things in different ways (or so I've heard) and so each game might have it's own quirks. Then again, even with DirectX, games still have their own quirks. Anyway, that's my two cents. Also, I'm very impressed with your efforts and skill at 17 years old. I hope you get a job with iZ3D or Tridef making Linux drivers for them or start your own business. Maybe it could work with OpenGL Windows games under Wine --- I'm thinking Starwars Republic Commando which normally only has 3 planes of depth, weird. OK, I get carried away sometimes.

later,

--- iondrive ---

Edit: I just remembered something. While testing dongles, I learned that the E-Dimensional dongle responds to blue line color coding on display bottom. It's another output option for you if you're interested, although in the game I tested, there were lots of blue flashes that made the dongle keep resetting/resyncing.
Last edited by iondrive on Sat Feb 26, 2011 4:56 am, edited 1 time in total.
System specs:
OS: 32-bit WinXP Home SP3
CPU: 3.2GHz Athlon 64 X2 6400
RAM: 800MHz 4GB dual channel mode
Video: geForce 8800GTS PCI-e, 640MB ram, driver 196.21
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Hello,

Thank you iondrive =D
For OpenGL, it's possible but for photo viewer and video player it's much easy to use simple method as I do. It may be usefull for stereo webcam viewing. For S-3D game too.

For 3D gaming on linux I've read about an OpenGL stereo driver, nammed VRizer ... on this wiki : http://linux3d.magicbox.org.uk" onclick="window.open(this.href);return false; (thank you mickeyjaw). So someone has tested it ? Is it work with Zalman (interlaced) ? It looks great, I will test it as soon as possible.

Since my last post I have not work because it's hollydays so I'm in my family ... But just before leave my (true) computer, I've finished the stereo photo viewer and I've started the graphical interface for the stereo video player. I remember that I tried to use two webcam for display only one -stereoscopic- frame ... and it was succefull.

Thank you for reading,

Magestik
User avatar
iondrive
Sharp Eyed Eagle!
Posts: 367
Joined: Tue Feb 10, 2009 8:13 pm

Re: Stereoscopy on Linux

Post by iondrive »

nice,

good link. I glad you posted it so my thanks to Mickeyjaw too then. I didn't know about that one. Maybe I'll 3d game in linux someday.

Stereo view webcam would be cool. I'm glad for your progress.
System specs:
OS: 32-bit WinXP Home SP3
CPU: 3.2GHz Athlon 64 X2 6400
RAM: 800MHz 4GB dual channel mode
Video: geForce 8800GTS PCI-e, 640MB ram, driver 196.21
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

This forum is very cool ...

Video and game (both in stereo) on Linux ...
Something I thought impossible for now.

I will go back home on wenesday ...
So I think that I could upload video player on Thursday. Maybe webcam viewer on Friday. And, if vrizer work, perhaps a special application for making and editing it conf files easyly. It could be useful for some people ...

What else ?

Eyh, I just remember that I used your topic on mplayer to make my stereo player. But I havn't find how read a stereo dvd (or blu ray) on Linux ... Do you know how ?
And thank you very much for this topic which helped me very very much !

Magestik
User avatar
Neil
3D Angel Eyes (Moderator)
Posts: 6882
Joined: Wed Dec 31, 1969 6:00 pm
Contact:

Re: Stereoscopy on Linux

Post by Neil »

I should create a special Linux discussion forum. What do you think?

Regards,
Neil
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

What I think ?
-> :woot Very cooool :) It could be nice for all Linux users.
User avatar
iondrive
Sharp Eyed Eagle!
Posts: 367
Joined: Tue Feb 10, 2009 8:13 pm

Re: Stereoscopy on Linux

Post by iondrive »

A Linux forum? Sounds like a good idea. I'm not sure how many of us Linux-heads there are around, but it would be nice to have it in one place.

Magestick,
I have no experience with Blu-ray yet, but if your 3d-dvd is an old field-sequential one, then just read it like in the examples in the mplayer thread. Oh wait, those examples are mostly for windows. For linux, point -dvd-device to the VIDEO_TS directory after you mount the disk, although it might just work without that if you just use dvd://1" onclick="window.open(this.href);return false; (or another number). Check the bottom of the mplayer man page just to be sure. Good examples there.

C'ya
System specs:
OS: 32-bit WinXP Home SP3
CPU: 3.2GHz Athlon 64 X2 6400
RAM: 800MHz 4GB dual channel mode
Video: geForce 8800GTS PCI-e, 640MB ram, driver 196.21
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

ok, thank you. I will try this wenesday.
For Linux forum, it could be useful for Linux user ... S-3D just start, so there is just a small number which know this new technology. And now 3D is difficult to use on Linux because nobody talk about ... and if nobody start to explain how to, the situation won't change. This is why I make 3D software for Linux :wink:
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

I vote for a linux forum too - it will probably be low traffic but it's good to keep all the linux threads together so they don't disappear under the volume of traffic in general discussion.

magestik: i don't know how you would go about getting VRizer to produce interlaced output. It can output anaglyph as one mode. In the other mode you must specify a llist of camera viewpoints and where they are to be output on the screen. This makes it easy to set up left/right and over/ under output but you will need to find another way to turn this output into interlaced. The only way i can think to do it is to define lots of single pixel high output regions (as many as your zalman has lines of resolution) and assign them to the left / right views.

PS PM me if you need a copy of vrizer
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Yeah, thank you Mickeyjaw. I already have a VRizer copy, and I send a mail to the developer to get source code and continue his project. I hope he would accept my proposition.

I'm just thinking about my project. Actually I'm looking for a partnership with anybody for host my project and make a repository for deb package.
If someone have a big server, with a high capacity of storage (many Go) it would be nice to host my web application which work like imageshack but for S-3D images (I dream). Preview here : http://magestik.power-heberg.com/projets/stereo3D/" onclick="window.open(this.href);return false;

I will upload my Stereo Photo Viewer this afternoon (GMT+1). Enjoy.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

UP: I just finished the deb package. You can download it here : http://magestik.power-heberg.com/projet ... 1_i386.deb" onclick="window.open(this.href);return false;
If you don't use Debian/Ubuntu (or other distribution which use deb package) ask me an other package ;)
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

magestik: You need to include the original stereoIMG.py file, not the compiled stereoIMG.pyc or your program will not work on systems with a different python version to you. I am at work right now, so i tried to run it on my linux phone (Nokia N900 running Maemo 5) but it didn't work, bombing out with the error:

Import Error: Bad magic number in /usr/share/Tux-Stereo-Viewer/stereoIMG.pyc

(Yes I realise that a mobile phone doesn't have any real way of displaying 3D content, but I just wanted to play with the UI etc.)

I will try it on my Ubuntu system at home after I finish work tonight. That way I can try various different python versions if neccessary. It would help if you can let me know exactly which version of python you used too.

If you are still having problems with DVDs, then you may want to install libdvdcss from the VLC project. This is needed to overcome the copy protection (CSS) present in copy-protected DVDs. It may be necessary to open the DVD in VLC first, then close it, then open it in mplayer again.

Finally, if you want to have a go at gaming/OpenGL apps on your Zalman, you may also want to try stereoGL. This is a wrapper library (use LD_PRELOAD) to emulate hardware quadbuffer support on interlaced displays. You could try it with Quake2/Quake3 in quad buffer mode and see how you get along.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Right, the pyc file isn't portable at all. I've made a new deb with the py file.
You can download it here : http://magestik.power-heberg.com/projet ... er_0.1.deb" onclick="window.open(this.href);return false;

I've no problem with DVD. I've tested one (a Stargate 2D DVD, just for testing) this morning and this work good.
But I think there is a problem in my command line. I have to do more test tomorrow.

And for StereoGL: it's a library for programming new application or a driver like VRizer ?
And do you know how install it ?

Thank you,

Magestik
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Ok my GTK+ version is too old I think. I tried to run your code and it crashed with these errors:

Code: Select all

mike@mike-desktop:~/Desktop/Tux-Stereo-Viewer$ Tux-Stereo-Viewer 
Traceback (most recent call last):
  File "/usr/share/Tux-Stereo-Viewer/main.py", line 324, in <module>
    GUI(fopen).main()
  File "/usr/share/Tux-Stereo-Viewer/main.py", line 26, in __init__
    self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
gobject.GError: Unhandled tag: 'requires'
So I open up interface-v0.1.glade in a text editor (my version of glade would not open the file) and your glade interface has <requires lib="gtk+" version="2.16"/> near the start.

I have version 2.12.9, so i tried to comment out that line. The program launches, but the menu bar is missing, and the program throws the errors:

Code: Select all

mike@mike-desktop:~/Desktop/Tux-Stereo-Viewer$ ./main.py P6103939.jps 
./main.py:26: GtkWarning: Unknown property: GtkVBox.orientation

  self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
./main.py:26: GtkWarning: Unknown property: GtkMenuItem.label

  self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
./main.py:26: GtkWarning: Unknown property: GtkMenuItem.use-underline

  self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
./main.py:26: GtkWarning: Unknown property: GtkImageMenuItem.label

  self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
./main.py:26: GtkWarning: Unknown property: GtkImageMenuItem.use-underline

  self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
./main.py:26: GtkWarning: Unknown property: GtkImageMenuItem.use-stock

  self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
./main.py:26: GtkWarning: Attempting to add a widget with type GtkMenu to a container of type GtkMenuItem, but the widget is already inside a container of type GtkWindow, the GTK+ FAQ at http://www.gtk.org/faq/ explains how to reparent a widget.
  self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
./main.py:26: GtkWarning: Unknown property: GtkCheckMenuItem.label

  self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
./main.py:26: GtkWarning: Unknown property: GtkCheckMenuItem.use-underline

  self.interface.add_from_file(sys.path[0] + '/interface-v0.1.glade')
Connect

Oh well, i guess i need to upgrade my GTK+ and try again. My distro is quite old (Ubuntu 8.04), so i think the time has come for an apt-get dist-upgrade.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Ok for stereogl, go to http://sourceforge.net/projects/stereogl/files/" onclick="window.open(this.href);return false;

it is a while since i used it, you will have to read the readme i think.

Essentially, it is a wrapper around the opengl library, so will work for existing software. I does not make 2d software support stereoscopic output. Instead, it emulates support for opengl quad buffer mode, for applications which are already stereoscopic, but need a 3d card with quad buffer support. Otherwise, you would need a very expensive Nvidia quadro or ATI FireGL card. If you do not know about OpenGL quad buffer you should search google.

Essentially, you need to build the source, which will produce a library, libStGl.so. First you edit the config file for the desired output method e.g Interlaced. You then run your quad buffer OpenGL with ld_preload like so:

Code: Select all

mike@mike-desktop:~/Desktop/3D/stereogl-0.2/tests/fire_stereo$ LD_PRELOAD=~/Desktop/3D/stereogl-0.2/src/libStGL.so ./fire_stereo


I managed to get it to work with the example code included in the source tarball, but not with any games yet. Apparently ioQuake3 should support quad buffer 3d mode. You need a build with it enabled though, not the standard build from the website. Read http://ioquake3.org/2008/05/04/stereosc ... -ioquake3/ for more info.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

mickeyjaw> thank you very much:
- I've forgotten the GTK+ >= 2.16 in dependencies.
- StereoGL is a little difficult to use ^^
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Ok, I have finished my distribution upgrade, and now have libGTK+ v2.16 installed.

I can run tux stereo viewer and view images ok. The only problem is when I select one of the check boxes on the Affichage menu. For example if i select Affichage...Anaglyphe I get the error:

Code: Select all

Switching to anglyph
Traceback (most recent call last):
  File "/usr/share/Tux-Stereo-Viewer/main.py", line 202, in switch2ana
    self.imode_menu.signal_handler_block(self.idi)
AttributeError: 'gtk.CheckMenuItem' object has no attribute 'signal_handler_block'
And the picture stays interlaced.

If I select Affichage...Oeil Droit/Gauche I don't get an error, just the message switching to right/left eye, however the image does not change.

It is also possible to have interlaced, anaglyph, left and right ticked all at the same time!!

I can however confirm that opening files, viewing them, and all of the toolbar buttons work as expected.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Yes switching Interlaced to Anaglyph by the "Affichage" menu is complicate.
The problem is that all can be ticked at the same time. I tried to resolve the problem and this is why you are an error ;)
I work on it ...
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Hello,

I've just uploaded the new version. The principal news is the support of opening Anaglyph which can be displayed in back and white only (for the moment).
The next release will be pretty cool ;)

http://magestik.fr/projets/stereo3D/Tux ... er_0.1.deb" onclick="window.open(this.href);return false;
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Hey just got a chance to look at this, good work!

I have been trying to teach myself python, so I had a play around with your program and added some code to manage the selection of left/right and interlaced/anaglyph properly. It is probably not the most graceful way to do things, but it works. You should check out my modified main.py which I have gzipped and attached to this post (for some strange reason, phpBB won't let me upload a .py file).
You do not have the required permissions to view the files attached to this post.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Amazing, you did it :woot I've tried but ... no success !
Thank you very much ;)

That's the GNU power !
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Yeah, about that GNU thing, there is no licence/copyright notice anywhere that I found - maybe you should add one?
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Of course, I will add one tomorrow.
New package: http://magestik.fr/projets/stereo3D/Tux ... er_0.1.deb" onclick="window.open(this.href);return false;
Thank you again ;)
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

I am trying now to implement the colour bar method for controlling my e-dimensional dongle (http://magicbox.org.uk/mediawiki/index. ... oured_GIFs), i will upload code for this soon. I also have a question: Swapping left/right eye is unimplemented? This feature would be nice, because some jps files have left eye first, and some have right eye first. Also, can I borrow the logo from the about dialog to use for my wiki?
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Ok, got it working. There is now an option in the Affichage menu to enable/disable the drawing of colour bars at the top of the screen when switching mode to control my e-dimensional dongle. I also changed the look of the options on the affichage menu from a tick box to a radio button. I have changed main.py and the glade interface this time, as well as adding 2 gif files.
You do not have the required permissions to view the files attached to this post.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post by Fredz »

If you want some DDC activation code for recent (NV50) NVIDIA graphics cards, you may have a look here :
http://www.mtbs3d.com/phpBB/viewtopic.php?f=16&t=7691" onclick="window.open(this.href);return false;
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

mickeyjaw> Great for implementation ;) How does it work ? Displaying first image to turn it on, and displaying second to turn it off ?
I thought it was Shutter glasses ? So why Interlaced ?

I'm working on swapping eyes but I need to make a cleaned code. I think we have to separe py file for each rendering mode !

Like that :

Code: Select all

if mode == "ANAGLYPH":
  import anaglyph as rendering
elif mode == "INTERLACED":
  import interlaced as rendering

[ etc... ]

rendering.import(left, right)
rendering.make(x,y,eye)

It would be better to add new rendering mode ... Because there is many special rendering mode like your glasses or other old shutters.
I'm thinking about for a week and I will make it this week-end. Thank you for helping ;)

I want to make a website for hosting the project. But I have no idea about name. I would an english name because it's sounds great and everybody understand english.
Do you have an Idea (name and domain name) ?

Fredz> Sorry I don't understand ... I'm french :mrgreen: Is it for Shutter glasses ?
Last edited by magestik on Thu Mar 25, 2010 4:08 am, edited 1 time in total.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post by Fredz »

Fredz> Sorry I don't understand ... I'm french Is it for Shutter glasses ?
Oui, ça permet d'envoyer le signal DDC à chaque oeil pour les lunettes LCD à obturation (eDimensional, H3D, etc.). Pour l'instant ça ne fonctionne que sur les cartes NVIDIA de génération NV50 (GeForce 8, GeForce 9, GeForce GTX2x0) mais ça devrait pouvoir s'adapter aux autres cartes NVIDIA et peut-être à d'autres marques en cherchant un peu.

In english :
Yes, it can send the DDC signal to each eye for LCD shutter glasses (eDimensional, H3D, etc.). At this time it does only work with NVIDIA NV50 class hardware (GeForce 8, GeForce 9, GeForce GTX2x0) but I think it could be adapted to other cards with a little bit more research.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Cool, tu parles français. J'ai quelques petites questions:
- Est-ce que ça marche avec les Nvidia 3D Vision ?
- Comment ça fonctionne pour afficher les trucs sur l'écran ?

English:
Cool, you speak french. I have a few questions:
- Does it work with Nvidia 3D Vision ?
- How do you display things on the screen ?

I want Tux Stereo Viewer to work with Nvidia 3D Vison. How can I do this ?
I think I will have to use OpenGL.

Mickeyjaw> I've read about eDimensionnal Dongle ! If I understand the dongle is beetween the computer and the screen. The dongle hides lines and close an eye ? Easy for interlaced. And for swapping eyes we have to display an image (normale : http://magicbox.org.uk/mediawiki/images ... rmalon.gif;" onclick="window.open(this.href);return false; reverse: http://magicbox.org.uk/mediawiki/images ... erseon.gif" onclick="window.open(this.href);return false;).

But there is 3 modes for the dongle : interlaced, Vsync and page flipping.
Vsync is easy too, but we have to switch in full screen. The we have to display right to top, and left to bottom.
But, do you have an idea on how add the support for the third mode (page flipping) ? I don't really understand how does it work.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Stereoscopy on Linux

Post by Fredz »

- Does it work with Nvidia 3D Vision ?
Not at this time, since I don't own 3D Vision glasses for testing. But you'll find some code here to activate the glasses : http://www.mtbs3d.com/phpBB/viewtopic.php?f=26&t=3130" onclick="window.open(this.href);return false;
- How do you display things on the screen ?
With OpenGL, you call set_ddc_sda(0) to block one eye after a glXWaitGL/glXSwapBuffers sequence and set_ddc_sda(1) for the other eye after the second sequence. But the results are not convincing yet on NVIDIA hardware, there are quite a lot of missed vertical retraces. It may produce better results on different hardware (ATI, Intel, etc.).
I want Tux Stereo Viewer to work with Nvidia 3D Vison. How can I do this ?
I think I will have to use OpenGL.
OpenGL is one option but you can also use Xv, which is used for most video players under Linux and which is able to synchronize to the vertical retrace.
But, do you have an idea on how add the support for the third mode (page flipping) ? I don't really understand how does it work.
You need to synchronize your drawing with the vertical retrace, for that you need to use Xv or OpenGL as I said. You should have to do the same thing for interlaced and vsync doubling though, or your glasses won't flicker in a continuous way.
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Code: Select all

The dongle hides lines and close an eye ? Easy for interlaced. 
Yes, this is exactly how it works. It is easy, but you loose half the resolution, and half the brightness too.

I want Tux Stereo Viewer to work with Nvidia 3D Vison. How can I do this ?
I think I will have to use OpenGL.
But, do you have an idea on how add the support for the third mode (page flipping) ? I don't really understand how does it work.
I think these are essentialy the same question, as Nvidia 3D Vision glasses are designed to work with page flipped displays. You have to make your program draw the left eye view on all the odd numbered frames and the right eye view on all the even numbered frames. Like Fredz said, you can do this using OpenGL or XVideo. You may also want to look at pygame, which is a set of python bindings for SDL, which in turn wraps OpenGl, framebuffer or DirectX dependent on the OS. If you use pygame, your code is much more likely to work on Windoze and OSX too.

With the e-dimensional dongle you can use the colour bar to set simple page flipping mode. The dongle will then swap which eye is closed on every vertical retrace, which is ok until your program misses a frame, at which point the eyes become wrong. You can also signal the dongle using DDC, like the code Fredz posted. This way your program can tell the dongle exactly which eye to blank, so if you miss a frame you can still keep the glasses and display in sync. The NVidia 3D Vision glasses have no dumb page flipping mode, and must always be told which eye to close over the USB cable. There is source code to a simple windows driver for these glasses written in C so somebody will have to port it, hopefully not me as my C knowledge is very small. I think the user bwheaton has expressed an interest in doing this.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

So, for eDimensionnal there are two easy modes : interlaced and Vsync (displaying top/bottom).

But the third mode (page flipping) is a little more difficult. If I can for eDimmensionnal, I can for Nvidia (with usb comm to add).
But I don't really use OpenGL, so ... it would be difficult ^^ For now I will make a cleaned code :mrgreen:
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Mickeyjaw> If you have a few minutes, can you made 3 new window in Glade with the 3 others images for eDimensional ?
It could be very useful for me because Glade doesn't want to open the new interface ... I'm now on Debian (so Glade is to old) !

What do you think of stereotux.net ? The problem is that limit us (or juste me if you don't want to join the project :P) to stay on Linux ...
I think about stereo3d.com but that's already exists... My domain name is free until 31 march !
mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Stereoscopy on Linux

Post by mickeyjaw »

Ok, so I made a new glade interface like you asked. The new windows are called:

Code: Select all

InterlacedReverseWindow
PageFlipWindow
SyncDoublingWindow
I also added an option for Top/Bottom display on the Affichage menu. The menu item is called top_bottom_menu

I have tarballed the interface up, together with the neccessary GIF files. I didn't change any of the python code this time, as I assume you are still re-writing the code in StereoImg? If you do need me to add code to display the new images and handle the extra menu item let me know, and I will do it.

Also, can I suggest that we start a sourceforge project for this, and point your new domain name there? Let me know if you want me to do this, or if you want to do it yourself.
You do not have the required permissions to view the files attached to this post.
magestik
Two Eyed Hopeful
Posts: 79
Joined: Tue Dec 22, 2009 11:48 am

Re: Stereoscopy on Linux

Post by magestik »

Thank you very much. Yes a sourceforge project can be very utseful. Or Goolge's SVN ?

EDIT: Done -> eDimensional Activation are fully supported ... Just have to make functions which diplay good things :P
Post Reply

Return to “General Discussion”