Skip to content

Understanding DepthOfField #2006

Discussion options

You must be logged in to vote

I figured it out. The "normalized focus distance" means a value between 0 and 1, where 0 is at the camera's near distance and 1 is the camera's far distance. The defaults are 0.1 for near and 2000 for far. That explains why it seems like any focusDistance greater than 1 causes everything to get blurry when you are dealing with objects a meter or two away from the camera. You just need to set far to a much smaller value, or use very low values for focusDistance.

https://threejs.org/docs/#api/en/cameras/PerspectiveCamera

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@ChrisCrossCrash
Comment options

Comment options

You must be logged in to vote
3 replies
@marcelpi
Comment options

@ChrisCrossCrash
Comment options

@aplauche
Comment options

Answer selected by ChrisCrossCrash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants