Using dual projectors?

Is there any code that will allow Panda3D to project the same image in two different projectors, essentially creating a 3D image viewable with 3D glasses?

hi, and welcome to panda3d

panda has a number of stereoscopic camera options already. i dunno if dual-display (side-by-side) is amongst then ( it propably is). in worst case you have to set up 2 cameras and 2 display regions. but that isn’t difficult.

check out those threads

discourse.panda3d.org/viewtopic … +rendering
discourse.panda3d.org/viewtopic … +rendering

Note that you don’t actually want the same image on two different projectors if your goal is to make a 3D image. You want two very similar images that are slightly offset from each other.

As Thomas says, Panda can do this easily, and the linked threads will give you a starting point. But actually hooking up the two projectors to your computer, and configuring your driver to render to them, is up to you.

David

Sorry if I’m being persistent, but, given that I do have two projectors hooked up in the PC, with TWO graphic cards operating (probably nVidia’s with SLI, not my PC), what do I need to do in order to make each projector display a different (“slightly offset”) image?

(for the history, I did read the threads Thomas linked, but I did not really get what to do.)

PS: I have never programmed before, I just learnt about panda3d, but I participate in a project at my university, regarding stereoscopic virtual reality worlds, and I was assigned to find a way to enable dual output in P3D

I haven’t played with SLI myself. I guess you have one extended desktop that spans both projectors? If so, you can open a single “undecorated” window, large enough to cover both desktops. Then create a DisplayRegion on the left, for the left eye, and a DisplayRegion on the right, for the right eye.

Note that there is nothing special to do to “enable dual output” in this case. This problem has already been solved by nVidia. SLI is doing the work for you, by making the two cards appear to be one card.

You still need to understand how to use Panda3D in general, of course. If you have no prior experience with programming, using Panda3D may be a challenge for you. People do use Panda3D without programming experience, but it means you have to learn something about programming as you go. If you can follow the examples in the tutorial, it’s a good sign.

David

Meh.

I tried adding the code snippets in the source code of the samples.

I added all of them in one;
Some combinations of them as provided in posts;
Some combinations of them that seemed rational;

Still no result. :imp:

Even when I adjust the nVidia card to display a cloned output, it doesn’t display stereoscopic. It seems as if Panda TRIES not to enable stereoscopic :unamused:

Can somebody pick a random sample (eg Tunnel or Ralph or Gripping) and tell me exactly which code to add, and where?

[size=59](PS: Do not think I am a n00b that wants everything ready for him. I just want a result for something I didn’t really choose to do, because it’s not my field of expertise)[/size]

There are two ways to go about stereo rendering:

(1) Let your driver handle distributing the left and right eyes to each display. This means your two projectors need to be connected your graphics card in a way that it understands which one is left and which one is right. I have no idea whether this is possible with nVidia graphics cards; you’ll have to research that yourself. But if you get the hardware configured correctly, then you only need to put:

framebuffer-stereo 1

in your Config.prc file, and Panda will ask the driver to enable stereo mode, and send it the left and right eyes. Then it’s up to the driver to do the rest.

(2) Explicitly manage the left and right eyes and ensure each one gets to the correct display. This means your driver doesn’t have to know that it’s doing stereo at all; you’re just rendering the two images and sending them to two different projectors. It doesn’t know that you have each projector passed through a polarizing filter or whatever you actually have. (You do have some kind of system to send the output of each projector only to the appropriate eye, right?)

In order to make this work, you will need to create a pair of DisplayRegions, one for each eye, and use dr.setStereoChannel(Lens.SCLeft) on one, and Lens.SCRight on the other. Then set the same camera for both DisplayRegions and you’re good to go. Of course you will have to write the Python code to set this up, because Panda has no idea how your projectors are configured.

David

OK so somehow, I don’t know how, there are 2 windows rendering the same image with a slight offset, which is what I want practically.

Now my problem is, the “right” and the “left” windows are on the same “screen” (each projector is supposed to show only half of the desktop) and I have to move it manually to the next screen, and also position it so that I can see 3D.

So what code do I need for the “right” window to be positioned automatically at the next screen with an offset of…say 50px?

Answered in the other thread you started. We all read all the posts here, so there’s no need to double-post. :slight_smile:

David