Welcome, Guest
Username Password: Remember me

TOPIC: Colour banding

Re: Colour banding 10 months, 4 weeks ago #209371

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 13109
  • 10 months, 4 weeks ago
schrauber wrote:
Would it make sense to selectively apply spline interpolation only to areas affected by diffusion?

I'll experiment. The way that the interpolation is developed that's pretty much what happens anyway, but it doesn't use the mask from pass one. It would mean passing the mask data from the first pass in the alpha channel which is no big deal but I don't think that you would gain much and you may actually lose. The fact that it's interpolating from outside the masked area at the moment means that it's smoothing out the pixels around the masked area. That's important, because it should mean that you get a smoother result.

As I said, I'll experiment.
Last Edit: 10 months, 4 weeks ago by jwrl.

Re: Colour banding 10 months, 4 weeks ago #209372

  • schrauber
  • Pro User
  • OFFLINE
  • Platinum Boarder
  • Posts: 4616
  • 10 months, 4 weeks ago
jwrl wrote:
.. The fact that it's interpolating from outside the masked area at the moment means that it's smoothing out the pixels around the masked area. That's important, because it should mean that you get a smoother result ..

Just some brainstorming :

I could imagine that the pixel mask would have to be blurred, which would increase the GPU load considerably.

For some media I had the impression that it would be advantageous if first the "artefact-blur" was selectively blurred, and in the following step the "Uncontour" added minimal diffusion for export.Using both steps in one effect, spline interpolation might use the mask of the blur effect?
However, I had not yet implemented the mask output in this effect, and the question of mask dimensions would arise (and one of the nine Blur samplers is still wrong ).

For the blurring, I also had the idea of using the sampler positions from the diffusion random generator (if the GPU load is not negatively affected). Then a slight diffusion would probably occur automatically with fewer samples?

For me, however, this is all basic research

My original idea was to determine the dimensions between the color changes of similar RGB values, and from this data to calculate the ideal interpolation of the pixels in between. But I had a lot of problems, especially the number of samples. So I tried selective blurring with a manually adjustable radius.
Mainly automatically translated
--------------------------------------------
Software: Lightworks 2020.1.1 & Beta 2021.x; || Windows 10 Home 1909, 64 Bit
Hardware: Intel i5-4440 (3,1 GHz); || RAM: 8 GB; || Intel HD Graphics 4600 (can use max. 2 GB of shared RAM)
Last Edit: 10 months, 4 weeks ago by schrauber.

Re: Colour banding 10 months, 4 weeks ago #209373

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 13109
  • 10 months, 4 weeks ago
schrauber wrote:
I could imagine that the pixel mask would have to be blurred, which would increase the GPU load considerably.

It would probably be possible to pass the mask in the alpha channel then do the blur, then the luma/chroma separation and mask it before applying it. However that would cause the interpolation mix to drop off faster than it now does which may not be desirable. You would also have to create a separate luma/chroma splitting function.

schrauber wrote:
I also had the idea of using the sampler positions from the diffusion random generator (if the GPU load is not negatively affected). Then a slight diffusion would probably occur automatically with fewer samples?

Possibly, but because that is generated in a different pass to the blur you would have to do it all over again. I can't see any significant gain in doing that. I experimented with reducing the samples in the blur and my conclusion was that khaver had pretty much nailed it, so I left it as it was.

A little history: if you compare my version with khaver's you'll see that they look quite different. They're actually functionally the same, but I did that restructure when I was planning on reducing the samples to eight. It made each sample pass a self-contained module which I could comment out as I needed to. I was just too lazy to go back to khaver's original when I decided after experimenting to stick with his sampling.
Last Edit: 10 months, 4 weeks ago by jwrl.

Re: Colour banding 10 months, 4 weeks ago #209374

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 13109
  • 10 months, 4 weeks ago
I've experimented with a version that passes masking from pass one to use as a mask in pass 2. I can see no difference in the end result. It just seems like more work for very little gain. Try it and see what you think.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
Last Edit: 10 months, 4 weeks ago by jwrl.

