Roblox Needs Better Depth of Field (It's Very Inaccurate)

As a Roblox developer, it is currently too hard to add convincingly accurate depth of field to my game. The way Roblox currently handles depth of field is to arbitrarily apply a gradual gaussian blur* to objects closer or farther than an arbitrary distance value, per the Roblox Developer Hub. While this makes for a good baseline for low-performance devices due to how relatively inexpensive it is computationally**, it’s terribly inaccurate.


From DepthOfFieldEffect

Of course, this is not how real depth of field works with a real camera. Real cameras have lenses, sensors, apertures, and focal lengths, which all impact the depth of field. Additionally, by just arbitrarily applying a gaussian blur to the final rendered image, Roblox’s DOF implementation ignores a crucial element of convincing depth of field: bokeh.

image


Two photographs captured with a real camera. Notice the shape of the blur is the shape of the aperture opening inside the lens, not a simple gaussian blur. This is not possible with Roblox’s current DOF implementation.


Roblox’s DOF implementation, which has no bokeh and instead applies a simple gaussian blur to objects that are out of focus.


New World by Amazon Game Studios, which uses the Amazon Lumberyard game engine, simulates accurate depth of field with bokeh.

If Roblox is able to address this issue, it would improve my development experience because I would be able to add a much more convincing, accurate, and better looking depth of field effect to my games, improving their visual quality that much more.

*While it is not documented what type of blur Roblox applies, the results are consistent with that of a gaussian blur.
**Compared to more accurate DOF implementations

116 Likes

As someone who has studied and was planning on doing photography professionally, I can confirm that the system needs to be tweaked 100%. It doesn’t come off as natural whatsoever and if you’re trying to work on a photorealistic game or showcase, you’re left off needing to either keep the blur and have it do harm to your work instead of complimenting it or keeping the range for it for as far as you can.

21 Likes

Between intensity 0 - 0.215 Roblox uses Bokeh I think but since it’s such a low intensity it’s hard to notice. I’m not sure what roblox uses past that but if there’s bokeh it’s not really obvious at all

2 Likes

Bumping this since there’s been no word on whether this has been filed internally

9 Likes