Sign in to follow this  

MultiScreen Rendering - Perspective Issues

This topic is 2536 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone,

I am rendering my game across 3 screens with a total resolution of 4800 x 900 using ATI Eyefinity. ( using 3 screen arranged linearly)

It renders fine, but the issue is that the objects on the left most screen and the right most screen always appear stretched. ( the object appears stretched and texture is also stretched).


I am currently using the following settings

a. fov of 120 degrees
b. aspect ratio as 4800 / 900 .

When i rotate my camera and view the left side object on the front screen the objects appears fine.

Can anyone please suggest what is the issue with it,

Share this post


Link to post
Share on other sites
That is because you have one linear projection for 3 images. The number of pixels per degree increases on the sides when you zoom out a lot. Render 3 times in different directions and place the screens with angles to make it look right when you turn around.

Share this post


Link to post
Share on other sites
Quote:
Original post by duskndreamz
a. fov of 120 degrees
Just to be entirely explicit here, are you using a vertical fov of 120º, or horizontal fov of 120º?

Because OpenGL and DirectX both use a vertical fov by default, and 120º is a honking great vertical field of view (like looking through a fairly decent zoom-lens). Coupled to an aspect ratio that wide, I would expect quite a lot of distortion toward the edges.

Share this post


Link to post
Share on other sites
Dawoodoz is right. For an 120 degrees of horizontal FOV without distortions, you need three 40 views with 40 degrees each: the left one is rotated around the vertical axis -40 degrees, the middle one points straight, and the right one rotated +40 degrees.

Share this post


Link to post
Share on other sites
Thanks guys for guiding me on the right track.

If 3 different renderings is required, then is the below the right approach.

1. Create 3 viewports
2. Render to each viewport using their corresponding camera lookat and matrices

But won't this approach significantly reduce the performance( i,e, fps) coz now many objects would be rendered multiple times if they are present in more than 1 viewport.

Is there a way out to avoid these multiple renderings??

Share this post


Link to post
Share on other sites
Quote:
Original post by Dawoodoz
That is because you have one linear projection for 3 images. The number of pixels per degree increases on the sides when you zoom out a lot. Render 3 times in different directions and place the screens with angles to make it look right when you turn around.


While searching I have come across Multiple Swap Chains concept.

Is it recommended to use this to render to my scenario.

My current scene had the following viewports
1. One 4800 x 900 for the main screen
1. Three 500 x 100 for 3 mirrors of the cars


Now if i divide the main view into 3 views of 40 degree each, then in all i will have to render 6 views.

I am not sure which is the best way to handle rendering 6 views. Please suggest

Share this post


Link to post
Share on other sites
If the screens are all coplanar in their positions, then a single render target can be used to represent the contents of all three monitors. It is only after changing the orientation that you would need to create separate rendering passes for each one.

The stretching is likely caused by your selection of the projection matrix. For such an extreme aspect ratio you might have to try a few different configurations until you get something that looks correct. Try reducing the FOV to 90 degrees and see if it helps your situation at all.

Share this post


Link to post
Share on other sites
Quote:
Original post by Jason Z
If the screens are all coplanar in their positions, then a single render target can be used to represent the contents of all three monitors. It is only after changing the orientation that you would need to create separate rendering passes for each one.

The stretching is likely caused by your selection of the projection matrix. For such an extreme aspect ratio you might have to try a few different configurations until you get something that looks correct. Try reducing the FOV to 90 degrees and see if it helps your situation at all.



Is there a way to render a single object onto multiple viewports in a singe draw call, or independent draw calls have to be made for each viewport

Share this post


Link to post
Share on other sites
If your using shaders you could use instancing(I think) but rather than sending separate world transforms, send separate view transforms, and use them in your shader to transform the object into the appropriate view space.

Share this post


Link to post
Share on other sites
If you are using D3D 10/11 then you can use the SV_ViewportArrayIndex to send geometry to multiple viewports if you need to. However, I would just render to a single offscreen buffer then copy the relevant portion to each screen area. I haven't used that that particular setup before - is it separate windows for each screen or not? More importantly, is it a single swap buffer for all screens?

Share this post


Link to post
Share on other sites
Quote:
Original post by Jason Z
If you are using D3D 10/11 then you can use the SV_ViewportArrayIndex to send geometry to multiple viewports if you need to. However, I would just render to a single offscreen buffer then copy the relevant portion to each screen area. I haven't used that that particular setup before - is it separate windows for each screen or not? More importantly, is it a single swap buffer for all screens?



I am using directx 9 currently. I am using a single window for the three screens (using ATI Eyefinity).

The issue was that since the resolution i am using is 4800x 900, the sides got strecthed. So i was advised to render the views using 3 view matrix each generated by rotating the lookat direction.

Share this post


Link to post
Share on other sites

This topic is 2536 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this