Depth of field

Posted By: ChrisB

Depth of field - 10/15/06 23:43

Yet another Depth-of-field demo .

Download

Uses Render2texture and ShaderModel2.0
Have fun.
Posted By: Drew

Re: Depth of field - 10/16/06 00:04

wow, cool! its a shame that this is pro only, i bet only 2% of users have pro... unless Sphere 3 can do something close

looks good!
Posted By: Inestical

Re: Depth of field - 10/16/06 00:04

yes yes.. looks nice. I like it
Posted By: PHeMoX

Re: Depth of field - 10/16/06 01:04

Very nice, it's not exactly similar to what I've made though. I'm still tweaking my depth of field fake. Mine has no scale blur in it though hehehe.
It's no critic, but this is also with a locked focus distance, that's a bit too bad.

Can you get the blur to become even smoother? Now it's quite obvious the objects are getting a 'fur scale blur', not a 2D post-processed blur. I'm sure you'll know what I mean, but here a picture:



Cheers
Posted By: jumpman

Re: Depth of field - 10/16/06 04:53

I think if anything looks wrong with ChrisB's blur, I wouldnt worry because hes increasing the blur just for the demo example. I guess its showing the extremes. Im sure a real game wouldnt have that amount of blur for too long in onscreen time. I like it so far.

Cant use it cause I have com Could you show some more toned down blur scale examples?

Nice Job!
Posted By: Michael_Schwarz

Re: Depth of field - 10/16/06 05:32

that is really nice Chris, i LOVE it... too bad i dont have the Pro version
Posted By: Jered

Re: Depth of field - 10/16/06 07:08

The kind of blur you are demoing ( showing us) could have a nice effect on "being hit" or "knowcked silly" man I wish I had pro! I want so dang badly! Looking great so far Chris, keep us posted on how it goes.

PheMox .. very nice screenshot
Posted By: frazzle

Re: Depth of field - 10/16/06 10:41

Quote:


that is really nice Chris, i LOVE it... too bad i dont have the Pro version





Same problem here Too bad...
The screen looks very pro ChrisB

Cheers

Frazzle
Posted By: ChrisB

Re: Depth of field - 10/16/06 13:03

Thx for the comments.
There is a compiled exe in the download, so you can test it even without pro.

@PhemoX: What do you mean with "locked focus distance". You can change the focus with the slider. It doesn't use a fur shader fake. Your are right it is not a reall 2d postprocessing effect but it does exactly the same, the output is nearly the same.
I can make it smoother but this will slowdown everything .
Posted By: EX Citer

Re: Depth of field - 10/16/06 16:27

its incredible slow on my ati something something 1.6ghz amd sempron. Looks like my depth of field effect with more than one view... I know I know... its a shader.
Posted By: ChrisB

Re: Depth of field - 10/16/06 16:34

Well there are 163k Polys in this small scene and everything gets rendered 4 times.
Posted By: broozar

Re: Depth of field - 10/16/06 17:54

fine, but if it doesn't even render faster than 20 fps on my 2.6 GHz athlon with GF 6800, there's still room for.. improvement. but i have to admit that it's a nice gimmick, especially scrolling through the focus. impressive! but i would instantly turn it off... makes me dizzy somehow, feels like i haven't cleaned my glasses for a long time or looking cross-eyed
Posted By: PHeMoX

Re: Depth of field - 10/16/06 17:55

Quote:

I can make it smoother but this will slowdown everything.




Too bad. As for the locked focus error, I can't explain it that too well, however, look at these images and compare them to your results. Especially look at the shrubs at the right side and how they change 'blur-wise'. I think you can best describe the effect as 'depth smearing', and that's what your effect lacks ..

Photographs:




---


Don't get me wrong, you're getting great results already! It doesn't trully feel like depth of field though, but maybe that's because I'm just a photograph freak,

Cheers
Posted By: Damocles

Re: Depth of field - 10/16/06 19:20

General question: (not as critic of the shaders, rather on the concept)
is a dephtblurr not unrealistic ?

The human Eye can adapt for all dephts, so there is no natural blurr
of depht.
And the computer does not know, if the human focusses on a near or far object.
Posted By: PHeMoX

Re: Depth of field - 10/16/06 19:29

Quote:

And the computer does not know, if the human focusses on a near or far object.




Ahh!! This is exactly what I mean, because we try to emulate the effect, we use a fixed focus, assuming we are focussing on that point, the human eye can adapt it constantly and will. Focus on something nearer and the entire depth of field will change, focus on something further away and again it'll all change bigtime. That's what I meant with 'fixed focus'. The 3 photographs explain how different the effect can be while focussing on 1 and the same point using different focal distances. In real depth of field, these focal distances are not fixed. Focus on something else and it'll change as a whole, not just adding more blur to an object further away, just totally dynamic.

@Damocles: I agree, it's not realistic, it's a lens effect and the depth of field our eyes do have, have a different kind of blur, almost not noticable and very very extremely smooth.

Cheers
Posted By: EX Citer

Re: Depth of field - 10/16/06 19:32

