Image Pipeline etc.

Use this forum for general user support and related questions.
Gobo
Posts: 11
Joined: Fri Oct 25, 2019 2:12 pm
Location: Berlin

Image Pipeline etc.

Post by Gobo » Wed Sep 16, 2020 9:17 am

Hi,

I like working with LuxCore a lot, but i seem to be running into things i don't understand or get wrong with the image pipeline. My issues revolve around white balancing, tonemapping and light group compositing. A few examples:

- Empty scene, emitter plane with 3000 Kelvin Blackbody. Image Pipeline on Camera - White Balance set to 3000K. Should be white, seems to do nothing

- I can add spectral textures as Blackbody to geo emitters, yet i do not find a way add them to light sources, where they would be at least as handy

- Reinhard Tonemapper does what it should, yet is (sanely) not propagated into the light group render AOVs. If i composit the AOVs in Blenders Compositor, there is no Reinhard, just the "Tonemapper", which seems to work very strangely and i do not get anything but very washed out results compared to the Reinhard from the LuxCore image pipeline

Does anyone have a neat workflow on how to use the image pipeline together with lightgroups and the compositor?

Thanks!
Last edited by Gobo on Wed Sep 16, 2020 9:30 am, edited 1 time in total.

marcatore
Donor
Posts: 446
Joined: Wed Jan 10, 2018 8:04 am

Re: Image Pipeline etc.

Post by marcatore » Wed Sep 16, 2020 9:22 am

About white balance there is something strange.
In my opinion is not working well or, at least, I can't understand how should it work.

It's very easy to reproduce, as you wrote.

User avatar
Dade
Developer
Posts: 4689
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Image Pipeline etc.

Post by Dade » Wed Sep 16, 2020 9:34 am

Gobo wrote:
Wed Sep 16, 2020 9:17 am
- Empty scene, emitter plane with 3000 Kelvin Blackbody. Image Pipeline on Camera - White Balance set to 3000K. Should be white, seems to do nothing.
But are you working inside Blender or using directly the LuxCore API ?
Gobo wrote:
Wed Sep 16, 2020 9:17 am
- Reinhard Tonemapper does what it should, yet is (sanely) not propagated into the light group render AOVs.
Reinhard is an "auto" balancing tone mapper, it uses the total image luminance for his work and, indeed, the total image luminance of a single light group is different from the luminance of all light groups.

You need to use a "fixed" tonemapper (something like linear tonemapping) in order to apply the same parameters to the single light group and to the sum of them.
Support LuxCoreRender project with salts and bounties

Gobo
Posts: 11
Joined: Fri Oct 25, 2019 2:12 pm
Location: Berlin

Re: Image Pipeline etc.

Post by Gobo » Wed Sep 16, 2020 9:36 am

Sorry, forgot to add that - all inside blender.

User avatar
Dade
Developer
Posts: 4689
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Image Pipeline etc.

Post by Dade » Wed Sep 16, 2020 9:38 am

Gobo wrote:
Wed Sep 16, 2020 9:36 am
Sorry, forgot to add that - all inside blender.
Ok, I will test the case you described and see what happen.
Support LuxCoreRender project with salts and bounties

Gobo
Posts: 11
Joined: Fri Oct 25, 2019 2:12 pm
Location: Berlin

Re: Image Pipeline etc.

Post by Gobo » Wed Sep 16, 2020 10:18 am

Would it be silly to think the LuxCore image pipeline would make sense as a single Node for use in the Blender Compositor?

User avatar
Dade
Developer
Posts: 4689
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Image Pipeline etc.

Post by Dade » Thu Sep 17, 2020 1:51 pm

Dade wrote:
Wed Sep 16, 2020 9:38 am
Ok, I will test the case you described and see what happen.
I have reworked the support for white balance plugin (and light groups white balance). The source of the problem was that white balance plugin was applying the the white point, not reversing it. So the proposed test (3000K black body + 3000K white balance) was shifting the temperature 2 times in the same direction instead of applying it to light source and than reversing it in post processing.

I have added two new parameters both to white balance plugin and light groups support: ".reverse" and ".normalize".

Code: Select all

film.imagepipeline.0.type = WHITE_BALANCE
film.imagepipeline.0.temperature = 3000
# Default value: true
film.imagepipeline.0.reverse = 1
# Default value: false
film.imagepipeline.0.normalize = 0
#
film.imagepipeline.1.type = TONEMAP_LINEAR
film.imagepipeline.1.scale = 1
#
film.imagepipeline.2.type = GAMMA_CORRECTION
film.imagepipeline.2.value = 2.2
So the behavior is now symmetric with blackbody texture settings:

Code: Select all

scene.textures.lighttex.type = blackbody
scene.textures.lighttex.temperature = 3000
scene.textures.lighttex.normalize = 0
and you get the expected behavior according the normal photographic white balance process.

This is a rendering with black body 3000K and white balance 6500K:

wb1.jpg

and it is "warm" as expected. This is a rendering with black body 3000K and white balance 3000K:

wb2.jpg

and it is "neutral" as expected. This is a rendering with black body 6500K and white balance 3000K:

wb3.jpg

and it is "cold" as expected.

This should be coherent with what people expect.

Note: by setting ".reverse" default value to "true", I'm breaking the compatibility with the past behavior but this shouldn't be a big deal.
Support LuxCoreRender project with salts and bounties

Gobo
Posts: 11
Joined: Fri Oct 25, 2019 2:12 pm
Location: Berlin

Re: Image Pipeline etc.

Post by Gobo » Thu Sep 17, 2020 2:00 pm

Thank you very much, master!
└(=^‥^=)┐

marcatore
Donor
Posts: 446
Joined: Wed Jan 10, 2018 8:04 am

Re: Image Pipeline etc.

Post by marcatore » Thu Sep 17, 2020 8:30 pm

Great. Thank you very much!!!

marcatore
Donor
Posts: 446
Joined: Wed Jan 10, 2018 8:04 am

Re: Image Pipeline etc.

Post by marcatore » Fri Sep 18, 2020 10:32 am

tested with the daily build but it seems not working.
And, actually it seems it brokes also the tonemapping.

I mean inside Blender, not tested with the standalone.

simple scene. one area light, one cam, a cube and a plane (both with disney mat).
the light (with power mode) and the cam is set like this and I get correctly this yellowish render
Image

The I switch ON white balance
Image

Then I select "reverse" as white balance mode
Image

Post Reply