@@ -135,6 +135,7 @@ <h2>Tone Mapping Considerations for Physically-Based Rendering</h2>
135135 < a href ="#tradeoffs "> Tradeoffs</ a > < br />
136136 < a href ="#needs "> The needs of e-commerce</ a > < br />
137137 < a href ="#commerce "> Commerce tone mapper</ a > < br />
138+ < a href ="#validation "> Validation</ a > < br />
138139 < a href ="#white "> White point</ a > < br />
139140 </ p >
140141
@@ -252,7 +253,7 @@ <h3 id="purpose">The purpose of tone mapping</h3>
252253 the level of ambient lighting around it, but this data is unlikely to be
253254 available.</ p >
254255
255- < h3 id ="# tradeoffs "> Tradeoffs</ h3 >
256+ < h3 id ="tradeoffs "> Tradeoffs</ h3 >
256257
257258 < p > The difficulty with compressing a nearly infinite HDR range down to sRGB
258259 is the necessary loss of information. For the highlights to be discernable,
@@ -299,10 +300,10 @@ <h3 id="#tradeoffs">Tradeoffs</h3>
299300 system to compensate for the loss of saturation, allowing the image to still
300301 look good, instead of washed-out.</ p >
301302
302- < h3 id ="# needs "> The needs of e-commerce</ h3 >
303+ < h3 id ="needs "> The needs of e-commerce</ h3 >
303304
304305 < p > Unfortunately, the needs of e-commerce are quite different than the needs
305- of film or gaming. On a website, a 3D product model will side-by-side with
306+ of film or gaming. On a website, a 3D product model will be side-by-side with
306307 sRGB product photos, and a user may often compare the image on their screen
307308 to a printed image in a catalogue or to the physical product they have
308309 received. Of course it is exceedingly difficult to succeed in these
@@ -348,7 +349,7 @@ <h3 id="#needs">The needs of e-commerce</h3>
348349 these situations, but there will be additional challenges beyond tone
349350 mapping as well.</ p >
350351
351- < h3 id ="# commerce "> Commerce tone mapper</ h3 >
352+ < h3 id ="commerce "> Commerce tone mapper</ h3 >
352353
353354 < p > The Commerce tone mapper is designed to be simple to implement, fast to
354355 run, and faithfully reproduce color as much as possible while eliminating
@@ -375,7 +376,7 @@ <h3 id="#commerce">Commerce tone mapper</h3>
375376
376377 < p > Since tone mapping is about fitting into the sRGB cube, I intentionally
377378 avoid any use of luminance weights, as the edges of the sRGB cube are not at
378- all constant luminance. Instead I scale down colors by a simple multiplier,
379+ all constant luminance. Instead I scale down colors by a scalar multiplier,
379380 thus preserving hue and saturation while reducing brightness (there are many
380381 definitions for these terms, so please bear with my imprecision). The
381382 brightness metric I use is the maximum value of R, G, and B, and the goal is
@@ -386,10 +387,10 @@ <h3 id="#commerce">Commerce tone mapper</h3>
386387 a single parameter: the value where we switch from the linear to the
387388 nonlinear function. The purpose of the Commerce tone mapper is to be a
388389 standard and thus without parameters, so I chose 0.8 after much testing.
389- However, this is likely the most natural place to adjust the curve for HDR
390- output rather than sRGB.</ p >
390+ However, this is likely the most natural place to adjust the curve to HDR
391+ output from sRGB.</ p >
391392
392- < p > Converting 0.8 to sRGB gives 231, so any baseColor with R, B , and B
393+ < p > Converting 0.8 to sRGB gives 231, so any baseColor with R, G , and B
393394 values below 231 will be faithfully reproduced under even, white lighting.
394395 The compression reduces 255 to 243, so all highlights that would be clipped
395396 end up mapped to the 243-255 range.</ p >
@@ -407,7 +408,7 @@ <h3 id="#commerce">Commerce tone mapper</h3>
407408 only other parameter in this tone mapper controls the rate of desaturation,
408409 which I chose as 0.15, which is significantly slower to approach its
409410 asymptote than the compression function. This is what helps produce our
410- smoother gradients and hide the aggressiveness of our compression. In some
411+ smoother gradients and hide the aggressiveness of our compression. In a
411412 sense I am replacing the lost brightness with desaturation, thus giving the
412413 brain an alternate perceptual cue, which smoothly encodes several orders of
413414 magnitude more brightness than is available in the output screen.</ p >
@@ -446,12 +447,14 @@ <h3 id="#commerce">Commerce tone mapper</h3>
446447 < figcaption > Same as above, but with the input brightness in log scale.</ figcaption >
447448 </ figure >
448449
449- < p > The following demo uses a test model based on a Macbeth color chart. For each color,
450- there is a matte sphere, shiny dielectric sphere and an unlit sphere for
451- baseColor comparison. Along the top is an additional row with saturated
452- colors and shiny metallic spheres - this is useful for demonstrating the
453- problems with Linear/Clamped tone mapping. Along the left and right are
454- columns of shiny metals.</ p >
450+ < p > The following demo uses a test model based on a Macbeth color chart. For
451+ each color, there is a matte sphere, shiny dielectric sphere and an unlit
452+ sphere for baseColor comparison. Along the top is an additional row with
453+ saturated colors and shiny metallic spheres - this is useful for
454+ demonstrating the problems with Linear/Clamped tone mapping - note the
455+ extreme hue skews of the highlights. Along the left and right are columns of
456+ shiny metals.</ p >
457+
455458 < p > Try the different tone mappers under both
456459 neutral and outdoor lighting. This test is intentionally designed to show
457460 off HDR artifacts.</ p >
@@ -491,7 +494,7 @@ <h3 id="#commerce">Commerce tone mapper</h3>
491494 < figcaption > Tone mapper test demo.</ figcaption >
492495 </ figure >
493496
494- < h3 id ="# validation "> Validation</ h3 >
497+ < h3 id ="validation "> Validation</ h3 >
495498
496499 < p > The best end-to-end validation we have for color accuracy is to apply an
497500 unrealistic, analytic lighting environment: a white furnace test, where the
@@ -517,25 +520,25 @@ <h3 id="#validation">Validation</h3>
517520 shadow-intensity ="1 "
518521 >
519522 </ model-viewer >
520- < figcaption > Commerce tone mapper validation.</ figcaption >
523+ < figcaption > Commerce tone mapper white furnace validation.</ figcaption >
521524 </ figure >
522525
523- < p > The first difference is from the Fresnel effect: on shiny materials, the
526+ < p > The first difference is due to multi-scattering, which causes the
527+ dark-colored matte (front) spheres to be slightly darker than their unlit
528+ comparisons. This is intentional, as matte materials are rough, thus
529+ forming microscopic cavities that cause slight ambient occlusion and allow
530+ dark materials more light bounces to absorb energy. Accurate PBR renderers
531+ include this effect because a single material will in fact become brighter
532+ as it is polished.</ p >
533+
534+ < p > The second difference is from the Fresnel effect: on shiny materials, the
524535 reflection loses material color near grazing angles. This is a physical
525536 reality and causes the white halos on the edges of the shiny (back) spheres.
526537 If you turn the model until the unlit spheres overlap the middle of the
527538 shiny spheres, you'll see that the color match is exact at normal (center)
528539 reflection.</ p >
529540
530- < p > The second effect is multi-scattering, which causes the dark-colored
531- matte (front) spheres to be slightly darker than their unlit comparisons.
532- This is also intentional, as matte materials are rough, thus forming
533- microscopic cavities that cause slight ambient occlusion and allow dark
534- materials more light bounces to absorb energy. Accurate PBR renderers
535- include this effect because a single material will in fact become brighter
536- as it is polished.</ p >
537-
538- < h3 id ="#white "> White point</ h3 >
541+ < h3 id ="white "> White point</ h3 >
539542
540543 < p > The tl;dr of this section is that you can safely skip it. It is a
541544 discussion of the difference between physically correct and practical
0 commit comments