Commit Graph

21 Commits

Author SHA1 Message Date
Romain Guy
dee41e6120 Fix notebook 2022-02-02 10:04:48 -08:00
Romain Guy
27a5158147 Update tone mapping operators notebook 2022-01-13 15:38:19 -08:00
Romain Guy
4085336db5 Cleanup integration 2021-09-01 08:14:11 -07:00
Romain Guy
c666a79d12 Cleanup notebook 2021-08-31 19:52:56 -07:00
Romain Guy
22a464f76f Update notebook 2021-08-31 19:47:46 -07:00
Romain Guy
60e88a6069 Add Mathematica notebook for Rec.709 to LMSR matrix 2021-08-31 19:29:10 -07:00
Romain Guy
a77a9ade29 New tone mapper API (#4330)
* WIP New tone mapper API

* Implement tone mapper constructors and destructors

* Add new genertic tone mapper

* Make the generic tone mapper available in our sample UIs

* Fix warnings and crashes

* Fix generic tone mapper and graph mappers in the UI

* Add Java APIs for ToneMapper

* Implement copy/move operators for GenericToneMapper
2021-07-19 17:19:53 -07:00
Romain Guy
459f70f7b4 Update docs 2021-05-03 17:55:32 -07:00
Romain Guy
9c123a59ab New experimental tone mapper (#3850)
* New experimental tone mapper

The new tone mapper proposed in this change replaces Uchimura (see
below) and is composed of two distinct algorithms:

- The first is the customizable compression curve from Timothy Lotte
  (from GDC 2015). The curve's default parameters were chosen to
  match the overall appearance (contrast) of the ACES curves used
  as our current default tone mapper. This was done to provide a
  good migration path to making this new solution the default in
  a future version of Filament.
  The compression curve can be customized via its contrast, shoulder,
  input middle gray, output middle gray, and maximum "HDR value"
  (scene referred).
  It is important to note that the compression is only applied to
  the luminance of the input scene referred value.
- The second is a novel approach by Troy Sobotka called Exposure
  Value Invariant Luminance Scaling (or EVILS). This solution works
  on the largest chromatic channel of the input value as opposed
  to mapping all RGB channels as we do in our other tone mappers.
  The algorithm effectively scales all channel by a ratio that
  depends on both the compressed luminance from the first stage
  and the luminance of input value normalized by the largest
  channel.

This new solution offers important benefits as it manages to
preserve chromaticity for high input values. It is also designed
to provide a desirable rolloff to white on overexposure. This
means that even without gamut mapping, this solution avoids many
hue skews (red to orange, blue to purple, etc.). The results
provided by this solution are much more natural and make using
other color grading tools much easier.

* Use std::pow instead of pow

* Fix Web builds
2021-04-26 18:09:37 -07:00
Romain Guy
fbb8742cbd Add new color grading feature: shadows/mid-tones/highlights (#2623)
* Add new color grading feature: shadows/mid-tones/highlights

This feature can be used to color correct specific tonal ranges.
The tonal zones can be precisely controlled.
2020-06-02 12:28:38 -07:00
Romain Guy
50adc1f661 Add per-view color grading LUT (#2615)
* Add the ability to set a ColorGrading LUT per View

In this change, material_sandbox allows to change the tone mapping
operator at runtime.

* Add Mathematica notebook used to explore white balance

The implementation is meant to reproduce the temperature/tint sliders
founds in Adobe Lightroom. The temperature can be offset from 2,000K
to 50,000K using a slider between -100 and +100 (-1.0 to 1.0 in our
API). The range of tint was modelled after the range used for the
temperature.

* Fix various issues

- A refactoring wrongly remamed the color grading pass
- Setting a View's ColorGrading to null selects the
  default color grading options

* Implement white balance in ColorGrading
2020-05-31 19:24:42 -07:00
Mathias Agopian
b8d4b981e0 Better roughness remapping and comments
We were conflating two concepts in our comments about the roughness
remapping, which was confusing. Also changed the remapping so it 
matches a log2 mapping in our default configuration.
2020-01-06 17:42:56 -08:00
Pixelflinger
a924fbb490 Better roughness remapping for IBLs
This greatly improves the quality of semi-rough
materials.
2019-12-14 16:36:58 -08:00
Romain Guy
7d84f97dc1 Add function to compute the Fresnel Lazanyi term 2019-07-30 10:38:42 -07:00
Romain Guy
85449a08fb Give specular-color the ability to compute f82 (or other angles) (#1443) 2019-07-26 08:56:24 -10:00
Romain Guy
edc2b49196 Add Mathematica notebook for an improved Fresnel term 2019-07-25 16:28:31 -07:00
Romain Guy
7388aeff55 Add Filmic ALU tone mapping operator (#1285) 2019-06-11 11:20:01 -07:00
Romain Guy
4738e93b83 Replace Cloth DFG approximation with DFG LUT
By removing the Fresnel term (often ommitted from fabric/cloth BRDFs)
we can store the DG term for the cloth BRDF in the 3rd channel of the
existing DFG LUT.
2019-02-21 11:44:52 -08:00
Romain Guy
128ab657df Switch cloth model from Ashikhmin NDF to "Charlie" NDF (#53)
* Add new Cloth NDF

Based on the work by Estevez and Kulla, also known as the "Charlie" sheen.

* Restore DFG computation to GGX

* New proposed approximation for Cloth DFG

* Add "Charlie" cloth DFG approximation to cmgen

* Switch to "Charlie" sheen for cloth shading

* Document the new cloth NDF and DFG approximation
2018-08-08 17:22:41 -07:00
Romain Guy
f3c4582727 Update incorrect Charlie DFG (#48) 2018-08-08 10:26:26 -07:00
Romain Guy
b3d758f3b3 Initial commit 2018-08-03 10:38:22 -07:00