Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tonemapping: Added Luma-based Reinhard Tonemapping Option #3

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

DanielSturk
Copy link
Owner

Description

I propose the addition of Reinhard-Luminance tonemapping, from this blog post. On that page, this is the function reinhard_extended_luminance with max_white_l set to infinity, and then the equation simplified. According to these sources (1 2 3), the correct luminance coefficients for linear light are (0.2126, 0.7152, 0.0722), which is also the coefficients given in that blog post. The coefficients (0.299, 0.587, 0.114) which are pervasive in three.js are incorrect, but work better when the input is in sRGB/gamma space.


This is a trivial improvement to the existing Reinhard tonemapping. The difference is that Reinhard-Luminance uses lumninance in the denominator, rather than curving the color channels independently. Curving the color channels independently can result in desaturation and incorrect hue (the hue veers towards cyan, yellow, or magenta). Reinhard-Luminance does the best job of not doing that.

Exposure: 0.1 1 10
Linear image image image
Reinhard image image image
Reinhard Luminance image image image
Cineon image image image
ACES image image image

The existing tonemapping options quickly become saturated at sizeable exposure values. At low exposure values, Cineon and ACES are underexposed. Reinhard-Luminance doesn't have these issues.

Exposure: 0.1 1 10
Linear image image image
Reinhard image image image
Reinhard Luminance image image image
Cineon image image image
ACES image image image

From my testing, some of the tonemapping options look good at certain brightnesses, but only Reinhard-Luminance looks consistently good at all brightnesses.

Exposure: 0.01 0.1 1 4
Linear image image image image
Reinhard image image image image
Reinhard Luminance image image image image
Cineon image image image image
ACES image image image image

This contribution is funded by Threekit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant