Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / FPSC X9 Depth Of Field System

Author
Message
Nomad Soul
Moderator
19
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 21st Mar 2010 01:33
All

I've spent a couple of weeks trying to get depth of field working in FPSC and after some shader tweaking have now been able to achieve this.

I wanted to incorporate the effect when using ironsights with guns as seen in modern FPS games and thought I'd share the results. Currently I'm using the effect so game characters will come into focus depending on their distance from the player.

Attached pic of FPSC X9 scene with bloom only

Nomad Soul
Moderator
19
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 21st Mar 2010 01:34
Here is the same scene using depth of field when switching to gun ironsights view.

Notice how the furthest grunt and jailed Zombie become out of focus compared with the closer enemies.

Nomad Soul
Moderator
19
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 21st Mar 2010 01:34
Here is the same scene from another angle using bloom only

Nomad Soul
Moderator
19
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 21st Mar 2010 01:36
Finally here is another example of the scene using depth of field.

I'll be posting a video shortly.

Lewis
VBOTB Developer '10
21
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 21st Mar 2010 01:43
Nomad, I bloody love it!

Are you releasing this or is it just to show that it can be achieved?

A video would be awesome by the way

Shadowtroid
16
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 21st Mar 2010 01:52
And would it be possible to do the reverse?

As in, anything too close would be blurred out?

Kill Shadow
18
Years of Service
User Offline
Joined: 14th Feb 2008
Location: Here on the 7th
Posted: 21st Mar 2010 01:57
Shaders are soooo cool nice work Nomad Soul. May I ask a question since I can't see it on your screenies. What Mods are you using in your FPSC is it Fenix, PB both? Looks great really great

Regards,

KillShadow 3 big Frothies for the nice work

Stop Drop and Roll works on everything but HELLFIRE!!!!
Bugsy
17
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 21st Mar 2010 02:24
dude, AMAZING work, and quit taunting me with those characters!

tell me, does it blur a character far away even if aiming at him?


DarkFrost
17
Years of Service
User Offline
Joined: 3rd May 2009
Location: ON, Canada
Posted: 21st Mar 2010 02:28
Looks good!

Although one thing...whose model characters are those? They look pretty cool!

[img][/img]
Bugsy
17
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 21st Mar 2010 02:29
those are streloks and only he has them. I love them and will buy them immediately if they're ever released.


Woolfman
18
Years of Service
User Offline
Joined: 19th Sep 2007
Location: Cave
Posted: 21st Mar 2010 02:42
Nice work Nomad. Looks good. A video would be great.

As a side note it's kind of odd the characters don't have a cast shadow. It makes it look like they are pasted in.
Soviet176
16
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 21st Mar 2010 03:33
Wow what characters are you using?

"I haz no sig :o"
Chris Redfield 2008
18
Years of Service
User Offline
Joined: 29th Sep 2007
Location: Beecher\'s Hope
Posted: 21st Mar 2010 04:29
COOL! Nice Work! You should definately pass this on to Lee and Hockeykid.

C.R. 2008

"Wether you think you can, or you think you cannot, you are usually right" - Henry Ford

THE ART OF DARKNESS IS COMING... 2012
Kill3r7
User Banned
Posted: 21st Mar 2010 04:57
I see some problems in the depth of field, with the chars and the distance of the blur, you need fix this.

anyways, good work.

defiler
17
Years of Service
User Offline
Joined: 4th Apr 2009
Location: Canada
Posted: 21st Mar 2010 08:50
wow sweet. Good work dude.

Limitless Box studios current project: Lost Contact
Nomad Soul
Moderator
19
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 21st Mar 2010 17:32
Hi everyone, thanks for the feedback

Quote: "Are you releasing this or is it just to show that it can be achieved?"


I've contacted Lee and he is considering adding this to the official engine features.

Quote: "And would it be possible to do the reverse? As in, anything too close would be blurred out?"


I haven't tried that yet but you can customise the distance and amount of focus given to objects when depth of field is in use.

Quote: "May I ask a question since I can't see it on your screenies. What Mods are you using in your FPSC is it Fenix, PB both? Looks great really great"


I'm using Project Blue mod with bloom and depth of field full screen shaders. The bloom shader is on by default but I'm using a script to switch to depth of field when using ironsights view.

Quote: "tell me, does it blur a character far away even if aiming at him?"


The depth of field is only applied when using ironsights. At the moment the effect is controlled by distance from the player rather than aim but it might be possible to use a different menthod with scripting.

Quote: "As a side note it's kind of odd the characters don't have a cast shadow. It makes it look like they are pasted in."


I can't remember if I disabled character shadows but they are definately not pasted in!

Quote: "Wow what characters are you using?"


As Bugsy said. They are made by Strelok and called 'Vorr soldier'. I was a beta tester so not sure when they will be officially released.

