POV-Ray 3.6 and MegaPOV focal blur patch

The focalblur patch fixes the distribution of rays used for focal blur in POV-Ray 3.6 and MegaPOV 1.2.1: in these versions the focal blur apperture is a square (of dimensions 4*aperture x 4*aperture), whereas it should be a disc. Note that this was fixed in POV-Ray 3.7.

After this patch, the rays are defined as lines passing through a point uniformly distributed over a disc of diameter 4*aperture in the camera image plane (the disc size are in world units) and the focal point. Consequently, the blur mask for an object placed halfway between the camera and the focal point will be a disk of diameter 2*aperture in world units.

This patch is a backport from POV-Ray 3.7.0.RC6, and focal blur should be consistent - at least geometrically - with POV-Ray 3.7 after applying it.

To apply it:

  1. Download either the POV-Ray (mirror) or the MegaPOV (mirror) source distribution.
  2. Download the patch: povray-3.6.1-megapov-1.2.1-focalblur.patch
  3. Unpack the source distribution: tar zxvf megapov-1.2.1.tgz
  4. Apply the patch: cd megapov-1.2.1; patch -p1 -d. < ../povray-3.6.1-megapov-1.2.1-focalblur.patch
  5. Configure and compile POV-Ray or MegaPOV (please follow the original install instruction)

I also made some sample POV-Ray files to check the size and shape of the iris used by POV-Ray.

- Frédéric Devernay, Nov. 2012

Valid XHTML 1.1! Valid CSS! Level Double-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0