Changing camera FOV

Blitz3D Forums/Blitz3D Programming/Changing camera FOV

*(Posted 2004) [#1]
Anyone have any ideas on changing the Blitz camera FOV, ATM it seems to give a fish-eye-lens effect to some games (mostly space games). Anyone have any ideas on how to change it?


GfK(Posted 2004) [#2]
CameraZoom Camera,2



Rottbott(Posted 2004) [#3]
A zoom of 1.65 seems about the same as a human eye.


*(Posted 2004) [#4]
Thanks guys, I forgot about the CameraZoom thingy (I thought that was for sniper scopes etc :| ) :).


Ice9(Posted 2004) [#5]
It should be based on your resolution and will vary from monitor to monitor. I have a laptop that is normaly set at 1400x800 when I run 800x600 it will stretch.


Mustang(Posted 2004) [#6]
It should be based on your resolution and will vary from monitor to monitor.


Of course not - FOV has nothing to do with resolutions and monitors. CameraZoom command is really not that easily understud and adjustable, FOV would have been so much better... IMO humans have 60-70 sharpish FOV but most games use 90 deg to compensate human total FOV which is ~120 deg but gets blurry in the extremes (something that is impossible to simulate in 3D-games).

Sswift made this handy function:

http://www.blitzbasic.com/codearcs/codearcs.php?code=676


This simple function sets the horizontal FOV of the specified camera.

Now you can set your camera to have an FOV of exactly 90 degrees for rendering cubic environment maps. Yay!


  
Function SetCameraFOV(Camera, FOV#)
   CameraZoom Camera, 1.0 / Tan(FOV#/2.0)
End Function