# Need to understand how to show reflected light well with cycles

I want to show light reflected from a flat, mirror-like surface onto a diffuse surface. I noticed that even when everything else looks good, the light reflected from the mirror is 100% fireflies. When the roughness is increased a bit, they smooth out quickly to what I would expect. NOTE: mirror is flat - this is not a caustic issue. However, that is the direction I'm going next. Also, I'd like to see how well Blender can do - "just use another rendering program" is not helpful here.

1. Is there a concise yet accurate way to explain why this happens? I'd like to understand as much as possible.

2. Is there some particular setting (beyond just "Samples") that I can use to improve the reflected light pattern smoothness (for a given render time)?

3. Could Light Portals be used to reduce render time for smooth reflected light?

The images below are 100 samples. 1000 doesn't really fix it.

I have found that this answer by @gandalf3 seems to address part of my question already - but I'm still interested in trying everything I can within Blender, before resorting to those measures.

Edit: This Blender Cookie is the best discussion/tutorial I have found so far on ray tracing and nodes in cycles. The .blend file is here.

So a ray from the camera hits the "floor" at a certain point (pixel) indicated by a tiny cube. Actually, in the case of a mirror (specular reflection) a similar number of rays from that point would reach the light directly and by reflection. So we can't just say there are "fewer rays". There is something more here.

DIfferent areas require very different number of samples. Words describe my impression of how much noise in the direct lit areas, direct shadows, and reflected lit areas.

The .blend file is here.

• Light portals work for interior rendering only, afaik. So if you put your sceen in a room, and light enters it from a window, you could try portals. Try also using bigger area lights. Oct 7, 2015 at 7:06
• anyway it should be caustics, try full global illumination and disable just "reflective caustics": no fireflies at all. Or try filter glossy. Oct 7, 2015 at 7:20
• Does Blender call reflections from FLAT surfaces caustics? In any case @m.ardito, I want the reflections - that's what I'm after. I just want them to be smooth.
– uhoh
Oct 7, 2015 at 9:26
• @uhoh Yes, Cycles considered this to be a caustic. AFAIK any glossy or transmission ray with a depth greater than 2 (has bounced once before) which then hits a lamp is considered a caustic.
– gandalf3
Oct 8, 2015 at 2:21
– uhoh
Oct 10, 2015 at 11:05

This is pretty much the worst-case scenario for backwards path tracing.

On contact with the diffuse plane the ray could go in literally any direction, and only a tiny fraction of those directions will hit the glossy object at the right place and angle to rebound into the smallish light source.

To see why increasing the roughness of the glossy material helps, look at it from the point of view the ray right after hitting the diffuse plane:

As you can see, the area which the ray can hit and still find the lamp is much larger even with only .1 roughness. In addition, MIS probably can do a bit more to direct samples to the lamp when there is some roughness and the ray doesn't need to bounce at an exact angle (as is the case with specular reflection).

Note that with enough samples it does eventually converge (in this sense these aren't fireflies so much as noise). Here's a render with 10000 samples:

• So in the pictures with the green and blue "cones of light" I'm illustrating that for a mirror, the number of actual rays in the real world, from the spot on the screen to the light are about the same for direct and reflected light. So I'm actually surprised that the direct light is almost smooth with 1 sample, but reflected light needs 1000 (see last montage of 4 sample numbers). The direct light must be using some super-intelligent averaging. It seems that there aren't any "magic" buttons to push here within Blender cycles. Thanks for your answer!
– uhoh
Oct 10, 2015 at 10:54
– uhoh
Oct 10, 2015 at 11:10
• @uhoh (regarding your first comment) That is because of MIS. Without it you would see that direct light is almost as noisy as indirect light
– gandalf3
Oct 10, 2015 at 18:07

I'm adding an answer, here, adding to my comments above, so that I can add a few images below: I tried a simple setup similar to yours, and you can see the result with settings aside, so that you can compare with yours: rendering size is small here, but fireflies are quite lower, it seems

• Thank you for your answer! I appreciate you point out the various settings. So you are right, it does seem like at 1000 samples the noise is almost low enough not to be noticeable for casual applications, and going a little higher can be enough.
– uhoh
Oct 11, 2015 at 22:54
1. Blender casts rays from the camera. It is very diffiult for it to make the rays hit the lamp, even more if it is small. And even more if the rays have to bounce from a mirror. If the mirror is rough, it will send multiple rays per sample (branch) and thus hit it more frequently.

2. You could use the light path node to make the material show a smooth glossy to the camera and a rough one to anything else. The light path gives out values (1 or 0) depending on the type of the ray. (See http://www.blenderguru.com/articles/cycles-input-encyclopedia/ for more details)

3. Light portals also help Blender find small lamps. However they are for cases where Blender can't know where to look for light. (a room with a small window is a typical case, as pointed out by m.ardito) This is no such case, so I don't think you could use them. Andrew Price illustrates this very well here: http://youtu.be/oveSskhIEAc

Massive kudos for a very clear question. I hope this may be useful to you.

So, this may clarify things:

This is how the fireflies are born on a perfect mirror: with a very little move in the position of the camera, the ray may completely miss the lamp:

Instead, with a rough mirror, the rays can be thought as spreading around within a small angle in 3D space:

So with a rough mirror the effect of the lamp doesn't cut of in a hard way. Instead, it gradually decreases. The small angle in wich the rays spread is sampled, so theoretically this does create extra rays. Thus, no fireflies.

• We are on the right track, but I still don't quite understand the ray frequency idea. Please see the Blender Cookie link I added and two more images showing similar number of rays.
– uhoh
Oct 7, 2015 at 9:22
• Blender sends camera rays from the camera. Depending on what they hit (glossy, diffuse, emission etc.) it may do a number of things: hit an emissive material. Hit a glossy material and send another ray. Hit a diffuse material and send multiple rays into multiple directions. Or, if we have a rough glossy, send many rays from the point of impact on the mirror. These rays go into many directions, thus making the reflection appear rough. Also, if the glossy is rough, the limits of the reflected lamp's shape are blurry, thus rays don't miss it entirely as they would do if it was a clear reflection. Oct 7, 2015 at 9:28
• The question is really about mirror reflections @user277143 where the rays go in exactly one direction. Non-zero roughness was included to show fireflies only really show up when reflections are almost mirror-like.
– uhoh
Oct 7, 2015 at 9:30
• I hope I understand you, but I am not sure. I am trying to come up with a picture. Oct 7, 2015 at 9:31