Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#941 closed task (fixed)

[PATCH] Experiment with camera FOV

Reported by: Philip Taylor Owned by:
Priority: Should Have Milestone: Alpha 8
Component: Core engine Keywords:
Cc: Patch:

Description

Extracts from #glest IRC:

15:48 <@softcoder> Philip`, i mentioned this before, people don't like the camera view in 0ad
15:48 <@softcoder> if the camera 'felt more 3d' like in glest I think it would make a lot more people happy
15:50 <@softcoder> A number of people have mentioned to me (When i told them to look at 0ad) its isometric
15:51 < Philip`> softcoder: Maybe it's an issue of having a narrow FOV?
15:51 <@softcoder> i think outs is 45
15:51 < Philip`> Ours is 20 degrees, I believe
15:52  * Philip` has no idea why it's that, other than it being what someone picked about eight years ago and then nobody bothered changing it
15:53 < Swyter> FYI: BFME2 uses a 45º camera

Might be good to try changing CGameView::defaultFOV to see if it can make things look better. (Also, move it into the config file so it's easier to experiment.)

Attachments (2)

FOV-controls-09042011.patch (11.6 KB ) - added by historic_bruno 13 years ago.
FOV-improved-11162011.patch (9.0 KB ) - added by historic_bruno 12 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 by michael, 13 years ago

Agreed. A wider FOV would definitely enhance the 3D feel of the game. 45 degrees is something that I think is standard for 3D games. Something greater than 20 degrees, which is what it is now, would definitely help.

comment:2 by historic_bruno, 13 years ago

I played with this a bit, as far as trying a wider FOV and hooking up the config file and some hotkeys (how about Ctrl+MouseWheel and PageUp/Down to increase/decrease the FOV?) Personally I feel the game view is more dramatic at 30-45 degrees. A few bugs I noticed were that the shadows exhibited more obvious "popping" on the edges of the screen and also that the view quad on the minimap got messed up with a higher FOV, I'll look into those.

by historic_bruno, 13 years ago

Attachment: FOV-controls-09042011.patch added

comment:3 by historic_bruno, 13 years ago

Keywords: review added
Milestone: BacklogAlpha 8
Summary: Experiment with camera FOV[PATCH] Experiment with camera FOV

Attaching patch that implements some FOV controls as previously stated, but needing slightly minimap and shadows fix.

comment:4 by historic_bruno, 13 years ago

The interesting thing is that at higher viewing angles, it almost gives a "rounded" feel to the map.

comment:5 by historic_bruno, 13 years ago

Example screenshots comparing FOV angles:

That shows what I mean about a more dramatic view with wider FOV. You can see how flat it looks by comparison with narrow FOV. As a side note, I think we would need to adjust zoom behavior especially initial zoom distance, when applying the patch.

comment:6 by michael, 13 years ago

45 degrees is ideal and does showcase the 3D nature of the game much better than the original 20 degree FOV. 60 degrees is just too much. This will definitely give Alpha 8+ a newer "look" over previous iterations of the game.

comment:7 by Philip Taylor, 12 years ago

Keywords: review removed

From IRC some time ago:

02:00 <@Philip`> I think having controls for changing FOV is bad, because users should never do that, and it's unnecessary complexity just for development purposes (compared to an Engine.SetFOV() in the console or something)

i.e. only add a view.fov in the config file, and don't have all the input stuff in GameView.cpp (since nobody will ever need it). Probably don't even bother with a Engine.SetFOV - it seems we've pretty much agreed on 45 degrees, so we can stick that in the config file and be done.

(This patch might be a good opportunity to move defaultNear and defaultFar into the config file too, for consistency.)

comment:8 by historic_bruno, 12 years ago

Thanks, Philip :) I removed the controls, moved default near and far plane distances into default.cfg, and tweaked initial camera zoom/rotation. I tried to keep the view approximately the same with the new 45 degrees FOV as it was with 20 degrees (without the tweaking, it would zoom too far away and you would see too much empty blackness).

The only thing I don't like is using g_Game->GetView()... in certain parts of the renderer, where it sets camera projections. I'm not sure if there's a better way of doing this.

by historic_bruno, 12 years ago

Attachment: FOV-improved-11162011.patch added

comment:9 by historic_bruno, 12 years ago

Keywords: review added

comment:10 by Philip Taylor, 12 years ago

Looks good :-)

I think the angle limits should be set so that you can't see the horizon (because the sky is ugly, and performance is bad, and it breaks the minimap box, etc). view.rotate.x.min = 28 seems reasonable to me. (It should always be at least > view.fov/2.)

In CRenderer, can you use normalCamera.GetNearPlane() etc instead of g_Game->GetView? (I've not checked that that'll actually work.)

default.cfg should indent comments with spaces, not tabs.

comment:11 by ben, 12 years ago

Resolution: fixed
Status: newclosed

(In [10548]) Moves camera projection settings to default.cfg. Changes field of view (FOV) to 45 degrees per discussion. Fixes #941. Tweaks default camera zoom and rotation accordingly.

comment:12 by historic_bruno, 12 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.