appleseedhq / appleseed

A modern open source rendering engine for animation and visual effects
https://appleseedhq.net/
MIT License
2.19k stars 329 forks source link

Skip bump mapping after glossy/diffuse bounces #1251

Open dictoon opened 7 years ago

dictoon commented 7 years ago

Should be optional (default: skip).

What other effects can we skip after glossy/diffuse bounces?

Narann commented 7 years ago

I think it's shader dependent. It can be some SSS layers (or decrease SSS complex computation), whole reflections (when its thin enough or only visible on surface borders (fresnel)), roughness increase (to avoid high specular and so, fireflies), the classic "bounce clamp", IOR to 1, etc.

Everything that can increase convergence of glossy/diffuse rays is interesting. It's not (only) about making indirect computation faster, it's (mainly) about improving convergence with less accuracy (all you want is visual indirect "effect").

You are totally right it has to be optional and we (appleseed) choose option that give good result/speed in 90% of the case.

And as those options are always tricky for the user to understand, we should test them before (with/without).

dictoon commented 7 years ago

Totally agree with everything you said!

Actually I might revise my earlier suggestion to skip bump mapping after glossy/diffuse bounces, and instead:

luisbarrancos commented 6 years ago

@dictoon @est77 this ticket might still be interesting. Adding this to our shaders in their respective advanced tab under optimizations ? Disabled by default (i.e, do not skip bump mapping on any rays), and presenting the option to disable bumping in diffuse and specular rays when ray depth > 1?

dictoon commented 6 years ago

Yes, I agree, still very relevant.

boberfly commented 6 years ago

Doing this manually with a 'rayswitch' node to a simpler shader in indirect bounces is common practice for me for massive speedups in other renderers... ;)

luisbarrancos commented 6 years ago

@boberfly yes, i was thinking something along those lines, built-in into the advanced settings of the shaders. I'll be testing this and measure the performance gains to see if the gains justify the added complexity.