Subscribe to:

The Kiwi's TaleWitchBlasterDerelict Blow Stuff Up

Widescreen issues in Blitz3D

Remember the bonus graphics controversy from Bioshock, where widescreen gamers were complaining about having "less graphics" than fullscreen gamers? Up until now I have had a similar issue with all of my Blitz3D games.

In Derelict, for instance, this is how it currently looks in fullscreen.

Compare with the widescreen render of the same shot.

As you can plainly see, the image is more or less identical except we've lost the top and bottom. The problem is, by default, the Blitz3D camera is set to always have a horizontal field-of-view of 90 degrees. Therefore, if you widen the aspect ratio without widening the horizontal FOV, the vertical FOV (normally 73.74 degrees) shrinks.

I have partially resolved this problem in the past by shuffling the GUI elements closer to the center of the screen, but asides from making the GUI look squashed, you still lose vertical view without gaining horizontal view.

Fortunately, I discovered it is possible to set the horizontal field of view in Blitz3D. Here is the function I put together for correcting the FOV based on aspect ratio (derived from the work of Blitz programmer Sswift).

 

Function FixCameraFOV(Camera,xres,yres)

 

Local FOV# = (2*ATan(Tan((73.74)/2)*xres/yres))

CameraZoom Camera, 1.0 / Tan(FOV#/2.0)

 

End Function

The result of this can be seen below, and all of the GUI elements are placed exactly as they are in fullscreen. The area outlined in red is the new area that couldn't be seen before.

The horizontal FOV has been flushed out to 100 degrees, not a huge difference but it's good to have a little more peripheral vision without losing any vertical view. Out of curiosity, I decided to simulate having an extended desktop environment with three widescreen monitors. This is the result.

The horizontal FOV has been extended to a whopping 140 degrees, wider than the viewing angle of human vision (120 degrees). Unfortunately this causes some graphical artifacts and fisheye distortion at the edges, but we can see how useful this view would be in a heated combat scenario.

Edit - Just for the record, since the viewport at the end of the view frustrum is a flat rectangle, an almost infinitely wide monitor would have a viewing angle of 179.99999.. degrees. As far as I know it's not possible to render anything behind the camera.

Tags:

Comments

arran4
Offline
Joined: 05/05/2009

Interesting. But not unexpected. I didn't even know there was an issue with Bioshock.. I guess this lets us see a little as to what their development environment is like... Bioshock devs get 17" monitors, apparently.

Earok
Earok's picture
Offline
Joined: 02/06/2009

@Arran there's a better explanation of the Bioshock controversy here. Thats for breaking the chain of spam comments I've been getting btw.

arran4
Offline
Joined: 05/05/2009

Sorry? It won't happen again?

Earok
Earok's picture
Offline
Joined: 02/06/2009

I didn't mean it sarcastically :P