highlight compression

Discussion related to the LuxCore functionality, implementations and API.
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

highlight compression

Post by daros »

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
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO »

Hi, daros.
What type of effects you have on your mind. Can you send a few examples?
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: highlight compression

Post by daros »

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
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO »

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.
kintuX
Posts: 810
Joined: Wed Jan 10, 2018 2:37 am

Re: highlight compression

Post by kintuX »

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
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO »

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 
kintuX
Posts: 810
Joined: Wed Jan 10, 2018 2:37 am

Re: highlight compression

Post by kintuX »

Yes, I know, but what I meant was for its Exposure to also have manual option (like Linear).
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO »

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.
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: highlight compression

Post by TAO »

Is that what you want?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: highlight compression

Post by B.Y.O.B. »

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