User defined and driven importance sampling

Discussion related to the Engine functionality, implementations and API.
Post Reply
User avatar
Dade
Developer
Posts: 3414
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

User defined and driven importance sampling

Post by Dade » Mon Nov 11, 2019 11:20 am

Introduction

I implemented, in old LuxRender, user defined importance and driven sampling. It was possible for the user to draw, over the current rendering, with a circular smooth pen in order to define the regions where the sampler should render most of the samples. This feature was combine with noise-aware sampler.

It is now possible in LuxCore with RANDOM or SOBOL samplers too and this is simple demo video with LuxCoreUI: https://www.youtube.com/watch?v=qXHlKFSE9QY

This feature is an extension of normal noise-aware rendering.

USER_IMPORTANCE AOV

There is a new AOV named "USER_IMPORTANCE" where the application can upload the importance map (an image with a single float channel with values between 0.0 and 1.0).
If the AOV is enabled, the sampler will automatically use the AOV values (and noise estimation, see below) to decide where to focus samples.
LuxCore API has been extended with a new methods Film::UpdateChannel() and Film::UpdateOutput() so the application can upload a new version of the user importance map.

Noise and User importance map

RANDOM and SOBOL samplers have now a new parameter to decide the weight of noise and user importance when both information are avilable:

Code: Select all

sampler.sobol.adaptive.userimportanceweight = 0.75
The default value is 0.75 and means that the sampler will weight for a 75% the user input and for a 25% it will still use noise information. With a value of 100%, only user input will be used, with a 0% only noise information will be used.
Support LuxCoreRender project with salts and bounties

User avatar
Sharlybg
Donor
Posts: 1577
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: User defined and driven importance sampling

Post by Sharlybg » Mon Nov 11, 2019 11:48 am

will this be useable in Blender ? because in the past this work only in luxrender interface.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

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

Re: User defined and driven importance sampling

Post by Dade » Mon Nov 11, 2019 11:54 am

Sharlybg wrote:
Mon Nov 11, 2019 11:48 am
will this be useable in Blender ? because in the past this work only in luxrender interface.
B.Y.O.B. wrote it may doable in Blender and is investigating the problem.
Support LuxCoreRender project with salts and bounties

User avatar
Egert_Kanep
Posts: 202
Joined: Tue Mar 13, 2018 10:34 am

Re: User defined and driven importance sampling

Post by Egert_Kanep » Mon Nov 11, 2019 3:34 pm

What happens with animation though? I guess it is most usable for still images or quick specific region renders

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

Re: User defined and driven importance sampling

Post by Dade » Mon Nov 11, 2019 3:54 pm

Egert_Kanep wrote:
Mon Nov 11, 2019 3:34 pm
What happens with animation though? I guess it is most usable for still images or quick specific region renders
Yes, it is intended to be used during the rendering of a still images where you may decide to focus on some detail with more visible noise. For instance, you can run the render for a while, spot few details in need of more samples, rise an repeat.

The idea is to get the result you aiming for with less (rendering) time.
Support LuxCoreRender project with salts and bounties

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

Re: User defined and driven importance sampling

Post by marcatore » Mon Nov 11, 2019 4:03 pm

Dade wrote:
Mon Nov 11, 2019 3:54 pm
Egert_Kanep wrote:
Mon Nov 11, 2019 3:34 pm
What happens with animation though? I guess it is most usable for still images or quick specific region renders
Yes, it is intended to be used during the rendering of a still images where you may decide to focus on some detail with more visible noise. For instance, you can run the render for a while, spot few details in need of more samples, rise an repeat.

The idea is to get the result you aiming for with less (rendering) time.
Exactly... it's super useful.

One question:
- if I define a zone where focus the rendering, is it possible to see how many samples it has reached in that zone? It should help defining the right samples halt condition number with less tests.

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

Re: User defined and driven importance sampling

Post by Dade » Mon Nov 11, 2019 5:26 pm

marcatore wrote:
Mon Nov 11, 2019 4:03 pm
- if I define a zone where focus the rendering, is it possible to see how many samples it has reached in that zone?
There is an AOV called SAMPLE_COUNT, it shows exactly the amount of samples for each pixel (but I'm not sure how it is shown in Blender).
Support LuxCoreRender project with salts and bounties

Post Reply