Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: WMCoolmon on March 11, 2005, 12:56:10 am

Title: Setting your fov
Post by: WMCoolmon on March 11, 2005, 12:56:10 am
This is fairly long, as it's written with the wiki in mind. But atm the wiki is glitchy, so I'm posting it here.

Intro:
The 'field of view' in a game controls how much of an area in the game space you can see. With the -fov parameter, you can actually set this paramter to see more or less  of the area.

This is sort of akin to the width of a window; if you stand and look out one window, then go to another, wider, window and stand the same distance away, you'll be able to see a wider area with the wider area.

Note that field of view is dependant on your distance from the object as well; if you've ever seen a sequence in a movie or TV show where the background seemed to zoom in or out, while characters remained the same size, the same principal applies

Freespace 2:
The field of view in Freepsace 2 is actually set incorrectly to make things appear to scale. It's actually set too large. This is on purpose; by doing this, Volition wanted to make the game easier and more fun to play. Humans have a field of view of about 135 degrees; but most people don't play with their face pressed up against the screen, so their fov is restricted by how much area the computer screen takes up. (See attached diagram)

Figuring out your FOV setting:
Figuring out what your FOV setting should be depends on two factors; the width of your monitor, and how far away your face is from it. You'll probably want a ruler of some sort (The kind you measure with, not royalty or GWB). If you're thinking you can cheat because you know the size of your monitor, think again - the size of a monitor is its measurement diagonally, not its width or height.

Once you've figured out how far away you sit from your monitor, and how wide it is, you'll need to do a little math. Go to this site (http://qonos.princeton.edu/nbond/calculator.php) and enter the following (Replacing "monitor width" and "your distance" as appropriate):
Code: [Select]
atan((monitor width/2)/your distance)*2

Now, add the result after "-fov" in the custom flags field of the launcher. For example, "-fov .1786". Start up a mission in Freespace and you should instantly notice the difference. :D You might want to tweak the value some, as it can be a bit uncomfortable to play with a small FOV.
Title: Setting your fov
Post by: Col. Fishguts on March 11, 2005, 02:58:32 am
Well explained :yes:
Title: Setting your fov
Post by: Grug on March 11, 2005, 04:16:41 am
But in what units? inches and cm's? :)
Title: Setting your fov
Post by: WMCoolmon on March 11, 2005, 04:14:14 am
It doesn't matter, as long as you're consistent. Tangent takes that ration and makes it radians, which measure rotation amount rather than distance.

If you were reasonably accurate you could measure both in terms of fractions of your pet's tongue. :p
Title: Setting your fov
Post by: Grug on March 11, 2005, 04:19:03 am
Ah so they both have to be the same unit?

Kewl thanks.

Mind reader again I see... :p
Title: Setting your fov
Post by: Deepblue on March 11, 2005, 09:26:11 am
I personally think the game is cool with 0.89 fov cause it makes everything look faster...
Title: Setting your fov
Post by: Ypoknons on March 11, 2005, 09:44:41 am
PS If you're using your own calculator SCP's fov is in radians, not degrees. Dop! :)
Title: Setting your fov
Post by: Turambar on March 11, 2005, 10:02:28 am
now we ought to fix the bug that cuts off the orb radar at lower fov's, cause that gets annoying
Title: Setting your fov
Post by: Flaser on March 11, 2005, 10:44:53 am
If only we had true freelook + in-game fov setting...(hint,hint :D ).

