Page MenuHome

Cycles: Expose Max Bounces also for World
ClosedPublic

Authored by Thomas Dinges (dingto) on Jul 10 2015, 11:50 PM.

Details

Summary

Hi,
pretty simple patch, this makes "Max Bounces" also usable for World Light. Can help performance and noise a bit. No changes inside the kernel are required.

Diff Detail

Repository
rB Blender

Event Timeline

Thomas Dinges (dingto) retitled this revision from to Cycles: Expose Max Bounces also for World.
Thomas Dinges (dingto) updated this object.
Thomas Dinges (dingto) added a project: Cycles.

Do you have examples when this gives noticeable improvements?

Various thoughts on this:

  • Code-vise seems fine, but description could be more clear perhaps (i.e. make it more clear which light you're referring from there -- like "light from wold" or so?)
  • This is an extra option which is might be quite tricky for artists to enable (if it's well documented then it's not so an issue)
  • Makes me feel i really need to update the light threshold patch, so we'll have single place to control this things (ja ja i know i know, it's on the desk for quite some time now.. But trying to wrap up another project atm..).

So all in all think if there's clear cases when this option helps we can add it, and then replace it with light threshold.

bitte schön dingel :)

heres one example where this option helps a lot (with - at least for me - acceptable quality loss)

in this case the env map is not the main light source and only used to make the reflections prettier - for that 0! world bounces are enough :)

without env map

with env map

impressive speedup i'd say... :) - with 1 world bounce the render time is roughly in middle of these 2 render times but the quality improvement is not worth it

sergey i dont think a light threshold can replace that option (?) - the env map contributes a lot of light but i - explicitly - only want direct light from the map!

also the description is quite clear - since the option is located in the world settings?

Using light threshold is the only reliable way of avoiding flicker in animations.

In your example i'm not sure why would you want only direct light from world and indirect from world settings. Would think limiting bounces to direct light only in the scene is easier way to control this. Or maybe wrap up the option which we've been experimenting here in the studio which forces specified objects to only receive direct light, and at the same time allowing other objects to do full global illumination.

So the things are:

  • If you want to limit to direct light only, it's already possible to do globally for the whole scene.
  • It makes sense looking into finishing the patch for marking objects as receiving direct light only. So in animation shots you can save render time spend on "uninteresting" objects while keeping best quality on interesting ones. This will also likely cover your case.
  • Using per-light bounces as a limit for energy contribution is really better to be done as general light threshold option, otherwise you'll pretty much end up with flickering in animations.

Sure we can add all sort of weird and wonderful options, but blender is already full of them and it makes total sense to think of adding more generic options, which will cover majority of cases, not only particular one.

Or at least be ready to remove options when proper ones are implemented (which i'm not total fan of actually..)

@Thomas Dinges (dingto), so all in all think it's not that bad to expose the option for now, since we already have it per-light. But then eventually either deprecate them or get rid completely once more comprehensive approach is finished.

"If you want to limit to direct light only, it's already possible to do globally for the whole scene."

its not possible to limit the global bounces for that scene - i'm using a glass shader for the frame glass and you cant render that with 1 transmission bounce and increasing max bounces to 3 (without limiting the world bounces) increases render time (17 min only with this tiny model)

"It makes sense looking into finishing the patch for marking objects as receiving direct light only. So in animation shots you can save render time spend on "uninteresting" objects while keeping best quality on interesting ones. This will also likely cover your case."

no this wont cover my case

"Using per-light bounces as a limit for energy contribution is really better to be done as general light threshold option, otherwise you'll pretty much end up with flickering in animations."

i'm not sure why it should flicker? i'll test that for sure but not now (need more bricks :))

also i'm not sure why you are "against" such features you can specify bounces for diffuse, glossy etc but for lamps there should be a mysterious threshold option?

don't get me wrong i like the threshold option but that is more a case for many lamps (?) and can't replace the bounce option for lamps

Just things are to be implemented in a right way and be predictable for artist, and not overcomplicate the interface. Think approaches for that are covered in the previous reply. The resolution is also in there and if you want to discuss different approaches it's better to be done outside of the code review.

Will push it now (with a little tweak to the tooltip, to emphasize world background) and also mention that we might have something more generic for this in the future.

This revision was automatically updated to reflect the committed changes.