Adding a Panoramic Camera Mode (HEALPix): How difficult?

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: Dade, jromang, tomb, zcott, coordinators

Adding a Panoramic Camera Mode (HEALPix): How difficult?

Postby trough » Tue May 31, 2016 10:24 pm

I am thinking about coding this feature myself, since I assume there is no demand for it. My question is to the developers: how hard would it be to add these features to LuxRender/LuxBlend? I now have only basic experience programming in C, but much of the work seems to be already done in libraries, and I am willing to learn. I know that you have much higher priorities for LuxRender, so I appreciate any response.

Briefly, HEALPix is a set of mappings, or ways to pixelize a sphere. The most common is called plainly "HEALPix projection", but there are a few parameters which can be adjusted for variations.

Further Information:
  1. Wikipedia:
  2. Official library (GPLv2):
  3. Calabretta, Mark R., and Boudewijn F. Roukema. Mapping on the HEALPix grid, MNRAS, 2007.

My intent:
  • Add a HEALPix mode to the panoramic camera.
  • Specify dimensions by HEALPix parameters, not by the usual render dimensions setting.
  • The rays must properly affect the pixels and their neighbors on the sphere.
  • The preview must be able to visualize the data.
  • The library already provides functions for determining a pixel's inclination and azimuth angles, finding neighboring pixels, querying regions on the sphere, and visualization.
  • Export HDR and LDR images with or without tonemapping in the FITS format (standard for HEALPix maps), and maybe in the typical formats (PNG, OpenEXR, etc.).
  • Complimentary feature:
    • Allow importing HEALPix images as environment maps from FITS files and maybe the typical formats. (Typical formats would require extra information about the mapping.)
  • I have a hobby project which requires real-time transformation of many spherical pre-renderings.
  • HEALPix is implemented in a "highly optimized" library, which includes spherical image transformation functions such as rotation, reprojection to an orthographic dome, and selection/cropping by various shapes on the sphere (features particularly useful for my project, YMMV).
  • It is a standard in the field of astrophysics, where they care about their sphere mapping. It is used on NASA and ESA probes. Some of its astrophysical advantages are also graphical advantages.
  • Each pixel is of equal area, providing very uniform resolution over the sphere, as opposed to equirectangular, in which north and south pole points are represented by entire rows of pixels; or the sky cube, in which detail increases toward its edges. Pixels are aligned in evenly-spaced latitudinal rings.
  • When unwrapped, it forms an equal-area map with low distortion. Shown here is the standard form, made of twelve diamonds:

How crazy would I have to be to attempt this?
Posts: 2
Joined: Wed May 18, 2016 2:30 pm

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 3 guests