Mesh warping

Since 3.5.0

It is possible to apply an arbitrary warping mesh to distort the final image using a PFM (portable float map) file.

The file format is rather simple, and is described here. The file contains an array of NxM 3-component pixels in RGB (grayscale not supported). Each position contains the mapped resulting location in UV, in the R and G components respectively, in [0,1]. The geometry warp format is the same as in the MPCDI v2.0 specification, section 3.6.2 (see here).

This file is read and converted into a mesh by Gaia Sky. The mesh is used to distort the final image at the end of the rendering pipeline.

In order to specify a PFM warping mesh file, you need to edit the configuration file of Gaia Sky and add a few lines in the postprocess section:

postprocess:
  [...]
  warpingMesh:
    pfmFile: /path/to/your/warping-mesh.pfm

A few warping mesh examples (big endian) are provided below: