Dec 18, 2017

Rants

What is...

Software

Search

Why Depth Of Field Is Wrong

What's depth of field?

First, let me clarify that I refer to depth of field (DoF) as shader effect in computer games. Not the optical effect itself.

Now, depth of field in a computer means that everything in the distance is blurred out. Take a look at this screenshot taken from Gothic 3:

It has not been altered in any way. No enlargement, no filters, no lossy codec. It's just a 400x300 piece cut from a larger screenshot. Yet still you can clearly see that you can't see clearly. ;)

The trees in the background are blurry and difficult to make out. Even the one in the foreground lacks sharpness.

That's depth of field. You can find it in many modern computer games. Maybe the intensity varies but the effect itself is in widespread use. Only a few developers have enough sense not to implement it.

Why is it wrong?

Because the effect simulates something that you do not experience in real life. Unless you have myopia or similar problems with your eyes, in which case you should go to a doctor to have that fixed (usually with glasses).

When you look at something in the real world, there is only one lens involved. That's the one in your eyeball. And it is flexible, with muscles attached to it that stretch and bulge it so that whatever you look at is properly focussed.

No matter how close or how far away something is, your eye adapts and shows it sharply.

But people claim it's realistic!

It's not. Not really, anyway. You have that effect in photography and movies. Because there, two lenses are involved. There's still the one in your eyeball and then there is the one in the camera. The latter one has the problem that it cannot know on which part of the scene you are currently looking at. It cannot focus on what you want it to focus. So instead, it focusses on what the man behind the camera wants it to focus. The image that your eyes look at is already a 2D projection by the camera.

People who think that DoF in games is realistic seem to watch too many movies. DoF is an effect which cannot be completely avoided in conventional camera system. In 3D movies, they try to minimize it because it interferes with the 3D effect. As it does if you play computer games in 3D (like with NVidia 3Dvision).

But even without a 3D display, there is no real lens in a computer game and thus, none of the limitation of such an optical device apply. The game can theoretically render everything sharp, near objects as well as far objects. And that would simulate real life. Of course, the lens in your eye cannot focus on everything at once. Look at your monitor and the wall behind it becomes blurry. Look at the wall and the monitor is blurry. But: Whatever you really look at is sharp. And that's the effect we have when ban DoF from computer games. You can look at the trees in the background and they're sharp. You can look at the barrel in the foreground and it's sharp.

That's realistic.

But objects in the distance are difficult to make out - DoF must be realistic!

Not in the way you mean. Because there are two completely different effects involved.

When you look at a tree that is close to you, you can see each individual leaf and even the smallest branches. The farther you walk away, the more details get lost. You cannot make out the leaves but only see a greenish structure. But: The silhouette of the tree itself is still sharp. It does not get blurry.

How comes?

This is a result of something different. DoF has something to do with the way that the light rays travel through lenses. This other effect however is a result of the resolution capability of your retina. You may know that digital cameras also have a resolution (like 8 megapixels, for instance). Your eye also has something like that. There are cells on your retina have a certain size and receptivity and that determines how much detail can be resolved. Under best circumstances, the human eye has a resolution of about one arc second. Anything smaller than that gets lost in the surrounding structure. And since objects appear smaller the farther they are away, anything you see will sooner or later be too small to be recognised.

BTW: No, the picture is not to scale.

Let me repeat that this effect has nothing to do with DoF. Hence, DoF cannot simulate it.

Artistic reasons for DoF

Sometimes, a photographer experiments with sharpness and blurriness, plays with depth of field to achieve certain effects or to direct the viewer's attention to where he wants it.

While this is a valid approach in 2D photography and 2D movies, I think it is wrong in computer games. When I walk through a game world, I want to decide for myself which parts deserve my attention. The game cannot know what I am currently interested in. It can use DoF to force my attention somewhere but that might not be what I want. Perhaps I want to enjoy the view over a valley or look for landmarks to orientate myself properly. And then I want to see them. As good as naturally possible.

An exception might be cutscenes and/or dialogues, in which the player has no control over his character. This is more like a movie and might justify the use of DoF for artistic reasons.

Still, the very moment the player uses a 3D display, DoF will cause him headaches because it interferes with 3D effect. So even there, it would be better not to use DoF.

Why is DoF used if it's wrong?

Good question. Perhaps because some developers think that if they simulate cinematic errors like DoF (or lensflare, as another example) it will look more like a movie. And that this will somehow magically enhance the player's experience. I doubt it because computer games are no movies. Just as movies are no books and nobody would make a dog-ear in the corner of a movie scene only to make the movie more book-like. Similarly, no sane developer would make a microphone dangling from above into the picture just because you see that on TV sometimes (like here). Why DoF (or lensflare) would be any better escapes me.

Which leads to the other possible explanation. It is used to hide the ugliness of the world. Modern games try to look good but they cannot look good everywhere. So they show rich details in the front and reduce details in the background. It's called LOD: level of detail. And the worse LOD makes the background, the greater the temptation to hide that misery with some blurriness. It also saves memory (who needs highres textures when you've got a DoF effect?) and that's a scarce resource on the console. To which any game nowadays must be ported - or so goes the legend.

Optional DoF = everything's fine?

There are people who just like DoF. They don't have any real reasons, it just "looks cool". And if you can turn the DoF effect off in the game's settings, then everything is fine. Right?

No, sadly not! It would be alright were it not for the fact that DoF is often used to hide the fact that distant land is very low detailed. So when you turn the DoF off, it just makes you see the misery it was supposed to hide. It does not give you a better visibility range. On the other hand, if you have a good looking background that is rich in detail, why would you want to hide it behind a curtain of blurriness? DoF makes no sense there.

Wouldn't it be better to make the world more consistent and reduce the difference in detail between foreground and background? Why smite the player with details in the foreground and then have barren, empty - and possible blurry - world in the background. Is that really a good way to present a game?

I think not. I would gladly trade some detail in the foreground to get a rich view of the distant landscape. Because that's important, too.

So usually, when I start a game and see that DoF is enabled by default, I sigh. Because I know that even if I can disable it, I will not get a world looking as good as it could if the game had been developed without that DoF-loophole right from the start.

Conclusion

Please, dear developers! Stop using effects like depth of field or lensflare. They are not realistic, they cause trouble with 3D displays, they make your worlds look like crap. I'm sure your level designer are good at their job, so why not show it? Make a world where every part (even if it is a few metres away) has the same level of detail. If you have to reduce detail for the console, let the problems of the console remain on the console.

Thank you.

Page Actions

Recent Changes

Group & Page

Back Links