Re: Colour banding 10 months, 4 weeks ago #209377

  • G0bble
  • Pro User
  • OFFLINE
  • Gold Boarder
  • Posts: 292
  • 10 months, 4 weeks ago
schrauber wrote:

Is "Banding-Test-Sample-01-QHD.avi" the file you imported into Lightworks?
"Banding Test Sample-01-QFHD.avi" you seem to have exported with Lightworks. Did you do the color correction with Lightworks? Have you already applied an effect to it to reduce color banding?


The QFHD which looks slightly more bluish is graded. No attempt was made to reduce banding. This particular clip is tricky because none of my existing color presets are doing a good job - it was taken at relatively shallow depth. Hence it was a quick attempt just enough to accentuate the banding ... the greenish footage is the original Gopro with its raw WB setting in Protune.

HTH
G
Last Edit: 10 months, 4 weeks ago by G0bble.

Re: Colour banding 10 months, 3 weeks ago #209402

  • schrauber
  • Pro User
  • OFFLINE
  • Platinum Boarder
  • Posts: 4616
  • 10 months, 3 weeks ago
jwrl wrote:
Try it and see what you think.

Thank you.

My first tests ..
When applied to this test image, the corals now have their full sharpness and contrast, regardless of the sharpness settings.

The advantage is not big, of course, and invisible with many media. But the GPU load increase is minimal.
Is the "Image sharpen" slider also necessary for the dithering itself, or can the new effect do without it?
Mainly automatically translated
--------------------------------------------
Software: Lightworks 2020.1.1 & Beta 2021.x; || Windows 10 Home 1909, 64 Bit
Hardware: Intel i5-4440 (3,1 GHz); || RAM: 8 GB; || Intel HD Graphics 4600 (can use max. 2 GB of shared RAM)

Re: Colour banding 10 months, 3 weeks ago #209407

  • schrauber
  • Pro User
  • OFFLINE
  • Platinum Boarder
  • Posts: 4616
  • 10 months, 3 weeks ago
G0bble wrote:
The QFHD which looks slightly more bluish is graded...

Thank you.
When viewed with a strong zoom, both videos have a slight noise that looks like tiny artifacts. This doesn't seem to be optimal for the dithering method. So I combined two effects.
With the artifact blur effect I removed the original noise and reduced color banding. As a second effect, the UncountourV2 effect (default settings) adds noise.

In the Lightworks preview, the result looks much better than with my free export, but I still see improvements. Here are my export tests with different effect combinations, and for comparison a free export without effect: we.tl/t-uMwa1VJNIw (The link only works for a few days.)

For comparison the preview as PNG image (In the zip file, so that the forum software allows the upload)
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
Mainly automatically translated
--------------------------------------------
Software: Lightworks 2020.1.1 & Beta 2021.x; || Windows 10 Home 1909, 64 Bit
Hardware: Intel i5-4440 (3,1 GHz); || RAM: 8 GB; || Intel HD Graphics 4600 (can use max. 2 GB of shared RAM)
Last Edit: 10 months, 3 weeks ago by schrauber.

Re: Colour banding 10 months, 3 weeks ago #209410

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 13109
  • 10 months, 3 weeks ago
schrauber wrote:
Is the "Image sharpen" slider also necessary for the dithering itself, or can the new effect do without it?

That is actually a relabelling of the luma interpolation setting. Where luma interpolation is unnecessary, leaving it set to 50% is a good compromise between no sharpening and no luma interpolation. However depending on the image it may be necessary to adjust it, and I don't think that it would be a good idea to remove it. The result would be a permanent unsharpen effect, which wouldn't be desirable.
Last Edit: 10 months, 3 weeks ago by jwrl.

Re: Colour banding 10 months, 3 weeks ago #209418

  • G0bble
  • Pro User
  • OFFLINE
  • Gold Boarder
  • Posts: 292
  • 10 months, 3 weeks ago
schrauber wrote:
G0bble wrote:
The QFHD which looks slightly more bluish is graded...

Thank you.
When viewed with a strong zoom, both videos have a slight noise that looks like tiny artifacts. This doesn't seem to be optimal for the dithering method. So I combined two effects.
With the artifact blur effect I removed the original noise and reduced color banding. As a second effect, the UncountourV2 effect (default settings) adds noise.

In the Lightworks preview, the result looks much better than with my free export, but I still see improvements. Here are my export tests with different effect combinations, and for comparison a free export without effect: we.tl/t-uMwa1VJNIw (The link only works for a few days.)

For comparison the preview as PNG image (In the zip file, so that the forum software allows the upload)


Looks way better! However I am finding it hard to tell if both_effects is better than artifacts-blur version of your samples. Do you see some softness in the sea creature blowing in the water? When I view the original I cant help feeling it is sharper in the detail at the bottom area of the image ... but it is still very much an acceptable compromise if any.

G
Last Edit: 10 months, 3 weeks ago by G0bble.

Re: Colour banding 10 months, 3 weeks ago #209434

  • schrauber
  • Pro User
  • OFFLINE
  • Platinum Boarder
  • Posts: 4616
  • 10 months, 3 weeks ago
G0bble wrote:
.. However I am finding it hard to tell if both_effects is better than artifacts-blur version of your samples..

My examples were not optimal for demonstration purposes.
In the example I left the Uncountour effect in the default settings. The effect has a higher effect at higher thresholds, as I set in Artefaks Blur effect. However, your color corrected video requires a threshold between 10 and 15 to remove color banding well. These values are outside the normal setting range of the Uncountour effect. Higher values by keyboard increase the noise too much.

Depending on the media and settings, the results of the Artifact Blur effect may look too blurred. The graininess of the Uncountour effect can be more advantageous in this respect.

But it all depends on the export, and I didn't test You-Tube.
Mainly automatically translated
--------------------------------------------
Software: Lightworks 2020.1.1 & Beta 2021.x; || Windows 10 Home 1909, 64 Bit
Hardware: Intel i5-4440 (3,1 GHz); || RAM: 8 GB; || Intel HD Graphics 4600 (can use max. 2 GB of shared RAM)
Last Edit: 10 months, 3 weeks ago by schrauber.

Re: Colour banding 10 months, 3 weeks ago #209443

  • schrauber
  • Pro User
  • OFFLINE
  • Platinum Boarder
  • Posts: 4616
  • 10 months, 3 weeks ago
Prototype update "Artifacts-blur":
- minimized GPU load
- bug fixing
- Slider reordered, renamed and rescaled:
"Artifact depth, bits": The RBG color differences are caused by artifacts or color banding (adjustable in bits, related to 8-bit exports). The setting 8 means that everything is blurred.

- New: To simplify the adjustability, this effect can now also display the red blur mask
This image is hidden for guests. Please log in or register to see it.

Even if pixels are blurred with absolutely identical RGB values, this is displayed in the mask (although these pixels are not changed).

I have updated the first post of this thread.

Download:
This attachment is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
  • Attachment This image is hidden for guests. Please log in or register to see it.
  • Attachment This image is hidden for guests. Please log in or register to see it.
  • Attachment This image is hidden for guests. Please log in or register to see it.
Mainly automatically translated
--------------------------------------------
Software: Lightworks 2020.1.1 & Beta 2021.x; || Windows 10 Home 1909, 64 Bit
Hardware: Intel i5-4440 (3,1 GHz); || RAM: 8 GB; || Intel HD Graphics 4600 (can use max. 2 GB of shared RAM)
Last Edit: 10 months, 3 weeks ago by schrauber.

Re: Colour banding 10 months, 3 weeks ago #209540

  • G0bble
  • Pro User
  • OFFLINE
  • Gold Boarder
  • Posts: 292
  • 10 months, 3 weeks ago
schrauber wrote:

In the Lightworks preview, the result looks much better than with my free export, but I still see improvements.


On the side and not related to the custom effects you are working so hard on - This is one of the big reasons I am psychologically stuck (apart from lack of time on work days) and refuse to simply get it done and move on from finishing one project to another. The preview window looks just fantastic but the exports look just pathetic in comparison. The perfectionist in me wont let me proceed until I "master" an NLE without having accomplished even a single project till date... And I have 5 years of vacation videos lying around waiting to be edited.

