Manuel Massing wrote:

Hello David,

I saw few months ago some posts about asymetric frustum for a screen wall.
I got
a similar installation so I will have three displays, each of them with
asymetric frustum (the point of view is not centered on the screens). I
will have these parameters :

LeftScreen_Left_FOV
[...]
RightScreen_Bottom_FOV

Well, as Curt stated already, that depends on how these displays should
be aligned.
Assuming you want to simply combine three coplanar, untilted views (e.g. for a
multi-projector configuration on a single projection screen), and if these
parameters are angles relative to the viewing direction, it should
work as follows:

        -create a symmetric frustum with FOV of
                hor_fov = 2*max(-LeftScreen_Left_FOV, RightScreen_Right_FOV)
                vert_fov = 2*max(-CenterScreen_Top_FOV, 
Center_Screen_Bottom_FOV)
        
        -calculate the viewport coefficients [in range 0..1] by
                LS_l_coeff = 0.5 + 0.5*tan(LS_Left_FOV)/tan(hor_fov)
                LS_r_coeff = 0.5 + 0.5*tan(LS_Right_FOV)/tan(hor_fov)

                LS_t_coeff = 0.5 + 0.5*tan(LS_Top_FOV)/tan(vert_fov)
                LS_b_coeff = 0.5 + 0.5*tan(LS_Bottom_FOV)/tan(vert_fov)

        etc.

These can then be set via the property system, i believe. Curt will surely
be able to enlighten you on this.

That's the basic idea. You specify a larger "virtual" screen that has a symmetric frustum and then each display get's assigned a portion of the larger display. I realize this is probably not an industry standard way to do it, and this approach probably can't cover every possible screen configuration, but I needed something quick a few months ago, and this approach meshed pretty well with the existing code.

I shold point out that there is some subtle wierdness depending on the size of your display so for example, let's say you have 5 forward displays. The center 3 are all parallel so they need to act as a single larger fov display. If you want to assign 30 degrees field of view to each of them, you would naturally pick a 90 degree field of view for the center 3 and give each display 1/3 of that. However, you can't just give the 2 edge displays an symmetric 30 degrees and have them match up. There is some subtle aspect ratio stuff going on there that causes problems. So what you'd need to do is setup the side channels as a 90 degree fov virtual display and give them 1/3rd of that, then they should match up with the center channels.

At some point it would probably make sense to clean up the view pipeline to handle this better, but time and priorities are always the big problem.

Regards,

Curt.

--
Curtis Olson        http://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:        2f585eeea02e2c79d7b1d8c4963bae2d


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to