That would be a godsend for cockpits and would make dogfight easier.
(too much exporuse to LOMAC - I wanted to constantly check six in I-War2 and it didn't let me!)

How much work would the in-game implementation be WMC?
...the freelook?
Title: Setting your fov
Post by: phreak on March 11, 2005, 11:41:49 am
Quote
Originally posted by Turambar
now we ought to fix the bug that cuts off the orb radar at lower fov's, cause that gets annoying



ok thanks for letting me know.
Title: Setting your fov
Post by: Turambar on March 11, 2005, 01:53:29 pm
the cut off edges

(http://img221.exs.cx/img221/318/screen048na.jpg)
Title: Setting your fov
Post by: Goober5000 on March 11, 2005, 03:56:06 pm
I always wondered about this.  Thanks, WMC. :)
Title: Setting your fov
Post by: WMCoolmon on March 11, 2005, 05:28:56 pm
Quote
Originally posted by Flaser
How much work would the in-game implementation be WMC?
...the freelook?


I started on some code for the padlock thingy (hold down a button and it tracks your curret target) but I remember there was some problem I had with world orientation -> model orientation - or maybe eyepoint position with model orientation.  I should really take another look at it since it's half-implemented in CVS.

You should be able to check your six with the current padlock views though, assuming there's nothing in the way. And you can hold down 0 on the numpad to 'look around', IIRC.
Title: Setting your fov
Post by: Deepblue on March 11, 2005, 05:32:56 pm
Can you make a way for the padlock view to track enemies?
Title: Setting your fov
Post by: Flaser on March 11, 2005, 09:37:58 pm
What I would find handy would be being able to look around 360 degrees like I can with the numped ins/0 but without having to hold down the button.

To tell the truth I want/would like a system like the one in Lock On - it made aquiring targets visually seamless, and setable fov transformed the cockpit into a dependable instrument instead a mere graphics.
Title: Setting your fov
Post by: phreak on March 11, 2005, 11:57:20 pm
Quote
Originally posted by Turambar
the cut off edges

(http://img221.exs.cx/img221/318/screen048na.jpg)


fixed... hopefully

i need an orb model
Title: Setting your fov
Post by: Deepblue on March 12, 2005, 01:09:04 am
Can you take .max?
Title: Setting your fov
Post by: phreak on March 12, 2005, 10:54:46 am
no.  i only have TS, and i avoid using that like the plague
Title: Setting your fov
Post by: Grug on March 13, 2005, 04:02:56 am
mmmm plague...
Try the Babylon projects one?

btw, what's the optimal average FOV?
Title: Setting your fov
Post by: Flaser on March 13, 2005, 09:30:00 am
Read the first post and get your ruler ready to get the realistic reading.
...then experiment what gives you the best eperience/immersion.
Title: Setting your fov
Post by: quadrophoeniX on March 13, 2005, 11:26:39 am
so what exactly is the generic FOV? depending for which setup I do the calc I'll end up with values ranging from .6 to .7. Also, is that FOV calc also suited for widescreen non-standard resolutions or suited only for 4:3 / 5:4 aspect ratios? I think the latter because otherwise there would have to be dedicated values for hor. and vert., right?

Hey antohter idea just came to my mind. Looking over the explanation with that "window" part, I recallede having seen a threade about headtracking devices. So IF there comes support for padlock how would dynamic FOV sound? It would enable you to move forth and back in the cockpit (getting closer to the canopy) and the FOV would alter - this could also be used for a "zoom mode" with sniper missions, dive bombing etc.
Title: Setting your fov
Post by: Flaser on March 13, 2005, 01:05:46 pm
Hmm...that's pretty much the reason why I asked if in game fov change would be possible.

quadrophoeniX put it better though.
Title: Re: Setting your fov
Post by: Don-DiZzLe on August 06, 2006, 12:23:05 pm
I have a 17 inch monitor and my distance from the monitor is about 50 cm

The math thingy would be "atan((17/2)/50)*2" then, so is this correct?

EDIT: Nevermind I should've read through this thread first.
Title: Re: Setting your fov
Post by: Gregster2k on August 06, 2006, 04:05:13 pm
Don Dizzle:
While on the one hand I'd say holy thread ressurection batman, on the other hand, this is a useful thread and i wish it were stickied. :3
Title: Re: Setting your fov
Post by: karajorma on August 07, 2006, 04:57:47 am
It shouldn't be stickied. It should be in the wiki.

For all I know it already is in fact :)
Title: Re: Setting your fov
Post by: Mars on August 07, 2006, 06:55:36 pm
It isn't, but Gregster2k can add it if he feels the need :p

I tried this formula, and IMHO fov changes require LOD change changes in order to looks halfway descent, so there's really no point unless you feel like doing a lot of work, in which case you can look this up yourself.
Title: Re: Setting your fov
Post by: ARSPR on August 08, 2006, 09:56:29 am
The info about FOV is great but please, take notice about the bug that missaligns reticles (Mantis 83) (http://lore.maxgaming.net/~scp/mantis/bug_view_advanced_page.php?bug_id=0000083). Wherever you put some info about FOV and -fov flag, please add a warning about this bug or a lot of people is going to become mad.
Title: Re: Setting your fov
Post by: Chris B. Yond on August 08, 2006, 10:04:03 am
It isn't, but Gregster2k can add it if he feels the need :p

I tried this formula, and IMHO fov changes require LOD change changes in order to looks halfway descent

I can't see any difference in the ships details with my smaller FOV :wtf: