Page 1 of 1

User defined and driven importance sampling

Posted: Mon Nov 11, 2019 11:20 am
by Dade
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.

Re: User defined and driven importance sampling

Posted: Mon Nov 11, 2019 11:48 am
by Sharlybg
will this be useable in Blender ? because in the past this work only in luxrender interface.

Re: User defined and driven importance sampling

Posted: Mon Nov 11, 2019 11:54 am
by Dade
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.

Re: User defined and driven importance sampling

Posted: Mon Nov 11, 2019 3:34 pm
by Egert_Kanep
What happens with animation though? I guess it is most usable for still images or quick specific region renders

Re: User defined and driven importance sampling

Posted: Mon Nov 11, 2019 3:54 pm
by Dade
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.

Re: User defined and driven importance sampling

Posted: Mon Nov 11, 2019 4:03 pm
by marcatore
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.

Re: User defined and driven importance sampling

Posted: Mon Nov 11, 2019 5:26 pm
by Dade
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).

Re: User defined and driven importance sampling

Posted: Wed Jan 01, 2020 8:07 am
by lacilaci
I assume this wasn't exposed in blender yet?

Re: User defined and driven importance sampling

Posted: Wed Jan 01, 2020 10:38 am
by Dade
lacilaci wrote:
Wed Jan 01, 2020 8:07 am
I assume this wasn't exposed in blender yet?
As far as know, it isn't.

Re: User defined and driven importance sampling

Posted: Wed Jan 01, 2020 10:46 am
by B.Y.O.B.
lacilaci wrote:
Wed Jan 01, 2020 8:07 am
I assume this wasn't exposed in blender yet?
No, not yet.