Sun extraction convert part of light comming from the world to a sun light which increases the quality of the rendering. The goal of this feature is to workaround the limitation of the storage techniques used for environment lighting inside EEVEE. This first implementation works by clamping the world lighting and summing the excess lighting and (and its incomming directions) to deduce the sun position. All the lighting is then transfered into this light power. The sun angle is computed based on the directionnality of the excess lighting, the more divergent the excess lighting is, the bigger the angle. This has a few benefits: - It's stable and behave well under animation. This is because we average a lot of data. - It's fast as it can be done inside the remap shader in one pass. - It requires only one parameter, the clamp threshold. However, it has some issue: - It modifies the lighting as we change the incomming direction for excess lighting away from the chosen sun direction. This could be fixed by masking only lighting around the chosen sun direction (requires 2 passes, slower). - Given that this only average the direction, it behaves poorly if there two opposite bright light sources (it puts the sun in the middle). This could be fixed by extracting more suns, but that becomes more complex and requires even more passes. - It looks bad if the summed lighting is not supposed to be a perfect disk in specular reflections or if the sources are too divergent as the disk is too big and the approximation fails short. This could be mitigated by adding an upper bound to the sun radius. For now we workaround this issue by exposing the sun angle parameter in the UI. A more precise algorithm can be implemented in the future to avoid having to deal with these limitations. A possibility is to use importance sampling to randomize sun position. But that would be only for final render. Pull Request: https://projects.blender.org/blender/blender/pulls/121455
…
…
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Languages
C++
78%
Python
14.9%
C
3%
GLSL
1.8%
CMake
1.2%
Other
0.9%