1
$\begingroup$

Not sure if this is the right subdomain to post in.


Why is it that in order to combine multiple rendered frames with same number of samples, but different seeds, that I need to use 100%, 50%, 33%, 25% etc. instead of 1/n (eg. 25%, 25%, 25%, 25%)?

I tried using 1/n, but it resulted in some transparency. The first method (100%, 50%, 33%, 25%) seems (intuitively to me) that the first layer would have too much emphasis.

$\endgroup$
3
  • $\begingroup$ Is this in relation to using blender? You most likely won't get an appropriate answer if it's for something else. $\endgroup$
    – NBoss
    Oct 8, 2017 at 6:56
  • 2
    $\begingroup$ I think you’ll need to provide more information such as how you are combining the images. I’m guessing those are mix factors - in the compositor? If so, then please include an image of exactly what it is that you’re doing. $\endgroup$ Oct 8, 2017 at 7:24
  • $\begingroup$ @RichSedman So basically I am following this guide (blender.stackexchange.com/a/21809) to reduce noise by combining multiple renders, each with a low number of samples - There is also an image showing how the mix nodes are used in the linked page $\endgroup$
    – peqhusus
    Oct 8, 2017 at 16:23

1 Answer 1

2
$\begingroup$

From the linked answer (https://blender.stackexchange.com/a/21809) you have the following image to show the compositor node setup :

compositor nodes

As mentioned in the correction to the linked answer, the Mix factors are actually incorrect - the correct values are as you stated : (100%), 50%, 33%, 25%, 20%, for 5 images (where the 100% corresponds to the first image which shares the mix node with the second image).

While this might intuitively seem wrong, it is actually correct due to how the images higher up the chain actually proliferate through multiple Mix nodes.

Consider the four images A, B, C, D.

Starting at the last image 'mixed', this is included with a mix factor of 25%. As expected, this will contribute 25% to the final result. This means that 75% of the final result will be contributed to by the remaining 3 images (A, B, C).

Final Result = 25% of D + 75% of (A, B, C)

Now considering the next image (C), this will contribute 33%, meaning that A and B contribute the remaining 67% (actually 33.33333% and 66.66666% would be more accurate) :

Final Result = 25% of D + 75% of (33% of C + 66% of (A,B))

For the final mix, 50% is contributed by B and the remainder (50%) is contributed by A (we don't need to bother with the 100% since that's purely A) :

Final Result = 25% of D + 75% of (33% of C + 66% of (50% of B + 50% of A))

All we've done so far is expand the mix nodes to represent the percentage of each output that contributes to the output, bearing in mind that the two percentages must add up to 100% (so if one image contributes 'x'% then the other must contribute '100-x'%).

Now, we can multiply the percentages into the braces to expand as follows :

Final Result = 25% of D + 75% of (33% of C + (66% of 50% of B) + (66% of 50% of A))
             = 25% of D + 75% of (33% of C + 33% of B + 33% of A)
             = 25% of D + (75% of 33% of C) + (75% of 33% of B) + (75% of 33% of A)
             = (25% of D) + (25% of C) + (25% of B) + (25% of A)

i.e. Because the Mix nodes are chained together, the 100%, 50%, 33%, 25% factors combine to result in each input image contributing to 25% of the resultant image.

As mentioned in the linked answer, the same result could be achieved by using Add nodes to add the images together and dividing the result by 4.

i.e. Mix nodes (note the reducing Factors) :

mix nodes

Is equivalent to Add and Divide nodes (again, note the Factors set to 1.0) :

add nodes

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .