highlight compression

Discussion related to the LuxCore functionality, implementations and API.
daros
Posts: 75
Joined: Thu Dec 12, 2019 3:25 pm

highlight compression

Post by daros » Sat Feb 20, 2021 5:40 pm

Hi, I know this has been discussed on blenderartists and that the developers think this should be more of a Blender feature than a luxcore feature, which from a point of view that associates Luxcore exclusively with Blender is correct. However, as some people are now porting Luxcore to other 3D apps like 3dmax, or in our case FELIX rendering, it might, if it's not a huge task, be a good idea to implement some filters of this kind. This would help align Lux's output quality across different apps.

User avatar
TAO
Developer
Posts: 365
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO » Sat Feb 20, 2021 5:43 pm

Hi, daros.
What type of effects you have on your mind. Can you send a few examples?
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 378#p28378

daros
Posts: 75
Joined: Thu Dec 12, 2019 3:25 pm

Re: highlight compression

Post by daros » Sat Feb 20, 2021 6:14 pm

in corona it's called Highlight compression:
https://coronarenderer.freshdesk.com/su ... mpression-

in Maxwell it's called "burn", In rawtherapee and photoshop, again, it's called Highlight Compression.
I don't know if there is a standard math behind. However if i apply highlight compression in Rawtherapee to a linear tonemmapped Luxcore rendering i get something very similar to a Maxwell rendering with a burn turned on.

Luxcore lux-linear tone mapping.
no compression.jpg

Luxcore lux-linear tone mapping + rawtherapee highlight compression.
compression.jpg

User avatar
TAO
Developer
Posts: 365
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO » Mon Feb 22, 2021 8:03 am

I think in luxCore we already have several parameters for it, maybe B.O.B.Y is the best person to answer this question.
By the way, the Clamp option will do a good job in situations like this.
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 378#p28378

kintuX
Posts: 621
Joined: Wed Jan 10, 2018 2:37 am

Re: highlight compression

Post by kintuX » Mon Feb 22, 2021 11:35 am

Note:
"Highlight compression" or "Burn" are parameters of Reinhard tone mapping.
More about it from LuxCore render wiki:

"Reinhard02 Tonemapper
An implementation of the reinhard tonemapper: http://www.cmap.polytechnique.fr/~peyre ... raphic.pdf
Automatic."


& Clamping is totally different thing.

But I agree, it would be great to also have manual control over it ;)

User avatar
TAO
Developer
Posts: 365
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO » Mon Feb 22, 2021 11:42 am

You can find the description on wiki
https://wiki.luxcorerender.org/LuxCore_ ... REINHARD02

Type: TONEMAP_REINHARD02
Property name Property type Default value Description

Code: Select all

film.imagepipelines.<pipeline #>.<plugin #>.type 	string 	"TONEMAP_REINHARD02" 	reinhard tonemapping
film.imagepipelines.<pipeline #>.<plugin #>.prescale 	float 	1.0 	reinhard prescale
film.imagepipelines.<pipeline #>.<plugin #>.postscale 	float 	1.2 	reinhard postscale
film.imagepipelines.<pipeline #>.<plugin #>.burn 	float 	3.75 	reinhard burn 
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 378#p28378

kintuX
Posts: 621
Joined: Wed Jan 10, 2018 2:37 am

Re: highlight compression

Post by kintuX » Mon Feb 22, 2021 4:06 pm

Yes, I know, but what I meant was for its Exposure to also have manual option (like Linear).

User avatar
TAO
Developer
Posts: 365
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO » Mon Feb 22, 2021 4:36 pm

kintuX wrote:
Mon Feb 22, 2021 4:06 pm
Yes, I know, but what I meant was for its Exposure to also have manual option (like Linear).
We have linear too and you can combine as much exposure as you want.
Also, you can have multiple image pipelines too.

For example

Code: Select all

Property(Options.filmPilelines + "0.0.type")("TONEMAP_AUTOLINEAR") <<
Property(Options.filmPilelines + "0.1.type")("GAMMA_CORRECTION") <<
Property(Options.filmPilelines + "0.1.value")(2.2f) <<
Property(Options.filmPilelines + "0.2.type")("TONEMAP_REINHARD02") <<
Property(Options.filmPilelines + "1.0.type")("TONEMAP_AUTOLINEAR") <<
Property(Options.filmPilelines + "1.1.type")("GAMMA_CORRECTION") <<
Property(Options.filmPilelines + "1.1.value")(2.2f)
I add 3 different exposure, etc for the first imagepipleline and 2 for the second one.
You can provide all options or let a few parts be default as i do for TONEMAP_REINHARD02.
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 378#p28378

User avatar
TAO
Developer
Posts: 365
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO » Mon Feb 22, 2021 4:43 pm

Is that what you want?
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 378#p28378

User avatar
B.Y.O.B.
Developer
Posts: 3972
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: highlight compression

Post by B.Y.O.B. » Mon Feb 22, 2021 4:59 pm

The problem with reinhard is that it's auto-adapting to the image brightness, leading to confusing behaviour like described here: https://wiki.luxcorerender.org/BlendLux ... ng_happens
When I change the brightness of my lamp, nothing happens
You are probably using an automatic tonemapper which adjusts itself to the changed brightness, making it seem like the brightness did not change.

Solution: Use a non-automatic tonemapper (camera settings -> ImagePipeline).

When I make one of my lights brighter, all the other lights get darker (or vice versa)
You are using an automatic tonemapper which tries to keep the image at the same brightness, making it seem like the brightness of the lamps changed.

Solution: Use a non-automatic tonemapper (camera settings -> ImagePipeline).
It also makes it unsuitable for animations.

So reinhard can not be a replacement for highlight compression.

Post Reply