Quote: "COOL! Nice Work! You should definately pass this on to Lee and Hockeykid."


I've contacted Lee and he is considering adding it to the official engine. I'm sending him the files next week.

Quote: "I see some problems in the depth of field, with the chars and the distance of the blur, you need fix this."


Thanks but if you can provide a little more information I might be able to improve it.

Nomad Soul
Moderator
19
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 21st Mar 2010 17:34
Here is a video showing a couple of tests

http://www.youtube.com/watch?v=QgaL9XSsITY

I highly recommend watching the HD version so you can see more detail

http://www.youtube.com/watch?v=QgaL9XSsITY&fmt=22

Snipesoul
18
Years of Service
User Offline
Joined: 29th Aug 2007
Location: Somewhere in New York...
Posted: 21st Mar 2010 17:51
Amazing work! Another great addition that brings FPSC into the next gen!

Just a question though: Is it possible to have the DoF only work at a really close range and affect the gun like in Modern Warfare 2? I attached a picture for reference.

"Dad? Dad, I'm a- Ye- Not a "crazed gunman", dad, I'm an assassin! ...Well, the difference bein' one is a job and the other's mental sickness!" - The Sniper.
KeithC
Senior Moderator
20
Years of Service
User Offline
Joined: 27th Oct 2005
Location: Michigan
Posted: 21st Mar 2010 17:56
Nice work; I like how the zombie falls through the bars when he dies! lol

-Keith
defiler
17
Years of Service
User Offline
Joined: 4th Apr 2009
Location: Canada
Posted: 21st Mar 2010 17:59
just a note when watching the video: Watch in HD so you can see the blur better.


Good stuff.

Limitless Box studios current project: Lost Contact
Cygonette
16
Years of Service
User Offline
Joined: 1st Jan 2010
Location:
Posted: 21st Mar 2010 18:28
Amazing work. Great textures, brilliantly executed.
Kill3r7
User Banned
Posted: 21st Mar 2010 20:31
Well I know now the problems of your depth of field, The weapon have the blur, and the scene in some parts, not like in the video. you need improve like cod6 . and the bloom delete if you use ironsights

wizard of id
20
Years of Service
User Offline
Joined: 16th Jan 2006
Location: Sunny South Africa
Posted: 21st Mar 2010 21:21
@Nomad Soul

Good job I love what you have done here I look forward to more of your stuff

"In my weird politically incorrect hypothetically incoherent contradicting obscured world definitively maybe"

Woolfman
18
Years of Service
User Offline
Joined: 19th Sep 2007
Location: Cave
Posted: 21st Mar 2010 21:22
Nice HD video. The DoF looks good.
Soviet176
16
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 22nd Mar 2010 00:17
Ah alright nomad, sorry, I thought strelok was a shader. That's cool, did he ever tell you if he "was" going to release them? and if he is is he going to put them into the store?

"I haz no sig :o"
Scurvy Lobster
20
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 22nd Mar 2010 12:29
I just saw the HD video. Good job!

There was a bug in it. About 25 seconds in you focus on a stair that doesn't seem to come in to focus. Right after you moved sight to an enemy that also doesn't come in to focus. So the focus might sometimes have problems activating and also following mouse movement.

But this looks really promising

Errant AI
19
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 22nd Mar 2010 12:56
Looks very nice Nomad. Very well done.

Is it possible to reverse the effect? To have something in the foreground (the weapon) be blurred and the scene in focus (at distance and in center-screen)? I ask because when sighting a weapon, the eyes should not be focused on the weapon but on the target. I'm guessing it's probably impossible with FS3 alone but thought I'd toss that out there because it would be so cool to have what you've shown here when running about but script a FS3 toggle to what I described when using open sights.
bond1
20
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 22nd Mar 2010 17:03 Edited at: 22nd Mar 2010 18:18
Looks really great! Very cool that it only comes into effect during ironsights, I wonder how you did that.

The fountains of blood when you shoot a character, 300-style, makes me laugh (in a satisfying way).

----------------------------------------
"bond1 - You see this name, you think dirty."
Aaagreen
18
Years of Service
User Offline
Joined: 4th Sep 2007
Location: City 17
Posted: 22nd Mar 2010 17:18
Depth of field is supposed to make what the player is looking at clear and what he isn't looking at blurry, so (as EAI said) the weapon should be blurred, and everything in the centre of the screen in focus.

Jeku always gets drunk and tries to Moderate the ocean. Tirelessly slapping the waves as they roll in.
The Master Dinasty
17
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 22nd Mar 2010 17:58
Quote: "Depth of field is supposed to make what the player is looking at clear and what he isn't looking at blurry, so (as EAI said) the weapon should be blurred, and everything in the centre of the screen in focus."


