Operating system: Linux-5.4.0-40-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: GeForce GTX 960/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.100
Broken: version: 2.83.2, branch: master, commit date: 2020-07-09 05:50, hash: rB239fbf7d936f
Short description of error
Camera F-Stop setting does not scale with Scene unit scale, resulting in unrealistic focal blur for real-world F-Stop values. Affects viewport (Material Preview and Rendered modes, where DoF is evaluated) and final renders. Affects both Eevee and Cycles.
Exact steps for others to reproduce the error
Please see attached .blend file, "F-stop scaling bug.blend", which contains the following setup:
- 2 Suzanne monkeys, each 34mm tall, placed at different distances from the camera. The closer one is placed with the front of the face approximately 80mm from camera.
- Camera has a 35mm sensor, 15mm focal length, f/2.8 and 80mm focal distance. (DoF at these extremes should be about 3.9mm, resulting in significant focal blur.)
The file contains 3 scenes to illustrate the issue:
- Scene 1: no scene scale. Scene unit scale was left at 1.000. Objects are scaled down to the 34mm-tall target size. F-Stop set to 2.8. DoF and focal blur look correct.
- Scene 2: unit scale, no F-Stop adj. Scene unit scale set to 0.001. Objects are scaled to sizes that would normally report as 34 meters tall under Blender defaults, but now report as 34mm tall. F-Stop set to 2.8. EXTREMELY LARGE DOF AND ALMOST NO FOCAL BLUR. (Unrealistic)
- Scene 3: unit scale + F-Stop adj. Identical to Scene 2, but the F-Stop has been manually adjusted to 0.0028 (2.8 x 0.001 scene unit scale). DoF and focal blur are now correct and equivalent to Scene 1.
Screenshots of Viewport, Eevee, and Cycles for each scene are also attached.