Adding Camera Focus in Godot


ProblemGodot doesn't have any easy way to tweak the Camera Focal point like the one in Blender.

Solution: Godot does provide a world environment system. And that gives us a way to control "Blur effect"...

It gives us the ability to control some value like : near blur start point , far blur start point , blur amount , how smooth the blur will be.... and some more...

So i thought why not make a small script to control these parameters....

Here is the code if you are asking :)

What i did ?  well...I enabled far blur and near blur in the start... so when i run the game it will enable these things...

Then in the process function i mixed the "far" and "near" by using same value in both....so if i tweak "distance" or "clear_area"...it will automatically tweak the parameters in "far blur" and "near blur"

Did it worked?? well... here is what i got..... https://twitter.com/i/status/1390880390370316289

How to use it in my project? umm...just copy that code and attach that code with your world environment node.... ♥


Btw...check out my twitter for more My Twitter

Leave a comment

Log in with itch.io to leave a comment.