PS: I just got Boris FX activated with an outright license I got when I purchased LWKS outright on BF. It has a de-noiser and stablizer so I guess I wont need Resolve much. Do you recommend adding the BCC Denoiser in the workflow before applying your effects?
G
Last Edit: 10 months, 3 weeks ago by G0bble.

Re: Colour banding 10 months, 3 weeks ago #209543

  • schrauber
  • Pro User
  • OFFLINE
  • Platinum Boarder
  • Posts: 4616
  • 10 months, 3 weeks ago
No, but I don't have any pro-features to test.
With your pro license you also have more export options. Just do test exports.
What YouTube does with it might also be testable.

If you make color corrections in Lightworks, the order of the effects and the project GPU precision setting can influence the results and flexibility.
Mainly automatically translated
--------------------------------------------
Software: Lightworks 2020.1.1 & Beta 2021.x; || Windows 10 Home 1909, 64 Bit
Hardware: Intel i5-4440 (3,1 GHz); || RAM: 8 GB; || Intel HD Graphics 4600 (can use max. 2 GB of shared RAM)

Re: Colour banding 10 months, 3 weeks ago #209545

  • hugly
  • OFFLINE
  • Platinum Boarder
  • Posts: 26394
  • 10 months, 3 weeks ago
FWIW

The only dedicated de-banding filter I could find is Boris Deband. It's part of the Sapphire plugins, namely the Blur unit. Beside of other hosts it's available as OFX plugin. It will neither run with the recent Boris plugin interface nor stand alone, but perhaps with the OFX interface announced for some future release of Lightworks. The downside: Even if purchased only with the Blur unit, it's comparably pricey. I have no idea how effectively it works.



borisfx.com/support/documentation/sapphire/ofx/deband/
It's better to travel well than to arrive...

Re: Colour banding 10 months, 2 weeks ago #209946

  • schrauber
  • Pro User
  • OFFLINE
  • Platinum Boarder
  • Posts: 4616
  • 10 months, 2 weeks ago
schrauber wrote:
.. One variant that has not yet been tested in the thread is colour depth dithering..

Here is the prototype now:
This image is hidden for guests. Please log in or register to see it.



Download:
This attachment is hidden for guests. Please log in or register to see it.


Normally you can use the default settings. If the right conditions are met, the effect should do everything fully automatically.
Unlike the other two effects, the effect does not blur or pixel scatters.

If you use 16 or 32 bit color depth in the effect path, but can only export 8 bit, then the effect creates an apparent higher color depth for you by applying a mostly invisible grain of only 1 bit with calculated density.
So it only minimizes the colour banding caused by the 8 bit output. Colour banding that is already present in the media or has been increase by colour corrections should be pre-treated with the "Artefact Blur" effect (with at least 16-bit GPU precision). This dithering effect can improve the result at the very end of the effects pipeline by minimizing output 8-bit banding.
Note, however, that this effect is intended for something similar to high-end 8-bit applications, which requires a high quality export format. The free export format is completely unsuitable for this (due to the compression I saw even worse results than without this effect). With my free license, I only see the improvements when I preview the improvements, or when I save this preview as a PNG image.

More options:
The effect can also be useful if:
- Using 10 bit or better media (not tested yet).
- You create gradients with effects
- You use strong blur effects, whose gradients lead to colour banding in 8-bit output.

Details:
:pinch: Warning: Spoiler!


This effect can therefore not replace any of the other effects. Each of these effects has different tasks for different requirements.
Mainly automatically translated
--------------------------------------------
Software: Lightworks 2020.1.1 & Beta 2021.x; || Windows 10 Home 1909, 64 Bit
Hardware: Intel i5-4440 (3,1 GHz); || RAM: 8 GB; || Intel HD Graphics 4600 (can use max. 2 GB of shared RAM)
Last Edit: 10 months, 2 weeks ago by schrauber. Reason: Various translation errors
Time to create page: 0.50 seconds
Scroll To Top