Well it`s still work in progress i think that this system is quite good, but could be improved and it should. The weapon should be blurred about 40-50% and the thing that the player is aiming at should be a 100% clear. And of course the things around should be a 15-20 % clear. My thoughts anyway...

-Massap2

We are the magnificent Masters, builders of pyramids.
Cyborg ART
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 22nd Mar 2010 19:35
Quote: "Is it possible to reverse the effect? To have something in the foreground (the weapon) be blurred and the scene in focus (at distance and in center-screen)? I ask because when sighting a weapon, the eyes should not be focused on the weapon but on the target. I'm guessing it's probably impossible with FS3 alone but thought I'd toss that out there because it would be so cool to have what you've shown here when running about but script a FS3 toggle to what I described when using open sights."


The problem is that fullscreen shaders wont apply onto weapons in Project Blue (as far as I know) so I guess you would have to assign a "blur"shader to the weapon in some way.


Anyways its a very cool effect you have achieved there, Nomad Soul.
Great job!

Red Eye
17
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 22nd Mar 2010 19:44
Quote: "The problem is that fullscreen shaders wont apply onto weapons in Project Blue (as far as I know) so I guess you would have to assign a "blur"shader to the weapon in some way."


screeneffectonweapons=1

Dont use this!


...Kranox Studios!
JRH
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 22nd Mar 2010 20:34
Stunning! You have pushed the engine even further! Well Done.

zeza
18
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 22nd Mar 2010 20:46
Very nice job Nomad, it looks amazing. On a side note, where did you get those characters?

Hope This Helps
DarkJames
16
Years of Service
User Offline
Joined: 11th Aug 2009
Location:
Posted: 22nd Mar 2010 20:54
Strelok's VOGG soldiers.. Zeza.. he said above.. READ!!


"Feel free in a world of madness,be the bright spot"
-Bloody James
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Mar 2010 01:33
The reason the DOF does not "focus" is because it has no interconnection with the engine. The shader is placed onto the screen and that's about it.

To get the shader to focus properly, he would need to have a command for retrieving "raycast distance" and perform a raycast in front of the player, then pass that value tot he shader for focusing. But, the drawback is that yet another raycast would only slow down the engine even more!


The one and only,


Red Eye
17
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 23rd Mar 2010 09:32
Great mate, well done. I was integrating this into my mod. U inspired me, keep this up!

...Kranox Studios!
Scurvy Lobster
20
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 23rd Mar 2010 13:41
Quote: "The reason the DOF does not "focus" is because it has no interconnection with the engine. The shader is placed onto the screen and that's about it."


Then what I am hearing is that it won't improve much over the current level (?). While it is quite impressive I must say that I wouldn't use the system as it is. I wouldn't want to annoy player with a half-done system.

The system is a great achievement in my mind and I am not trying to be disrespectful of the hard work. All I am saying is that the tech is not ready to go into a game meant for release yet. Players would spot the problems in a second and grill you for it.

Nomad Soul
Moderator
19
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 24th Mar 2010 14:47
Thanks for your feedback on the video.

Quote: "Is it possible to have the DoF only work at a really close range and affect the gun like in Modern Warfare 2? I attached a picture for reference."


I've started working on that and have now got depth of field applied to the gun when using ironsights. Next I'm going to look at reversing the effect so its only used at close range.

Quote: "I like how the zombie falls through the bars when he dies! lol"


LOL. Won't be a problem anymore after v117 is released though (ragdoll)!

Quote: "Well I know now the problems of your depth of field, The weapon have the blur, and the scene in some parts, not like in the video. you need improve like cod6 . and the bloom delete if you use ironsights"


The weapon now has depth of field! Lee might be helping me combine bloom and depth of field.

Quote: "did he ever tell you if he "was" going to release them? and if he is is he going to put them into the store?"


Strelok had a thread on the character. I would try searching for that as he's not given me any release details.

Quote: "There was a bug in it. About 25 seconds in you focus on a stair that doesn't seem to come in to focus. Right after you moved sight to an enemy that also doesn't come in to focus."


Thanks. I'm looking into that.

Quote: "Is it possible to reverse the effect? To have something in the foreground (the weapon) be blurred and the scene in focus (at distance and in center-screen)?"


I think this will be possible. I'm working on the settings at the moment to try and switch the focus.

Quote: "Then what I am hearing is that it won't improve much over the current level (?)"


I'm not done with it just yet! I've just got depth of field working on the gun when using ironsights and now seeing if I can change the focus so its blurred at close range and clear at distance where you are aiming. I also have some other improvement ideas which I'll be testing soon.

Attached a pic of the gun with depth of field applied when using ironsights.

Scurvy Lobster
20
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 24th Mar 2010 15:20
Thanks for the update. Nice to know that improvements are possible

Login to post a reply

Server time is: 2026-07-21 19:19:05
Your offset time is: 2026-07-21 19:19:05