Closed panwangjun closed 10 months ago
Hi.. you meant add spherical lens or directly use a Spherical camera??
Example scene.. Spherical_Camera.zip
To add lens, you can create a 'Realistic' camera type and add a predefined lenses file, as is explained in the guide: https://pbrt.org/fileformat-v4
Camera "realistic"
"float shutterclose" [ 1.0 ]
"float shutteropen" [ 0.0 ]
"string lensfile" "fisheye.10mm.dat"
"float aperturediameter" [ 3.0 ]
"float focusdistance" [ 1.0 ]
"string aperture" "gaussian"
For aspherical lens elements, you would need to:
RealisticCamera
that make implicit assumptions that the lens system is symmetric about the axis, of which there are many (exit pupil computations, etc...)In general, you should thoroughly understand the current RealisticCamera
implementation, at which point hopefully it will be evident what needs to be done.
How to add aspherical lens in camera?