Compositor: Future of Glare node #124176

Open
opened 2024-07-04 17:48:51 +02:00 by Omar Emara · 3 comments
Member

The Glare node suffers from UX and usability problems as evident by the feedback received on the new
Bloom mode, as well as the flourishing of third party glare implementations; which is great, but a
telling sign that the built-in solution is not great. This task shall gather some thoughts and
investigations into the future of the Glare node, which we intent to tackle in the short term. Each
of following sections discuss an area of improvement to the node.

General

Problems

• Non of the settings are exposed as inputs, so it is hard to create node groups that contain Glare
nodes.
• The quality setting sometimes affect the final size of the Glare, and causes shifts in the
highlights.

N/A.

Proposed solutions

• Turn settings into single-value inputs.
• The quality setting should be implemented using a 1-step or 2-step downsampling filter.

Highlights Extraction

Problems

• Highlights have a sharp cutoff at the threshold.
• Some highlights are too bright and produce abnormally large glare outputs.

Investigation

• Most smoothing functions that we looked into caused no zero output at the zero point, or amplified
the highlights. Keeping the highlights linear seems impossible, a non linear curve like the bezier
curve used by EEVEE should be used.

Proposed solutions

• Either introduce a Smoothness parameters or always smooth the highlights.
• Introduce a Clamp parameter to suppress very high highlights.

Combining Glare

Problems

• The Mix parameter has very unintuitive range -1 to 1 range.
• We can't boost the energy of the glare beyond what is generated, we can only suppress it.
• The 0 to 1 range is useless, except for the 0 and 1 values.
• No way to Tint the color of the highlights.

N/A.

Proposed solutions

• Remove the Mix parameter and replace it with a simple Strength input, whose range is from zero up.
• Provide 3 outputs from the node:
• Image. Which is the input plus the glare.
• Glare. The generated glare only. Should it be affected by the strength?
• Highlights. The highlights only.
• Provide a Tint parameter. How should this affect glare modes which already modulate colors.

Simple Star

Problems

• Too slow to compute, especially on the GPU.
• Unintuitive control. Iterations and Fade. Both affect the radius of the impulse response of the
filter. Both affect the shape of the filter somewhat.
• The horizontal and vertical passes are simply added, creating a bump at the center of the filter.
• Resolution dependent.
• The filter impulse response seems arbitrary.

Investigation

The impulse response of the Simple Star seems rather similar to a Gaussian.

Proposed solutions

• Reimplement using a recursive Gaussian implementation.
• Radius parameter that is resolution independent.
• Consider consolidating with Streaks.

Streaks

Problems

• Too slow to compute, especially on the GPU.
filter.
• All streaks are simply added, creating a bump at the center of the filter.
• Resolution dependent.
• The filter impulse response seems arbitrary.

Investigation

The impulse response of Streaks seems rather similar to a Poisson window. The Fade parameter makes
the response tend to a rectangle window.

The number of streaks can be odd, which means we can't use a recursive symmetric filter. But we can
convert the filter into a parallel bank and only use its causal parts. A quick experiment on
recursive blur seems to indicate that this might work.

Proposed solutions

• Design a parallel interconnection recursive exponential filter whose radius can be controlled.
• Radius parameter that is resolution independent.
• Consider consolidating with Simple Star.

Fog Glow

Problems

• The kernel is arbitrary and produces non realistic results.
• The kernel size is artificially limited to 9 possible sizes.
• The kernel size is affected by the Quality setting.
• Resolution dependent.

N/A.

Proposed solutions

• Use the kernel from the paper "Physically-Based Glare Effects for Digital Images".
• Allow any kernel size, relative to input size.

Bloom

• The size is limited to 9 possible sizes.

N/A.

Proposed solutions

• Allow fractional kernel sizes relative to image size. Either use the EEVEE approach, or consider
zero padding relative to the distance between the bounding power of twos.

Sun Beams

Problems

• Should not be its own node, as most users don't know how to use it.
• Too slow.

N/A.

Proposed solutions

• Join with the Glare node as a new mode.
• Use Monte Carlo line integration for faster execution similar to the Lens Distort node.
• Add a "Distant Light" mode where the rays are parallel. Implement using the same methods as
streaks.

Custom Kernel

N/A.

N/A.

Proposed solutions

• Add an option to use a custom glare kernel. Convolved with the highlights using FFT similar to the
Fog Glow implementation.
20 KiB
19 KiB
18 KiB
added the labels 2024-07-04 17:48:52 +02:00

Idea for Sun Beams, maybe have a way to automatically calculate the position using the brightest point or an average?

Idea for Sun Beams, maybe have a way to automatically calculate the position using the brightest point or an average?
Author
Member

@xZaki I am not sure if this will be particularly useful, because the Sun Beam position should be set to the point where the light comes from, not where it appears. So if you have a window, the position shouldn't be at the window, but somewhere far where the sun is located for instance.

@xZaki I am not sure if this will be particularly useful, because the Sun Beam position should be set to the point where the light comes from, not where it appears. So if you have a window, the position shouldn't be at the window, but somewhere far where the sun is located for instance.
Contributor

Single value sockets not existing is far bigger problem than just Glare node. It makes building reusable node groups almost impossible outside very easy cases. You either have to use python solutions, or node group assets but change stuff within when you use it.

With the asset-heavy direction Blender is going this is pretty huge showstopper and I hope time can be found to expose field/single-value sockets and link drawings like geometry nodes.

Single value sockets not existing is far bigger problem than just Glare node. It makes building reusable node groups almost impossible outside very easy cases. You either have to use python solutions, or node group assets but change stuff within when you use it. With the asset-heavy direction Blender is going this is pretty huge showstopper and I hope time can be found to expose field/single-value sockets and link drawings like geometry nodes.
added this to the Compositing project 2024-07-05 10:16:47 +02:00
No Milestone
No project
No Assignees
3 Participants