3D Video / Stereoscopic Video

Hello,

I am wanting to create a hybrid 3D live camera video feed combined with some simple animations. The first step would be just getting 3D video to work in Panda.

Suggestions?

Thanks,
Gary

what kind of display hardware do you use, and what 3d-techniques does it use? interlaced? side-by-side signal? top/bottom? blue-line triggered shutter-glasses? two seperate displays? red-blue/cyan?

also what OS are you using? any special drivers (supporting 3d-output via the driver itself)?

It’s a dual projector system running on a dell with linux OS. It uses polarized glasses and corresponding filters on the projectors (pretty sure its red blue).

It will be a little bit before I could get more details on drivers, video card(s), etc…

polarisation uses polarisation ,not colors :slight_smile:. which makes the pictures quite pretty cause you have good color-reproduction and no shuttering-effects. (as long as you dont roll your head)
i once worked with the very same setup. it’s rather easy to handle. depending on how you set up Xorg you can simply make afullscreen window screching across both projectors. and make 2 displayregions. each belongs to one camera with an approriate pupillary distance (like your eyes would have). if you reparent both of those cameras to a dummy-node you can simply move around that one.

if you are in serious need of code i can try and see if there are some lines in my old backups

For the record, Panda3D fully supports stereoscopic rendering natively. I don’t know anything about how to enable that though, but I’m sure it has come up before on the forums.

Yeah polarization.

Thanks sounds good. Old code could be very helpful, I’ve been wanting to do this for months…

Are there docs for getting live camera feeds to display in Panda?

I can’t seem to find anything and all my research has pointed towards opencv as the more plausible alternative, yet I would prefer to work with panda, as I am still getting my feet wet with python and hesitate to move to new platform. |: )

opencv webcam input is integrated into panda. you can directly use this to display a live-video-feed in panda. (thought this very feature is broken in 1.7.0 so you might wanna use the 1.6.3 version of panda). check the showcase corner of the forum and look into the artoolkit demos there.

i’m not terribly sure but i think panda’s internal 3d-options are for more advanced 3d interfaces such as provided by special drivers.like framebuffer stereo etc.

i just checked my old backups. didnt find the thing you’d need. if you try to search the forum for “splitscreen” or “display region” you should find plenty of information.

You can hook up Panda’s native stereo support to a pair of side-by-side DisplayRegions, with code something like this:

dr1.setCamera(base.cam)
dr2.setCamera(base.cam)
dr1.setStereoChannel(Lens.SCLeft)
dr2.setStereoChannel(Lens.SCRight)

This is a little bit better than setting up two different cameras for the left and right eyes, because (a) it allows Panda to optimize the cull traversal for a stereo pair, and (b) it provides the convenient functions Lens.setInterocularDistance() and Lens.setConvergenceDistance() to set the appropriate matrices on the two eyes automatically.

David

I see !!

Some very promising leads. Thanks so much.

Yeah, I use framebuffer stereo in my setup.

Note that “framebuffer stereo” usually refers to a different thing, this is driver support of stereo framebuffers, e.g. with nVidia’s active shutter glasses. When you ask Panda for a stereo framebuffer, it asks the OpenGL driver to enable stereo mode on the framebuffer (which turns on the shutter glasses), and then Panda renders into the “left” and “right” buffers of the same framebuffer, and the driver is responsible for alternating the display of those two buffers, in synchronicity with the shutter glasses.

It sounds like your configuration will be using passive stereo, which does not require special driver support, and won’t require a special stereo framebuffer. It’s a completely different problem.

David

From what I was told the video card in the system I use takes advantage of frame buffer stereo in a passive system, by modifying the video card settings…

Hopping in here with some hopes.

Im using a DLP projector for active stereo3D, and “activating” panda3d’s native support via “framebuffer stereo 1” in the config.prc file only causes a stuttering effect visually. As if the frames are not syncing up with the equipment.

it seems there is some way to “Activate” the rendering and syncing.

With openGL, it seems you import GLUT and call glutEnterGameMode()

is there some equivalent in Panda3d?