Open lacilaci opened 6 years ago
here are few nice examples how it works in corona, it's simpler than in cycles but should provide good enough flexibility! https://coronarenderer.freshdesk.com/support/solutions/articles/5000529341-what-is-rayswitch-material-and-map-
and arnold example: https://docs.arnoldrenderer.com/pages/viewpage.action?pageId=40119525&navigatingVersions=true
unlike corona, arnold does have shadow switch available in addition to diffuse. I'm not sure if we actually need both shadow and global illumination switching. Seems the way it's handled in corona should allow enough flexibility both for artistic purposes and performance optimizations of complex shaders.
Currently we can hide objects only from camera, which is rarely useful on it's own.
hiding objects from diffuse/GI contribution can help in scenes with curtains and complex/thick glass objects that occlude scene. Also I could create a complex looking lightsource that does not actually emit light into scene but is visible for camera/reflections/specular rays.
hiding object or light from specular does the same for specular ,currently for example we can hide sun lightsource from specular, which helps with caustics but not other lightsources or objects.
Hiding objects and lights from casting shadows. I guess hiding from diffuse contribution does this but we need to make sure that lights can contribute to diffuse/gi in the scene but their emitor objects are not casting shadows, occluding other lights.
Lastly ability to hide object/light from reflection is often needed to accompany visibility. If I don't want to see object for camera I might not want to see it in reflection or casting shadows etc.
This all is a very powerful in camera compositing toolset. At times helpful with performance at other times it is more flexibility for the user.