# Why can't cycles cast one ray per image pixel, instead of rendering progressively to infinity?

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.

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.

• 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? Aug 10 '13 at 12:37
• 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? Aug 10 '13 at 12:42
• 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. Aug 10 '13 at 13:43
• "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. Nov 6 '13 at 23:12

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.

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