menu Menu

The Secrets of FoV

A word or two on something that should make a few PC players happy...

A word or two on something that should make a few PC players happy...

From the folks at AMD, recently we got a wonderful gift – a brand new ultrawide LG monitor – that turned out to be both a blessing and a curse.

The blessing part is easy. Witchfire looks fantastic in 21:9.

The curse part is obviously a joke but the gift did result in an extra work we put into the way we render our guns. Hopefully, the results of that work should please a lot of PC players.

To understand what that extra work was, let’s talk a bit about FoV (Field of View) first.

FoV is probably the setting that most of the FPS players out there are familiar with: it controls how much you actually see on your monitor and it has an impact on how the players perceive the distance, size, and speed.

We’re modifying the FoV during the game, decreasing it when you aim down sights, which creates the zoom effect, and slightly increasing it while you sprint and dash to give you that feeling of moving quickly. At the same time, (especially large) FoV can deform objects in certain ways and has an impact on the performance as there are more or less objects being drawn on the screen.

FoV 60.
FoV 90. More of the environment is visible/rendered.
FoV 120. Even more things to show and render.

Especially for the latter reason, console games usually lock this setting to make sure the framerate is stable. On PC we usually have the full control over it (within reasonable limits).

How can it deform objects? Well, that’s how:

The biggest deformations happen on the objects closest to the camera – player hand and weapons:

Eww! We definitely want the players to be able to choose the FoV they like most, but we’re not spending hundreds of hours on polishing something that can get broken so easily!

Another problem that arises is the way the weapon looks while the player is aiming. We modify the camera FoV angle by multiplying it so that it’s a relative zoom-in effect. In super-high or super-low FoV scenarios the gun looks bad – too much or too little of it shows up.

ADS in FoV 60. Big gun, no hands.
ADS in FoV 120. Hilariously small gun, too much hands.
ADS in FoV 60, fixed.
ADS in FoV 120, fixed.

Finally, with the player’s ability to choose the position of the crosshair (center or lowered), altering the FOV can totally break the perspective of the gun pointing in the direction of the on-screen crosshair. Your crosshair is on the enemy’s head, but the gun itself might be aiming at the belly.

The solution to all of these issues, i.e. locking the FOV for the gun and player model to a constant value while retaining variable FoV for anything else, is pretty simple on paper and much more complex in reality. It took us some time to get it right.

The first move was that we made a modification to Unreal Engine source code so that we could explicitly choose if we want to render any given model with camera FoV or the custom, locked one. Then, we experimented a little bit and settled on a magic number – 77 degrees – so that Jakub, the animator behind all the guns, could position them and make animations that would end up looking exactly the same in game as they do in his software.

Then we added a little bit of math that would rotate the camera depending on the crosshair’s position on the screen. This makes the gun model’s perspective match the UI (i.e. the crosshair); otherwise, everything would feel a little bit off.

And that’s how it was for the better part of last year, until we got that glorious 21:9 screen and quickly noticed that the rendering of guns is broken.

21:9 but notice the bulky gun and the lack of hands

Not that it was a total disaster, but at the same time we wanted it to be perfect. So I sat down and modified our locked FoV to be vertical instead of horizontal and that fixed the issue once and for all. As it usually happens, this introduced another problem – a misaligned shot while aiming down sights – but we solved that, too. Feel free to ask me on Twitter if you need more details on the actual math behind it all.

Proper 21:9. Gun looks good, hands visible.

In the end, right now we have the full control over how the guns look in the game while being able to offer the beloved Field of View slider and letting you play the way you want, with the complete resolution and FoV freedom:

Question of the Week

We’re sometimes not answering questions because there’s no answer. This is a good example. The answer is: “we don’t know”. The game develops organically. In a way it allows us to make it rather us having a firm control over it.

The ultimate goal is to make a great game, hopefully. If it fits co-op, we’ll go for it. Shooting things with friends is fun. But if it doesn’t, we won’t compromise the single player experience and add features just to tick a checkbox.

For now, it’s simply too early to make the decision on co-op. Will surely be made this year, though.

Previous Next

Witchfire can now be wishlisted on Epic Games Store Wishlist Now
Official website for The Vanishing of Ethan Carter now live! Click here