Range (max = min + range). Isolate specific bounces!
๐ Auto-focus & Visualization
The default aperture is small, keeping most of the scene in focus.
Lower the F-stop to introduce depth-of-field blur and reduce the in-focus range.
Click any object in the scene to trigger autofocus.
Green = traditional planar focus, Red = Scheimpflug (tilt-shift). Tolerance = pixels of acceptable blur.
โ๏ธ Volume (Particilating Media)
Required for environment fog and volumetric spheres. Only preliminary volumetric support is included, due to the high computational cost of real-time volumetric path tracing.
Each colored dot on the right is the object-side focus of the same-colored image sample on the left, shown at a separate scale. They are neither scene lights nor a blur image. A smaller F-number widens the pupil and defocus cone; it does not move ideal focus. Camera rays follow the selected planar focus (including the three-point tilt gizmo); the image points are equivalent thin-lens conjugates. Thin-lens lesson instead traces from the physical sensor controls: the center ray remains straight, and a ray parallel to the lens axis passes through its focal point. Pupil shows a normalized front-view shape guide, with the current f/N diameter below it; it does not show the sampling density. The sensor icon gives nominal dimensions, and its curvature stroke is decorative: the lesson uses a flat sensor. These rules use an ideal paraxial lens, not an aberrated compound lens. Legacy film-tilt blur, distortion and chromatic effects are not reconstructed here. Thin-lens model ยท Tilt-shift geometry (chapter 31).
Based on Ray Tracing Gems II - Tilt-Shift Rendering Using a Thin Lens Model
Three-point focus-plane model inspired by RTG II Ch.31. The diagram follows the gizmo and derives a tilted pupil. Near-parallel view rays can have no finite forward intersection; this experimental renderer uses a bounded fallback there, rather than modeling a real lens system.
Shows: RGB spheres, axes, and focal plane triangle. Hover to highlight, click and drag to manipulate.
How it works:
โข The gizmo (triangle) defines the focal plane in 3D space.
โข Hold on RGB spheres to rotate the focal plane.
โข Hold LMB on the center of the triangle to translate it in XY-plane (parallel to the image plane);
โข Hold RMB on the center of the triangle to translate it in XZ-plane (perpendicular to the image plane);
โข First increase the aperture size (smaller F-stop), then play with the gizmo and see how the depth of field changes in action.
โข Near a parallel ray/plane configuration, focus can move arbitrarily far or behind the camera. Treat the fallback as a limitation of this model.
๐ CHROMATIC ABERRATION & EFFECTS โญ
Wavelength-dependent IOR creates rainbow dispersion through glass.