15
$\begingroup$

This may seem like a obvious/basic question, but I am still curious, and I don't know the answer.

There will obviously be a big difference between an image rendered with a single sample and one rendered with 500 samples, but there will be a smaller difference between an image rendered with 1000 samples and 1500 samples.

What is the technical reason for this?

From what I understand of how cycles works, it fires one ray per pixel from the camera, which bounces and translates through objects at random angles.

It would make sense that samples would bounce in directions that have already been sampled, but I would think it would be possible to skip sampling "duplicate samples" by skipping bounces that are at a similar angle to previous bounces?

$\endgroup$
5
  • $\begingroup$ "skipping bounces that are at a similar angle" that would create banding, and would also just not be what you want. $\endgroup$
    – wchargin
    Sep 10, 2013 at 1:51
  • $\begingroup$ @WChargin how would it create banding? (only skipping bounces similar to other bounces that occurred in the same pixel) $\endgroup$
    – gandalf3
    Sep 10, 2013 at 2:12
  • $\begingroup$ Sub-pixel banding, that is. You would have to define some threshold as "a similar angle." In reality, there would be slight variation (a gradual gradient) within that angle. As soon as you get out of that angle, you've jumped a bit, and there's a new color. $\endgroup$
    – wchargin
    Sep 10, 2013 at 2:34
  • $\begingroup$ @WChargin I'm not sure I understand.. sampling the same bounce (angle) twice would not change the pixel, would it? so if you skip it it should not change it. $\endgroup$
    – gandalf3
    Sep 10, 2013 at 4:50
  • $\begingroup$ Sense the more samples, the more grainy it is, there would have to be a point in witch the human eye can not tell that it's grainy, so I would think probably not. $\endgroup$
    – Sam54123
    Jul 10, 2015 at 4:57

4 Answers 4

19
$\begingroup$

Cycles and all other path tracing render engines use Monte Carlo integration. The probabilistic error after N samples of Monte Carlo integration is:

enter image description here

This means that to halve the noise you have to take roughly 4x more samples.

Actually, we can do a bit better. You mention skipping samples in directions that have already been sampled, and we do this to an extent. Cycles uses Quasi-Monte Carlo integration, which means it uses a sequence of random numbers that is distributed well over all directions to avoid such duplicate samples.

Quasi-Monte Carlo has better convergence than basic Monte Carlo sampling, but it's difficult to quantify and depends on the scene and settings. The integral for global illumination is high dimensional which makes things quite complicated.

To halve noise you need somewhere between 2x and 4x more samples in practice.

$\endgroup$
13
$\begingroup$

  1500/1000 Samples is only 1.5 times more. 500/1 is 500 times more samples. It's the same with astrophotography. Several pictures are stacked to reduce noise in the picture and the improvement in quality is the square root of the amount of exposure time. That means if you want to double the quality, you have to quadruple the amount of data.

  Let's take a closer look at the numbers: If we take the quality of 1 sample as a base, then 500 samples are sqrt(500 times the effort) = 22 times less noisy. If you now take 1000 as a base, then 1500 is 1.5 times the effort and only sqrt(1.5)=1.2 times better which I think fits the visual perception quite nicely.

$\endgroup$
7
$\begingroup$

It's not really a matter of how cycles works, more of a matter of logic. Think of it relatively, the difference between 1 and 500 is nearly 100% difference, whereas the difference between 1000 and 1500 is only 33.3% relative to the total. So logically, there won't appear to be as much of a difference.

However, developers recently implemented a "Square Samples" option (r58424):

With this enabled, all Sample values will be squared. So 10 Samples become 100 Samples.

Thus, by enabling this option, there is a much greater difference between sample count, and the difference between 1-500 (1-22 squared) and 1000-1500 (32-39) will be much closer together.

$\endgroup$
2
  • $\begingroup$ I think you meant that 500 is exactly 500% more than 1. $\endgroup$
    – Gunslinger
    Sep 10, 2013 at 15:23
  • $\begingroup$ Not really. I meant is as a percentage of the total samples, though I can see how that's unclear $\endgroup$
    – Greg Zaal
    Sep 10, 2013 at 19:05
5
$\begingroup$

From a mathematical point of view, a cycles render would be a function which converges to an ideal soultion over time. So the more samples, the closer the render looks to the 'solution image', which would be the result with infinite samples thrown.

$\endgroup$
1
  • $\begingroup$ I don't think this actually answers the question about diminishing returns. $\endgroup$ Aug 1, 2016 at 9:50

You must log in to answer this question.

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