From ad35453cd19b3db779b0b3a90feac2e93c7a73cf Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Sat, 2 Apr 2022 00:11:11 +0200 Subject: Cycles: Add support for light groups Light groups are a type of pass that only contains lighting from a subset of light sources. They are created in the View layer, and light sources (lamps, objects with emissive materials and/or the environment) can be assigned to a group. Currently, each light group ends up generating its own version of the Combined pass. In the future, additional types of passes (e.g. shadowcatcher) might be getting their own per-lightgroup versions. The lightgroup creation and assignment is not Cycles-specific, so Eevee or external render engines could make use of it in the future. Note that Lightgroups are identified by their name - therefore, the name of the Lightgroup in the View Layer and the name that's set in an object's settings must match for it to be included. Currently, changing a Lightgroup's name does not update objects - this is planned for the future, along with other features such as denoising for light groups and viewing them in preview renders. Original patch by Alex Fuller (@mistaed), with some polishing by Lukas Stockner (@lukasstockner97). Differential Revision: https://developer.blender.org/D12871 --- intern/cycles/scene/film.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'intern/cycles/scene/film.h') diff --git a/intern/cycles/scene/film.h b/intern/cycles/scene/film.h index 43597b0fc79..f1e3237eb9e 100644 --- a/intern/cycles/scene/film.h +++ b/intern/cycles/scene/film.h @@ -68,6 +68,8 @@ class Film : public Node { int get_aov_offset(Scene *scene, string name, bool &is_color); + bool update_lightgroups(Scene *scene); + /* Update passes so that they contain all passes required for the configured functionality. * * If `add_sample_count_pass` is true then the SAMPLE_COUNT pass is ensured to be added. */ -- cgit v1.2.3