POTA [POLYNOMIAL OPTICS TO ARNOLD] IS AN OPEN-SOURCE CAMERA SHADER FOR THE ARNOLD RENDERER BASED ON SPARSE HIGH-DEGREE POLYNOMIALS FOR WIDE-ANGLE LENSES [2016].
POTA is an implementation of Sparse high-degree polynomials for wide-angle lenses [2016]. It renders images with high-order aberrations, at a fraction of the cost of tracing rays through lens elements. It is done by pre-calculating fitted polynomials, which serve as a black-box to transform the rays on the sensor to rays on the outer pupil. All credit goes out to the authors of the paper, I only wrote the implementation for Arnold. This shader represents 20 years of research efforts in camera shaders compared to ZOIC, where every single camera ray was physically traced through every lens element [based on a paper by Kolb et al from 1995]. The visual quality is comparable, but the polynomial optics technique is many times faster and can be compared to the cost of thin-lens calculations. Especially in complex scenes, the cost of using polynomial optics over the thin lens approximation is neglegible. Note that because the lens descriptions have a fitted approximation, it is not possible to change the focal length like we are used to with the thin-lens approximation. Think of POTA as a library of prime lenses instead. Some focal length adjustments can be made by changing the sensor size [just like with real camera’s – note the differences in focal length of a lens on a aps-c sensor vs full frame]. POTA is wavelength-dependent, which means that optically correct chromatic aberrations (ignoring lens coatings as there almost never is accurate data for that) are possible by rendering 3 images with corresponding CIE RGB wavelengths, one for each respective colour channel. It’s expensive to render 3 images – but the option is there. For example, 700nm for the red channel, 546.1 nm for the green channel and 435.8 nm for the blue channel.
MtoA
Set the following environment variables, replacing $PATH_TO_POTA with the actual path on your machine.
ARNOLD_PLUGIN_PATH = $PATH_TO_POTA/bin
MTOA_TEMPLATES_PATH = $PATH_TO_POTA/ae
It’s also possible to copy the files into your MtoA install, but I personally prefer the first option. Just copy the files like this:
Files in /bin
go to [$MTOA_LOCATION]/shaders
Files in /ae
go to [$MTOA_LOCATION]/scripts/mtoa/ui/ae
HtoA
Set the following environment variables, replacing $PATH_TO_POTA with the actual path on your machine.
ARNOLD_PLUGIN_PATH = $PATH_TO_POTA/bin
It’s also possible to copy the files into your HtoA install, but I personally prefer the first option. Just copy the files like this:
Files in /bin
go to [$HTOA_LOCATION]/arnold/plugins
POTA provides multiple prime lens descriptions. The options are:
Set the units of your specific DCC. For mtoa, this should be cm. For htoa, this should be meters.
Default is the width of a full frame sensor [36mm]. Adjustments to the sensor size result in different effective focal lengths of the lens. Use this to either match a lens to a sensor size, or to slightly change the focal length of the prime lenses. Note that the lenses provided are made for various sensor sizes, and this information is often not disclosed in the lens patents. Don’t be afraid to try other sizes than the default full frame sensor.
Different wavelengths of light are bent in slightly varying angles when changing interfaces, and this is accounted for. Since Arnold is an RGB renderer, this can be left at the default (550 nm). If you want to render optically correct chromatic aberrations, you can render out 3 separate images with corresponding RGB CIE wavelengths, one for each colour channel of the final image. For example, 700nm for the red channel, 546.1 nm for the green channel and 435.8 nm for the blue channel.
The f-stop is a dimensionless number that is a quantitative measure of lens speed. Practically, it is the ratio of the distance from the lens to the point where the focused light converges [the focal length] over the diameter of the aperture. An f-stop of 0.0 is translated as the largest possible aperture diameter the lens allows.
Distance between the lens and the focal plane in units set using the unit parameter. Setting this shifts the sensor to the focal plane. Since POTA is an optically imperfect lens system the autofocus is best-effort. Use the focus distance as an initial autofocus, then adjust the “extra_sensor_shift” to focus the lens perfectly if necessary.
Sometimes a ray gets vignetted, but if the ray would have been shot in a different direction – it would have passed.
Amount of edges of the aperture. < 3 blades will use concentric mapping, sampling a perfect disk with no blades.
This calculates, surprise, the proper ray derivatives. To do this, 3 rays have to be traced instead of one, so it is a bit slower. On the other hand, texture I/O should be better. This option should be removed in a future release.