Tiefenunschärfe ist natürlich sinnvoll:
1.) Der Prodzent kann damit den Blick des Benutzers kontrollieren. Schließlich sieht der Spieler durch die Augen einen Characters IM Spiel.
2.) Außerdem erhöht es die Athmosphere. Hmmmm... 2. und 1. sind ziemlich das gleiche...
3.) Drittens haben die meisten Spieler einen zu kleinen Bildschirm, den man braucht damit die natürliche Unschärfe sich auswirken kann. Hat halt nich jeder ne Kinoleinwand Zuhause.
4.) Ist der Bildschirm eine flache Fläche wodurch es garnicht zu Tiefenunschärfe kommen kann egal wie sehr man sich anstrengt, mal abgesehen von einer großen flachen Fläche wie zB ne Kinoleinwand. Das ist aber ziemlich das Gleiche wie drittens.
5.) Wie man gut an den Fotos sieht, ist viel einfacher zu betrachten (weniger anstrengend) und es sieht realistischer aus. Auf Fotos ohne Tiefenunschärfe sieht man nämlich den Hintergrund auch scharf, obwohl man ihn in Natur nicht scharf sehen würde.
Posted By: Damocles

Re: Depth of field - 10/16/06 19:44

It works for video sequencies, and other staged scenes, where
a human cameraman/designer controlls an acted scene,
But in an interactive enviroment, it forces the player to focus on
a certain depth, wich is unnatural.

For the really far distance it can smooth out the backround, but
this should be done for things that are 500 meters away.
Posted By: EX Citer

Re: Depth of field - 10/16/06 19:56

Unsinn. Für einen 3D shooter zum Beispiel, würde ich immer ein Trace gerade aus (wie das Visier) machen, und dann den Focus auf das Scharf stellen was das Visier trifft, bis max 20meter oder so. Das heißt das was Anvisiert wird ist scharf. Außerdem haben viele Spiele lock on functionen, wodurch auch klar ist was Scharf sein muss und was nicht. Dann gibts noch Spiele wo man mit dem Mauszeiger durch die Welt gehen kann, und daran klar machen kann was Scharf und was UNscharf sein muss (point & klick games).
Posted By: ChrisB

Re: Depth of field - 10/16/06 20:00

Myst4 had a depth-of-field effect. The focus was always on the object under your mouse. After a few minutes you didn't noticed it anymore but it add a lots of realism into the scene and it was easier to concentrate on the objects.
Posted By: Damocles

Re: Depth of field - 10/16/06 20:00

Das heisst man muss immer brav alles in die mitte vom Screen drehen um es scharf zu sehen...
Das ist nicht unbedingt angenehm für den Spieler...nur damit der entwickler ja
seine Tiefenunschärfe mit in die Featuresliste reinschreiben kann...
Posted By: EX Citer

Re: Depth of field - 10/16/06 20:06

Freut mich das du es verstanden hast. Wenn was nahe dran ist, ist es auch größer und damit länger im Focus. Was weiter weg ist bewegt sich optisch langsamer und ist damit länger im Focus. Und wenn mal ein Widersacher durch das Visier läuft kann der Focus auch mal ein paar halbe Sekunden länger auf der Distanz des Widersachers bleiben. Ich seh da echt kein Problem. Wenn kurz danach ein Widersacher weiterweg durch Visier läuft wird der natürlich Focusiert.
Posted By: PHeMoX

Re: Depth of field - 10/16/06 20:30

Quote:

Myst4 had a depth-of-field effect. The focus was always on the object under your mouse. After a few minutes you didn't noticed it anymore but it add a lots of realism into the scene and it was easier to concentrate on the objects.




Yes, but that depth of field focus point is hardly noticable in the first place, because it's extremely smooth in transition to the more blurry surrounding.

Cheers
Posted By: Inestical

Re: Depth of field - 10/16/06 20:46

I just red about how we cannot know what we are looking?

just this, the thing that is middle, or near middle, also nearest, or the most middle in the camera is always/mostly the center of viewing. This means, adding dof to represntate the "center" object. just a suggestion though..
Posted By: Samb

Re: Depth of field - 10/17/06 06:59

also nur in zwischensequenzen ist das ändern des focus sinnvoll.
ansonsten sollte man,wenn überhaupt,nur den hintergrund verschwommen anzeigen lassen.
alle nintendo spiele hatten tiefenunschärfe (die sich auch per action replay verstärken und vermindern ließen)

wind waker:

mario kart:


mario sunshine:


vorteil: man kann LOD geschickter verstecken

zelda twilight princess (gleiche engine wie wind waker) verwendet starke tiefenunschärfe für zwischensequenzen, damit der fokus auf den figuren bleibt.


ansonsten gibts halt nur sehr schwachen tiefenunschärfe effekt, wie in den anderen spielen halt:


so viel kann man dazu sagen:
1. tiefenunschärfe für ego shooter ist schwachsinn und unnütz. sowas will wirklich kein spieler
2. bei third person spielen ist es ok. weil da ja eine art "kamera" existiert. daher sind ja auch linsenreflexionen etc. so beliebt
3. es frisst perfomance recht viel perfomance. sollte daher niemals zum "spielinhalt" werden und abschaltbar sein (eben wie bloom und andere effekte
Posted By: Captain_Kiyaku

Re: Depth of field - 10/17/06 07:27

In Kingdom Hearts II haben die es zb nur bei Gesprächen eingesetzt wo man den character fixiert vor der camera sah (der gerade am sprechen ist). Wirkt ziemlich gut in dem moment, auch wenn das Spiel keine realistische Grafik hat (Anime Stil)
Posted By: Machinery_Frank

Re: Depth of field - 10/17/06 07:42

The effect from ChrisB is incredibly slow on my ATI Radeon 9500 (a shader 2 card).

I believe it could run much faster. I played "Beyond Good and Evil" years ago and they already did depth of field in all cut scenes. This looks very intense.
The cut scenes of F.E.A.R. use this technique as well. I think this is a common style to focus on the story elements (e.g. the characters) while displaying them non-interactively.
Posted By: Pappenheimer

Re: Depth of field - 10/17/06 16:49

I think one could use depth of field in shooters too. Even there, there are conventions of "focussing", means pointing at things as usable or movable, normaly by giving them a white or reddish light. Why shouldn't we use depth of field for this?
Posted By: Damocles

Re: Depth of field - 10/17/06 16:54

Depth of field is reducing the optical information on the screen / view,
and why reduce the feedback for the player in a fast egoshooter?
Just to write the feature on the package?

A filmmaker, staging a large battle would try to avoid this depthblurr,
if the scene should show the whole battle, and not just the protagonist
and antagonist in closecombat.

This blur should at least not accur in the range where the player interact with
the enviorment. If it is just for some backroundstuff, it is ok.
But it should not blurr close items and structures then,
and the focus-distance of the blurr should be constant.


Posted By: EX Citer

Re: Depth of field - 10/17/06 17:15

Say what you want damocles. With depth of field your eyes get more relaxed and it looks better. It´s absolute nonsense to show everything sharp. IF the player wants to see something sharp he can focus it and thats more interesting as seeing it sharp in the first second. It´s realy great to do it that way, because games ARE interactive. Movies and picture ARE NOT!

Why you don´t understand it? It´s not like you don´t see anything anymore in the not sharp area. You see something moving and if your itnerested you aim on it to get it sharp. Its totally simple and absolutely like in reality.
Posted By: Pappenheimer

Re: Depth of field - 10/17/06 17:25

Why do I play first person shooters? Because of the atmosphere!

Here a more moderate example, with focussing the thing in the middle, instead of a cross hair (an unnatural convention as well):




Talking of natural versus unnatural means forgetting the high level of artificial conventions, the same problem as with making films.
Why isn't it easy to make films? ...because it is highly artificial what seams sooo natural!
Posted By: PHeMoX

Re: Depth of field - 10/17/06 18:58

We're making games, not movies ... The difference is obvious and lies in the fact that movies do not have interaction in it. '1st person' movies are quite rare, and often they don't feel quite right.

The problem with depth of field is, that it's best when it's hardly noticable. Check the first screenshot I've posted from that xbox game. The depth of field there perhaps adds to the atmosphere, but it's not that noticable ingame, because of the distance and the correct focus range.

The last screenshot posted from ChrisB's depth of field demo shows the overall problem with the effect, the glass statue get's a blur too, eventhough it's well within the focus range judged from the blur in the distance. You can change the sliders what you want, but I couldn't get it right by changing the sliders.

I have to agree with Damocles, it's not a 'must' at all to have DOF in games. It's a neat feature, but only if it works like the screenshot I've posted earlier, barely noticable, because it's extremely smooth.

Btw. don't take any of this as critics, I'm probably just kinda frustrated because I can't get a DOF effect done properly myself hahaha.

Cheers
Posted By: Pappenheimer

Re: Depth of field - 10/17/06 21:45

You didn't get me!

#1 I gave examples of explicitly artificial grafik effects in games, which are already used in many many games!

#2 I mentioned movie making as a related profession, where the audience feel everything seems to be natural ahile it isn't at all. Same in games: it doesn't _have_ to be natural it has to _feel_ somehow natural. I tried to show with the combination of the screenshots a reasonable way to use depth of field in games. Nobody would use it in the extreme form like in that first screen of ChrisB, exept perhaps in dreamlike or drug sequences of a game.
Posted By: PHeMoX

Re: Depth of field - 10/17/06 22:40

Quote:

You didn't get me!




Lol, why am I not suprised? Perhaps this is more a matter of taste anyways.

Take for example Mario kart and mario sunshine, they did a great job .. Both Zelda's is overkill imho.

Your last screenshot, the one with the astray blurred, do you really think it feels 'good'? I think the astray shouldn't be blurred in this case ... The range should be further away. As the second Zelda screenshot showed, indoor depth of field is kinda strange .. too much blur, as if the level designers ran out of time to add some proper details and cover it up by an effect ...

You're right about the 'feel real' thing, except that in this case it doesn't feel more real to me. Things that should be way sharper are simply way to blurry (lol duh ..) ...

Cheers
© 2024 lite-C Forums