Sometimes, in order to avoid noise and render faster, I set the bounces to 0. The problem is that I don't get any reflection on water, glass, etc. I know that some nodes provide tests to stop a ray (like "is camera ray"). Can I get the best of both worlds: reflection but no noise?

I thought of controlling how many bounces a light path makes with nodes or python depending on what kind of materials it hits. Like get +1 bounce if glossy or so.


1 Answer 1


What about using settings like this:

enter image description here

In Render settings → Light Paths → Bounces?

As mentioned by sambler,
This is also possible per shader with nodes, but only in development versions newer than r58776. This feature will be available in 2.69:

We have a global (Total Max, Diffuse/Glossy/Transmission max) control for bounces. It would be useful to add a ray depth control for shaders. This way, we can specify if a certain shader should only do 2 bounces for example. This can help with performance and noise a bit. Maybe this option could also be added to lamps, so we can set lamps to only do 0 or 1 bounce, and act only as a fill light for example.

To control bounces per material with the light path node you could use a setup like this:

enter image description here

Where the highlighted value is the number of bounces for this material to be sampled (negative values will not sample it at all, letting rays straight through).

To show this, take the following render (Suzanne has the above node setup with a value of 2)

enter image description here

As you can see, Suzanne only appears in direct reflections (the pedestals "farther down" are empty).

  • $\begingroup$ This was added to svn about a month ago (Ray Depth output from Light Path node) so is in any recent svn builds and will be in 2.69 when released. You also have a Ray Length output which is "Distance travelled by the light ray from the last bounce or camera" if you want to adjust reflections based on distance. $\endgroup$
    – sambler
    Commented Sep 5, 2013 at 8:27
  • $\begingroup$ @gandalf3 could you please give some information/examples on how to use the new Ray Depth information to limit bounces? I get only black materials when trying to use it. $\endgroup$
    – matali
    Commented Mar 12, 2014 at 9:16
  • 1
    $\begingroup$ @matali Updated answer. $\endgroup$
    – gandalf3
    Commented Mar 14, 2014 at 8:06

You must log in to answer this question.

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