Upgrading from 4.20 to 4.24 messed up Depth of Field in my game.

Hello Ghostblades,

I share your confusion with that feature, as I just recently moved from 4.22 to 4.24.
That said the Unreal Engine Team seams to have defaulted to the circle depth of field method for desktop renderers, and removed the Gaussian DoF method entirely from the Desktop Deferred as well as the Forward renderer. Now here comes my question, is this a project targeted to mobile platforms?
If so you can still use the Gaussian DoF, it’s under the Mobile DoF tab in the post process settings, to use this one though, you’d have to activate the mobile previewer to actually see it in your editor. Here’s an article on that: Mobile Previewer | Unreal Engine Documentation .

You can see the new settings for controlling the DoF here (all the ticked ones):

296521-new-settings.png

These are more or less the cinematic controls for the DoF ( Cinematic Depth of Field Method | Unreal Engine Documentation ).

Hope that helps, and that you don’t have to go though the hassle again of porting your project to an other version of the engine. Just let me know If I was too unclear, or if there are any questions.

Regards,

Vecherka.

I have been working on a 2.5D stylized game for 2.5 years now. Keeping the camera far away - and making the FOV on the camera 25 - so that its still has some perspective but not exactly 100% orthographic gave me the look I was going for.

I had GaussianDOF blurring the background in the post process volume.

Upon upgrading to 4.24 and migrating the project/doing weeks of new work. I realized everything in the scene is sharp. A bit of research led me to see that Bokeh DOF was removed in 2.23? I am a bit confused/baffled why? It was working so well for me.

I am struggling to figure out a way to replicate the same look of a blurred background and crisp fore-ground…
I have attached a screenshot from 4.20 - with the blurred background - and trying to replicate the same thing in 4.24 seems impossible I’ve been at it for about 4 hours now, figured I’d ask for help.

Or should I just go back to 4.20 and finish the game in that version?

296510-screenshot-2.png

Hello, thanks for the quick answer, the game is targeted for PC and console not really mobile, unfortunately I went through all the documentation last and compared the way the new camera works to the old bokeh dof and it just doesn’t work at all spend till 4 am tweeking knobs and sliders haha…due to the nature of my setup of using a smaller fov and keeping the camera super far away, the new method just breaks down completely. I basically have to either change the look of my game by moving the camera closer and have the camera be somewhere between 75 to 90 fov so that things closer to the camera render clearly and blurring the background but then I have unwanted perspective shift that makes the game look not the way I want. I’d probably have to stick with the old version unfortunately.

I was able to replicate a “similar” effect using a post process material to blur the background - but it left some ugly darkening around edges of foreground models.

I guess I’ll have to finish the project in 4.20

Hey sorry for the late answer, but if you could give me a few examples of how your camera is positioned relative to those layers and it’s fov, I could give it a try in 4.24.

My camera position, dolly’s in and hour depending on the specific location in level but,
it ranges from Y=3500 and Y=4500 with an FOV of 25. This is used to kind of get rid of a bit of the depth and make it look a bit more 2D. The Gaussian DOF was used to sort of focus the eye on the fore-ground sort of like what Ori and the Blind Forest does with it’s backgrounds.

Hello Ghostblades,

I tried a few things out: First I set the focus distance to the distance of the layer I want to focus on. I found out that you can - more or less, and don’t quote me on that one - control the blur for the regions before the focal distance rather easily with the F-Stop, smaller values blur the foreground more.
And for the regions behind the focal distance with the ‘Depth Blur km for 50%’, which is the distance in which pixels get blurred by half of the blur radius, and the ‘Depth Blur Radius’ which is the aforementioned radius. Depending on your level setup, the former one can be rather finicky and small changes can change the resulting DoF effect drastically.
A nice help can be the DoF Visualizer, you can find it in the Editor Viewport under Show > Visualize > Depth of Field Layers.

I tested it in a map; with planes with a distance of 1,000, 2,000, 4,500, 8,000 and 12,000 units to the camera. I used a F-Stop of 2.4, a Blur Radius of 4, a Depth Blur km for 50% of 0.1 and a FoV of 25 degrees. The results are okay but can definitely be improved upon, by really fine tuning the F-Stop and Depth Blur km. It might be worth taking a look at some of the DoF console commands. You should find them under ‘r.DOF.[…]’.

Hope that helps.

Regards,

Vecherka.

So I tried this out, it kinda got the results I wanted, not 100% what I had in previous versions. I think it blurs out a little too much, but I think I can either live with it or just stick to 4.22 for the end of the project. I don’t think I 100% need something from the latest UE4.

Thank you for your help. It for sure helped me understand what the latest version of the camera is doing. It kinda seems that for every version of unreal, they push for more “realism” where I just want to make a “cartoony” game haha.

I’m glad I was able to help, although it didn’t solve the problem.
Good luck for the further development of your project.

Regards, Vecherka.

Hello, I never used 4.24 before and I’m getting this annoying blur too. I apologize, but I’m too dumb, htf do I get this solved? :smiley: Thank you for every answer.