Forums

Full Version: Perceived speed and field of view
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
One thing has always bugged me is the perceived speed of the cars in vdrift. The speedo display doesn't match what the player feels. I always feel the car is slower compare to what is shown on the speedo.

Looking through the source code, vdrift is using a field of view of 45 degrees. I've change this to around 60-70 degrees, and it feels much better. Of cause, this is quite subjective. Can anyone help to confirm my finding? (re-compiling of source code is required)
I'd be happy to take a look at it for you - just let me know what line in what file has to be changed. Honestly, I have to agree that mostly there isn't the sensation of speed one would expect. The one place I do get a good sensation of speed is on lemans where the open areas narrow down some.
The change is in main.cpp. Seach for all instances of gluPerspective() function, and change the first parameter from 45.0f to something like 65.0f. One thing to note is this also makes the chase camera seems falling further behind the car.
Wow, I don't like the effect of the increased FOV. It makes things look a bit warped, and the skyboxes seem to dance around in an odd fashion....

However, I think we should add an adjustable FOV to the options screen, since some people like it.
I tried this out, and while it does sort of feel better in a way, it also makes the skybox move too much, which really messes with my head, and would probably make some people nauseous.
Skybox rendering is using a separate fov value. There is a gluPerspective() function call in OBJECTS:Big GrinrawObject() for skybox object, with a fov of 45 degree. I guess change this to the same value as in main.cpp may solve the problem.
Testing with some other tracks I noticed that Jarama doesn't suffer from the nauseating skybox movement as Kyalami and Le Mans do (that's all I tested).

Thinking about this a little more, wouldn't FOV be related to the aspect ratio of the user's screen? I mean a person with a widescreen or 3 monitors together or something will want a wider angle to be able to see more around them, right? So, should we allow the user to change this as an option, or should we just make it automatically calculated from the aspect ratio?
Is your testing done after changing the skybox fov as well?

fov specified in gluPerspective() is the fov in the vertical direction. This is independent of the aspect ratio. In fact, the 2nd parameter of gluPerspective() is the aspect ratio.
rookie1 Wrote:Is your testing done after changing the skybox fov as well?

fov specified in gluPerspective() is the fov in the vertical direction. This is independent of the aspect ratio. In fact, the 2nd parameter of gluPerspective() is the aspect ratio.

My testing was done with just the gluPerspective calls in main.cpp changed, not the ones for the skybox.

I think I understand how gluPerspective works now...it takes care of the wide view on larger screens automatically?
not automatically, but because we specify the aspect ratio based on the display height and width, it is taken care of

if you change the FOV in the skybox drawing code as mentioned, you don't get the odd skybox movement

the reason jarama doesn't have that problem is because they didn't tag the skybox as a skybox object (might want to....)

i still don't like the increased FOV personally, but we should specify it as an option since some people like the fish-eye effect that it causes
joevenzon Wrote:the reason jarama doesn't have that problem is because they didn't tag the skybox as a skybox object (might want to....)

if you do, the hills are too far. i played with it a lot before i decided to have it like this.

--alex--
The fish-eye effect is kind of weird to me too Joe, especially when you're facing towards one of the white lines on the road and it looks curved rather than straight. Is 45 degrees the "right" value for FOV? Also I've noticed that the spinning car in the Practice Game menu is made much smaller and moved over by changing the FOV value. Is there a way to exclude that?
If you provide a way for me to tell if the spinning car is on the screen, I could adjust the FOV back to 45 degrees for that part.

Information about field of view:

http://en.wikipedia.org/wiki/Angle_of_view

The argument passed to gluperspective is the field of view in the y (vertical for VDrift) direction. 45 degrees is close to a 28mm lens. ~38 degrees is a 35mm lens, if you want to try that.
Hmmm, OK, I'll see what I can do to set this up as an option.
FWIW, I am running full screen 1024x640 (ugh, I really need a new video card) with "wide" set on a 20" Cinema display (16:9). It seems just about perfect from what I can tell.

If I set it to extra wide the fish eye effect comes into play and additionally everything appears "squat".

This is with build 1510 (1511?).
Pages: 1 2