1

I am writing a real-time, interactive 3D visualization program and at each point in the program, I can compute 2 images (bitmaps) that are meant to look 3D together by means of stereoscopy.

How do I get my program to display the image pairs such that they look 3D on a 3D TV? Is there a platform independent way of accomplishing it? (By platform I mean independent of GPU brand, operating system, 3D TV vendor, etc.) If not, which is preferable-- to lock in by GPU, OS, or 3D TV?

I suppose I need to be using an HDMI 1.4 cable with the 3D TV? HDMI 1.4 can encode stereoscopy via side-by-side method. But how do I send such an encoded signal to the monitor? What kind of libraries do I use for this sort of thing? Windows DirectShow?

If DirectShow is correct, is there a cross platform equivalent available?

If anyone asks, yes I have seen this question: Generating 3D TV stereoscopic output programmatically.

However, correct me if I am wrong, it does not appear to be what I'm looking for. I do not have an OpenGL or Direct3D program that generates polygons, for which a Nvidia card can do ad-hoc impromptu stereoscopy simply by rendering the scene from 2 slightly offset points of view and then displaying those 2 images on the monitor-- my program already has those image pairs and needs to display them (and they are not the result of rendering polygons).

Btw, I have never done any major multimedia programming before and know very little about HDMI, Direct Show, 3D TVs, etc so pardon me if any parts of this question did not make any sense at all.

Community
  • 1
  • 1
artif
  • 907
  • 1
  • 7
  • 12

1 Answers1

1

So it turned out to be (relatively) easy.

It seems the easiest way to get the stereo image pairs to show up in 3D is to enable fullscreen mode, display the stereo images side by side, and manually set the 3D TV to use side-by-side 3D encoding. Note that you may have to do some re-positioning and/or scaling to get the left/right images to line up correctly and show up with proper aspect ratio.

This method should be independent of OS and GPU I think. You would just have to pick any cross-platform library that is capable of displaying images very quickly in succession on the screen. I used OpenGL. I have no clue if this is an abuse of OpenGL and DirectShow is the right tool. But I looked at the DirectShow SDK examples and could not really make heads or tails of them (I have virtually no experience with Win32/64 API which I think is what is used in the examples.) Also DirectShow is not cross-platform so meh.

What I did was I had a paintGL() function that was called at a certain rate by a timer and each call computes a left and right image, displaying both side-by-side, doing some positioning and scaling to fit the screen appropriately. Long story short, it's not very hard to create platform-independent 3D output so long as you're willing to use a simple encoding like side-by-side and let the 3D TV handle the rest.

Side note, while looking around I also discovered that OpenGL had the foresight to include an interface for stereoscopic content. Apparently OpenGL supports quadbuffering (double buffered stereoscopy). See http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffer.xml for a function to switch between the 4 buffers. I didn't end up using it (and thus cannot vouch that it is appropriate for the specific task I describe in my question above) and my understanding is that it requires special graphics card support. But I put the link here in case it's useful to anyone.

artif
  • 907
  • 1
  • 7
  • 12
  • What about devices that ONLY support 1.4a video, or if you need it to auto-sense the correct format? I'd like to do this with one of my applications but do not see an easy way to do so. – bparker Aug 11 '11 at 21:07