filament: Spherical Harmonics incorrect for some environment maps?

Describe the bug The spherical harmonics coefficients produced by cmgen usually appear correctly when rendered in Babylon.js or other engines. However, the ennis.exr (http://gl.ict.usc.edu/data/highresprobes/) environment map produces SH coeffs that result in very dark lighting on the positive Z axis (perhaps even negative lighting). This occurs in both Babylon.js as well as this online SH visualizer: SH visualization of ennis.exr I’m wondering if this is somehow related to there being such a large range in values in this particular image.

To Reproduce Steps to reproduce the behavior:

  1. Generate the SH coeffs for ennis.exr using the cmgen command line tool.
  2. Enter them on the http://ed.ilogues.com/2016/02/19/interactive-spherical-harmonic-visualization to visualize the results.

Expected behavior The dark side of the sphere should at least have some lighting, especially with high exposure but it always appears black. Perhaps I have a fundamental misunderstanding of SH’s that’s affecting my expectations.

Screenshots default exposure high exposure

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 19 (3 by maintainers)

Most upvoted comments

I’m having trouble tracking which problems are still problems 😃 I’m finally having some cycles to look at cmgen, will do this this week.