rafalh / dashfaction

A community patch for the Red Faction (2001) FPS game
https://www.factionfiles.com/ff.php?action=file&id=6252
Mozilla Public License 2.0
61 stars 11 forks source link

Changing FOV via console affects viewmodel #71

Closed id259 closed 3 years ago

id259 commented 3 years ago

Red Faction has two different FOVs - one for viewmodel and one for world. However, in Dash Faction, FOV command affects world FOV and viemodel FOV simultaneously. Is it possible for FOV command to keep viewmodel FOV intact while changing the world FOV?

How it looks now (the FOV is 120 on both images): 1

How it should look: 2

id259 commented 3 years ago

Also, the maximum horizontal FOV of 120 degrees is way too small. It's better not to implement max cap at all since it affects people with 21:9 or triple monitor setups.

UPD: Just found the offset for world FOV in 1.20 NA version: A34CDh

id259 commented 3 years ago

UPD2: I patched the 1.20 NA with FOV value of 110 and launched it through Dash Faction. Widescreen correction applies on top of patched value and gives me overall horizontal FOV of 120 on 16:10 monitor, viewmodel fov is appropriately corrected to be 10 degrees more. However, there are two issues: the FOV reverts back to 100 (90 + 10 degrees corrected) after cutscenes and the vehicle interior still renders at world FOV rather than viemodel FOV.

So, what needs to be done:

  1. The two issues above should be addressed, like they do in Red Faction 2 - Widescreen Fixer for RF2 - it reverts back to chosen FOV after cutscenes and renders vehicle interior with viewmodel FOV.
  2. The FOV command should specify FOV for 4:3 aspect ratio and correct it afterwards (e. g. Half-Life 2 widescreen correction).
rafalh commented 3 years ago
  1. The first person model of gun+arm is called fpgun in RF. I had trouble to understand your term "viewmodel" untill I found out that other games use such name. Don't assume everyone understands terms from CS or HL in RF world...
  2. Your problem with cutscenes is problem of your modification. I don't think Dash Faction has any problem with FOV being incorrect after cutscene. If it is your modification I am not going to support it, sorry.
  3. FOV cap was added to make sure fpgun is not broken (you see end of the model above fov 120). I guess I could allow higher fov for the world and use 120 cap for fpgun only. I could also add fpgun_fov command. But by default I think using world fov for fpgun is okay.
id259 commented 3 years ago

I had trouble to understand your term "viewmodel"

Actually it's a very widespread term which is not limited to Source games.

I could also add fpgun_fov command

That would be nice, it is exactly what I am talking about.

I don't think Dash Faction has any problem with FOV being incorrect after cutscene.

I probably said it wrong. It's not really a problem but a little inconsistency that would be a non-issue if fpgun_fov command will be implemented.

I think using world fov for fpgun is okay.

It's really not. Viewmodels look very visually unappealing past default fov. Model edges, unfinished animations, stuff like that.

Oh, and I once again urge you to use the value given to FOV command as a value for 4:3 aspect ratio and apply any widescreen correction on top of it.

rafalh commented 3 years ago

I probably said it wrong. It's not really a problem but a little inconsistency that would be a non-issue if fpgun_fov command will be implemented.

I don't see what is inconsistent here - you found an offset that does not fully work, it's your changes being unfinished, that's all

It's really not. Viewmodels look very visually unappealing past default fov. Model edges, unfinished animations, stuff like that.

Dash is using the same fov for world and fpgun for years already and noone complained except one person. You would prefer it to be stretched on wide screen? Or maybe you would want "Vert-" scaling? I tried fov 90 and fpgun looks terrible in that fov for wide screen being clipped vertically

Oh, and I once again urge you to use the value given to FOV command as a value for 4:3 aspect ratio and apply any widescreen correction on top of it.

So you want to have fov ~106 after executing fov 90 command on 16:9? Now we have some real inconsistency...

id259 commented 3 years ago

Or maybe you would want "Vert-" scaling?

Of course not. I meant that viewmodel should render with it's default fov (90 hor+) independently from world fov, like pretty much any modern FPS.

So you want to have fov ~106 after executing fov 90 command on 16:9?

Yes! It's a bit of standard for sourceports or games that use horizotal fov to specify fov for 4:3 and apply any widescreen correction afterwards.

rafalh commented 3 years ago

Yes! It's a bit of standard for sourceports or games that use horizotal fov to specify fov for 4:3 and apply any widescreen correction afterwards.

Source?

id259 commented 3 years ago

Source?

From the top of my head: any Doom ports with widescreen support, every port of Build engine games, Quake ports, Quake derivative engines (e. g Call of Duty, Source), games on Thief's engine, Gamebryo engine games (Fallout, The Elder Scrolls series) any game that can be corrected by Flawless Widescreen, Unreal 3-4 engine games (provided they are configured to use Hor+ instead of Vert-, e. g. Borderlands series). Also, you can throw in games that use vertical FOV instead of horizontal (games on Unity engine, games using Cryengine, games on Lithtech engine (e. g. FEAR, No One Lives Forever), Kex engine sourceports.

I can't think of any game that lets the user specify overall horizontal FOV and has a proper widescreen support (such games still use the uncorrected values for zooming, for example Dishonored series).

My point is, user should not specify the overall horizontal FOV, but either a horizontal for 4:3 or a vertical FOV.

Here, I made a small example of what I am talking about:

4:3 aspect ratio. First image has FOV of 75 degrees, the second - the FOV of 100 ![fov75 4by3](https://user-images.githubusercontent.com/78232003/106383401-c7baee80-63d6-11eb-86c4-59335773b25d.png) ![fov100 4by3](https://user-images.githubusercontent.com/78232003/106383405-cee1fc80-63d6-11eb-9a0c-01b3e82276aa.png)
16:9 aspect ratio. First image has FOV of 75 degrees Hor+, the second - the FOV of 100 Hor+ ![fov75 16by9](https://user-images.githubusercontent.com/78232003/106383468-3ef08280-63d7-11eb-8992-d01521a64401.png) ![fov100 16by9](https://user-images.githubusercontent.com/78232003/106383476-4dd73500-63d7-11eb-9f81-0c202f7aa942.png)

Notice how the widescreen correction applies both to world FOV and viewmodel FOV, but changing world FOV has no impact on viewmodel FOV.

nickalreadyinuse commented 3 years ago

With regard to what you're stating about there being a bit of standardization among those titles - this is true to some extent. The vast majority of older FPS games and ports built on these engines are mapping 90 to 106.26 on 16:9 aspect ratio. However, a few newer titles do accept overall hFOV - notably Overwatch (at least on 16:9), Pubg, Diabotical, current Unreal Engine games not built to explicitly do so differently and the newer CoD games from the last few years. Sadly, this stuff is actually anything but broadly standardized outside of source/hl. Valorant for example does some really goofy nonsense.

Still, I expect the trend with regard to modern development will continue to shift away from scaling hFOV based on the 4:3 equivalent because that behavior is actually obfuscating what's going on for most players and simply introduces confusion. 4:3 is also not a widely used aspect ratio in newer games outside of competitive CS. I'm not sure that it makes sense to follow an older convention in this case... especially since RF is not based on a quake or source engine.

The vast majority of players will never adjust their FOV from the autoscaling setting (which is either 90 on 4:3 or 106.26 on 16:9 and hopefully higher on 21:9, etc). If they do, it seems straightforward that the "normal" setting (the one that introduces the least distortion) would display as simply what it is for each aspect ratio.

As for the viewmodel/fpgun stuff, I'd like to see this be configurable as well. I don't really have any preference for what the default behavior should be as I play with gun models off but a handful of people have asked/requested the ability to manipulate this setting to have a more comfortable experience with the game.

rafalh commented 3 years ago

In latest version of the code some problems were resolved:

id259 commented 3 years ago

there are problems with wall peaking

I don't think anyone will be able to fix this. In this case it's probably better to just cap the max FOV at 130-135 degrees (I believe it's the farthest you can go without clipping occurring).

rafalh commented 3 years ago

Actually it happens at much lower FOVs. I can see it at 120 degrees 0207_screen000 It may depend on screen aspect ratio. My is 16:10. It completely stops for me in this spot in warlords at 100 degrees...

rafalh commented 3 years ago

I actually resolved clipping issues by moving near clipping plane. It may cause z-fighting for far object on very far objects but I didn't experience it on 24-bit zbuffer (default in DF) so I think it is fine. I also changed max fov to 160 which should be enough for triple monitor setup.