Changing Camera Focus Distance in Inspector

I’m playing around with a camera depth of field effect, as per the documentation here: Depth of Field and Other Lens Effects | Babylon.js Documentation

I’m trying to play with the numbers in order to work out the effect values that I need in order to work in my scene, but it doesn’t seem as though the dof_focus_distance is a value that is editable from within the debug panels & inspector? Or am I missing something?

Indeed, this property can’t be edited in the inspector.

You should create an issue in the repo so that we can keep track of it.

[…] My mistake, for some reason it is named Distortion in the inspector, but it is really the dof distance focus!

Thank you - does that then mean that the “distortion” value is not editable in the inspector? Is it worth me creating an issue to correct the label?

The value is also capped to a value of 10 in the inspector, which makes testing in the inspector very difficult for reasonably sized scenes. Having to keep editing my code, and refreshing the view, which is a bit of a pain.

The property is also called dofDistortion in the class, so I don’t know regarding changing the label… I’m not sure this property is a true dof focus distance… There’s a true DoF effect in the DefaultRenderPipeline and that one does contain a focalLength property.

You’re right, I made a PR for that:

1 Like