Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Is there any resource location on how to view a 3D scene from an application or a game on multiple windows or monitors? Each window should continue drawing from where the neighbouring one left off (in the end, the result should be a mosaic of the scene). enter image description here My idea is to use a camera for each window and have a reference position and orientation for a meta-camera object that is used to correctly offset the other cameras (e.g. like in the above figure where the render targets of the two cameras reproduce the star when stitched together). Since there are quite some elements to consider (window specs, viewport properties, position-orientation of each render camera), what is the correct way to update the individual cameras considering the position and orientation of the central, meta-camera? I currently cannot make the cameras present the scene contiguously (and I am reluctant in working out the transformations without checking whether this is the actual way of doing things).

share|improve this question
    
Would this recent answer be useful? gamedev.stackexchange.com/a/34957/11844 –  Eric Aug 28 '12 at 10:26
    
Yes and no: it confirms that multiple cameras are to be used, but gives no hints on what the actual steps of updating such a CAVE system containing multiple cameras should be (how the cameras are positioned and oriented w.r.t. to each window's properties (fov, viewport settings, etc.) ). Perhaps I have to derive the equations by hand and then see whether they're complicated or kind of easy to understand (relative transformations are easy, but viewport computations are not my strong point currently, hence my question in this form). –  teodron Aug 28 '12 at 11:04
    
I'm currently applying that kind of transform without use of many cameras and by using a single render target, which is then rendered using the corresponding area of the texture for each monitor. –  Pablo Ariel Jul 15 '13 at 12:47
    
@PabloAriel, and don't you experience any inconveniences, such as distortions or artifacts and even poorer performance due to the large size of your RT and the unusual FOV of the camera? How would you go about rendering a more than 150 degree view using one camera and one RT? –  teodron Jul 15 '13 at 12:58
    
It depends. In general this isn't much of an issue unless the dpi of the screens differs too much. I can't say much more because I didn't work much more on this yet, so probably for a wide angle like that I would use more textures, I still have to try but if you want I can let you know the results as I'll be working a lot with multiple render targets these days. –  Pablo Ariel Jul 15 '13 at 14:12
show 1 more comment

2 Answers

up vote 2 down vote accepted

I've thought about doing this myself, so here are some of my thoughts

If you're lucky, you can get a good part of the information you need from the EDID data of the screens, such as supported resolutions and physical dimensions (and hence aspect ratio). On linux read-edid and parse-edid will work just fine, provided the video driver is being nice.

Unless the screens used are in a fixed, known setup, you will need user input though.

So personally, I would avoid AMD's Eyefinity or nvidia's Surround because they impose restrictions on what you can do.

Surround for example will only let you use screens if they support a common resolution, refresh rate and sync polarity. Eyefinity is not that strict, but different size screens of the same resolution will show the rendered image at different scales.

If you were to roll your own, there is no reason you couldn't support arbitrary mixed resolutions, display sizes, orientations, and screen setups.

Let the user specify how the screens are arranged (relative position, rotation; portrait/landscape, bezel width), and if you can't acquire the EDID of a screen automatically, also maximum resolution and screen size (diagonal) in inches.

That gives you the basic properties you need to set up the individual cameras/their projection matrices.

Now choose or let the user choose a "center" screen, this will be your camera pointing straight forward. The other screens' positions and rotations should relative to this one.

To move your entire camera setup through the world, first apply the relative translation and rotation to the two other cameras, then apply the center camera's translation and rotation to all three. This will keep your peripheral cameras in the same relative position as your center camera moves.

Now, usually you might just use the render target's resolution to set up the camera's screen size in the world. However, if instead you make the virtual size proportional to the individual screen's physical dimensions, content will appear at the same size on each screen, accounting for different pixel densities.

To make the user input easier, I suppose you could have 3D representations of the screens and let the user manipulate their properties directly, or relative to each other. (for example, allow "hinging" the secondary screens to the center one, to make adjusting the rotation easy while maintaining the aligned bezels).

Edit: As for the FOV, depending on if you use horizontal or vertical (or both, or diagonal) FOV, a screen with a wider physical size should have a proportionally wider FOV.

If you also let the user specify a rough position from which they will be viewing, this eliminates guessing though and you can just calculate the viewing angles and hence FOV for each screen from that.

share|improve this answer
    
Nice answer, thanks. I guess there are two options: 360 view where the cameras have a common center and "wide" where the cameras are parallel to each other (sharing a translation line). –  teodron Aug 28 '12 at 16:03
    
I suppose so, yeah. With more than two screens though there doesn't have to be a single point that gives you a perpendicular view of each screen. Ideally the user would have it set up like that, or close, but you may or may not want to allow a 3rd scenario where there is neither a common center nor are all screens aligned to a plane in your virtual representation –  melak47 Aug 28 '12 at 16:13
add comment

There are different technologies for this, there is no standard, at least no one that i'm aware of.

The multi-monitor technology from ATI is named eyefinity and it's probably the most mature technology among the ones available on the market.

The eyefinity capabilities are accessible through the AMD display library SDK .

Nvidia calls its multi-monitor technology nVidia Surround and there are little to none informations for the developers, there is this page that mix the surround technology with the 3D technology and i don't think that is useful at all. If you are interested in this you can try to browser and ask in the Developer Zone.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.