RADIANCE_GROUP in OUTPUT_SWITCHER?

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

RADIANCE_GROUP in OUTPUT_SWITCHER?

Post by B.Y.O.B. »

Hi,

does the output switcher support light groups?
In my tests it throws "Unknown film output type in Film::String2FilmChannelType(): RADIANCE_GROUP"

The LuxCore method that throws this error supports "RADIANCE_PER_PIXEL_NORMALIZED" and "RADIANCE_PER_SCREEN_NORMALIZED".
Should I use one of those instead? Which one? Or is this something else?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: RADIANCE_GROUP in OUTPUT_SWITCHER?

Post by Dade »

Film "channels" and "outputs" are similar but not exactly the same: an output is always the product of one or more channels. While a channel is only the product of rendering.

For instance the film DEPTH output is the product of only the DEPTH channel. On other extreme, the RGBA_IMAGEPIPELINE output is the result of all RADIANCE_PER_PIXEL_NORMALIZED (there is one for each radiance group) + all RADIANCE_PER_SCREEN_NORMALIZED (there is one for each light group and only if using BIDIRCPU or LIGHTCPU) + ALPHA channel + running the complete image pipeline.

What exactly do you need ? To extract a single radiance group ? To extract all radiance groups ?

To recap: Rendering => Film Channels => Film Outputs.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: RADIANCE_GROUP in OUTPUT_SWITCHER?

Post by Dade »

Just to directly answer to the question: no because RADIANCE_GROUP is an "output" while OUTPUT_SWITCHER transform one of the channels in an output.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: RADIANCE_GROUP in OUTPUT_SWITCHER?

Post by B.Y.O.B. »

I need to tonemap each radiance group.
Basically what I describe here: viewtopic.php?f=5&t=9&p=2276#p2249

Maybe I should write a new imagepipeline plugin to feed a radiance group into an imagepipeline?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: RADIANCE_GROUP in OUTPUT_SWITCHER?

Post by Dade »

B.Y.O.B. wrote: Sun Mar 18, 2018 9:43 pm I need to tonemap each radiance group.
Basically what I describe here: viewtopic.php?f=5&t=9&p=2276#p2249

Maybe I should write a new imagepipeline plugin to feed a radiance group into an imagepipeline?
You can obtain a single radiance group by setting all radiance group scales to 0 but one. However the scales are a global setting (not local to the image pipeline) so you can not use multiple image pipelines to get a single radiance group out of each one.

So you can run the same image pipeline multiple times while changing the scales in-between or write a dedicated plugin.

The other option is to make the radiance group scales a setting of the image pipeline and not of the film. This solution may be more flexible and powerful, let me check how complex it is. It would be quite powerful: you could get many images out of a single rendering with many different setting for the radiance group scales.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: RADIANCE_GROUP in OUTPUT_SWITCHER?

Post by Dade »

Dade wrote: Sun Mar 18, 2018 10:45 pm The other option is to make the radiance group scales a setting of the image pipeline and not of the film. This solution may be more flexible and powerful, let me check how complex it is. It would be quite powerful: you could get many images out of a single rendering with many different setting for the radiance group scales.
Ok, now, radiance channel scales are a setting of each image pipeline. The "film.radiancescales.*" properties have been moved under "film.imagepipelines.#.radiancescales.*". However they can be still parsed alone, without the need to redefine all image pipelines.

For instance, the definition of 2 image pipelines with 2 set of different scales (for 2 light groups):

Code: Select all

################################################################################
film.imagepipelines.0.0.type = TONEMAP_REINHARD02
film.imagepipelines.0.1.type = GAMMA_CORRECTION
film.imagepipelines.0.1.value = 2.2
##
film.imagepipelines.1.0.type = TONEMAP_LINEAR
film.imagepipelines.1.0.scale = 1.0
film.imagepipelines.1.1.type = GAMMA_CORRECTION
film.imagepipelines.1.1.value = 2.2
################################################################################
film.imagepipelines.0.radiancescales.0.globalscale = 1.0
film.imagepipelines.0.radiancescales.0.temperature = 4000.0
film.imagepipelines.0.radiancescales.0.rgbscale = 1.0 1.0 1.0
film.imagepipelines.0.radiancescales.0.enabled = 0
film.imagepipelines.0.radiancescales.1.globalscale = 2.0
film.imagepipelines.0.radiancescales.1.temperature = 6500.0
film.imagepipelines.0.radiancescales.1.rgbscale = 1.0 1.0 1.0
film.imagepipelines.0.radiancescales.1.enabled = 1
##
film.imagepipelines.1.radiancescales.0.globalscale = 2.0
film.imagepipelines.1.radiancescales.0.temperature = 4000.0
film.imagepipelines.1.radiancescales.0.rgbscale = 1.0 1.0 1.0
film.imagepipelines.1.radiancescales.0.enabled = 1
film.imagepipelines.1.radiancescales.1.globalscale = 1.0
film.imagepipelines.1.radiancescales.1.temperature = 6500.0
film.imagepipelines.1.radiancescales.1.rgbscale = 1.0 1.0 1.0
film.imagepipelines.1.radiancescales.1.enabled = 0
################################################################################
Note: there is some case where the index of the image pipeline to use for scales is not explicitly defined. For instance, when saving the RADIANCE_GROUP output. In this case, the scales of image pipeline #0 will be used.

This feature is quite powerful. You can obtain, out of a single render, multiple images: day and night, light on and light off, etc.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: RADIANCE_GROUP in OUTPUT_SWITCHER?

Post by B.Y.O.B. »

Cool, works great.
Attachments
scrn_2018-03-19_19-30-24.png
Post Reply