20
$\begingroup$

I am wondering why Cycles renders progressively to infinity. Why is it not possible to do one ray per pixel in the image, letting you have a finished result with X * Y rays cast? I suppose this question could apply more generically to raycast rendering in general.

$\endgroup$
31
$\begingroup$

That is exactly what happens if you set the numer of samples to 1. You can try doing that. The result you get, however, will be unsatisfying.

The problem is that every sample can only travel one path each time it hits a surface. But most surfaces allow a lot more than one reflection direction. A diffuse surface is characterized, for example, by reflecting incoming light in an almost completely random direction.

So if you sample Pixel 1, and the light hits the first surface and happens to reflect, say, towards the dark night sky, this ray will tell the renderer that it shot to ~infinity and found no light. So this pixel is black. On the pixel next to it, the ray, due to the randomness of the reflection of the surface, will happen to be reflected to the right, towards a big lamp, and will find a lot of light traveling this ray path, so this pixel will be very bright.

If you repeat this for all pixels, the result for each pixel is very random and the image you get is very, very noisy (more so the smaller your light sources are).

So, essentially, the reason why you need to shoot several times per pixel is because you have to shoot enough times that for every pixel, most directions have been "probed" and they all give approximately the same result.

If you only render perfect mirrors with no variation in reflection direction, one sample per pixel is enough, nothing will change with the second one. This is very rare as a scene though.

$\endgroup$
  • 1
    $\begingroup$ I was unaware that diffuse materials chose a random direction of reflection. Is that what gives a diffuse object in real life its color: the average of light bouncing everywhere? $\endgroup$ – Keavon Aug 10 '13 at 12:37
  • $\begingroup$ Thinking about it further, why does it need to scatter the rays in the case of a pure color, like Diffuse, material? I can understand its purpose in SSS, but why does it not just calculate the color of the Diffuse material directly from its color? Is this to achieve realistic lighting by gathering the correct light source data from the whole scene? $\endgroup$ – Keavon Aug 10 '13 at 12:42
  • 3
    $\begingroup$ What you describe would not be diffuse but shadeless. -- The color of a diffuse object is the color and intensity of the light it is hit by from all directions multiplied by the color and brightness of the object itself. And "light", for cycles, means any object in the whole scene that is not black. -- And your explanation in the first comment is correct I think, although it's of course not perfectly even across all angles in reality. $\endgroup$ – JulianHzg Aug 10 '13 at 13:43
  • 5
    $\begingroup$ "If you only render perfect mirrors ... nothing will change with the second [sample]" not even this, unless it also happens to be a plane aligned with the pixel grid that you're facing head on. Random samples also have the possibility of either hitting or completely passing the mesh, which creates the multisample anti-aliasing effect. $\endgroup$ – wchargin Nov 6 '13 at 23:12
-2
$\begingroup$

Even if this Question is already some days older, I want to take the chance to have a nice solution for also others facing this issue.

Size matters: Meaning, try to render the same scene with the full scene scaled with the factor of 10 or even 100 can bring you much better results. I'm currently not knowing why this is working, but it reduces the needed samples from 200 to 40, with better results. In animations this trick reduces the overall time dramatically.

Hope this helps.

$\endgroup$
  • 2
    $\begingroup$ erm , what do you mean? It's unclear to me. Do you actually means scaling up with the traditional transformation tool to 10 times? $\endgroup$ – hawkenfox Jan 28 '16 at 4:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.