Help - Search - Members - Calendar
Full Version: Depth Of Field Effect
Game Maker Community > Games > Game Maker Creations > Tools & Applications
OpticalLiam
Depth Of Field | Effect



Download: Mirror 1 (Working)
Download: Mirror 2

This is a little example that attempts to emulate the Depth of Field effect you may have seen in games such as Crysis. Depth of field is about how the eyes focus and how things become blurry depending on how far away they are and where you are focusing, this example trys to replicate that in a 2D environment. Fairly useless, but pretty damn cool.

Enjoy.
BrainWare
Nice work Opticalliam =)
It's really pretty, I don't think I have a use for it tho.

Keep up the good work.
Pie Person!
Iv'e been thinking about doing almost the same effect you did but in 3D for a while. Anyway- atleast you got it done in 2D!
9_6
Not exactly depth, more like a blur with a ring-shaped area that looks sharp.
Dof would be if only the treetips would be sharp, everything else blurred or the other way around.
You know, depending on how far an object 'sticks out' to the player.
You could even use the depth variable for that.
tobi
Well depth of field or not, i looks great smile.gif
OpticalLiam
QUOTE (9_6 @ May 5 2007, 04:37 PM)
Not exactly depth, more like a blur with a ring-shaped area that looks sharp.
Dof would be if only the treetips would be sharp, everything else blurred or the other way around.
You know, depending on how far an object 'sticks out' to the player.
You could even use the depth variable for that.
*


You're right, you can't actually do real DOF in 2D anyway, this is just a stab at making that sort of effect. You could elaborate it further if you want, though I think the effect looks pretty good with out over complicating it. You can make it more subtle too by playing with the alpha mask.
IamCalle
It can always be done in 3D too, but not as efficient as this, I guess.

Nice effect btw!
sHarivaRi
hmmm, nice example, but if i would use titlesets and no backgrounds, i have to use screen_redraw()?
str1ker-
That is the coolest thing I've ever seen...

I don't care about it not really being depth of field (it's 2D, it never will be), but that is the coolest 2D blurring effect yet done in Game Maker...

One question: Would you like credit for this, if I put it in one of my games?
OneWayTM
QUOTE (str1ker- @ Jul 31 2007, 05:41 AM) *
That is the coolest thing I've ever seen...

I don't care about it not really being depth of field (it's 2D, it never will be), but that is the coolest 2D blurring effect yet done in Game Maker...




AMAZING !!!! lmaosmiley.gif


dude your a genius !

you need credits if i put this in my game?
boxingpuss
I took the time to look up all of your topics, because it seems to me that every example
that you have done is really really nice. Thanks for this DOF effect also.
iluvfuz
This would work very well if you use it with a scope in a platformer or TDS.
Sinister95
Nice effect, but how would you switch it to draw the centre at the player rather than at the mouse cords? I tried and it keeps coming up with a surface draw error.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.