Cycles Light Linking #104972

Open
opened 2023-02-20 15:14:56 +01:00 by Brecht Van Lommel · 0 comments

Support to have a light to influence only a subset of objects in the scene.

Plan

This is implemented by having a collection per light, where only the objects in the collection are illuminated by that light. This is compatible with other software and USD, which makes interop easier.

It is also simpler in production, since lights tend to be different for each shot and can be easily modified, whereas the linking being on the receivers or their materials would require heavy use of overrides in every shot.

This is however not the most convenient user interface, and a better UI is planned to be added after the initial implementation lands. This UI would have a global overview of all links in the scene, and allow viewing and editing both from the emitter -> receiver and receiver -> emitter points of view.

Cycles

  • Add object bitmask for receiving and emitting, light bitmask for emitting
  • Implement basic kernel side logic including for transparency, volumes, MIS
  • Build specialized light tree for every light set (#107561)
  • Shadow linking basic implementation (#106501)
  • Shadow linking with MIS (#107439)
  • Multiple lights on the ray path for shadow linking (#107739)
  • Mesh emitters for shadow linking (#107981)
  • Distant lights for shadow linking (#107979)
  • Clamping (try to make bounce same as for main path)
  • Path guiding: make recording consistent with main path (#108195)
  • Regression tests (#107964)
  • Optimizatons for dedicated light paths
    • Skip selecting random meshes that don't have matching light link set (#108091)
    • Dedicated intersection filter for selecting lights (scene intersection in shadow_linking_pick_mesh_intersection())
    • MNEE optimizations
  • Reduce memory usage for objects and lights when not using light linking
  • Reduce memory accesses and conditionals related to light linking
  • Hydra import

Blender

  • Light linking receiver collection on objects
  • A way to mark a member of the collection as inclusive or exclusive
  • Separate collections for light and shadow linking
  • Depsgraph implementation to compute bitmask from collections
    • Basic implementation
    • Optimize depsgraph to only weakly reference receiver objects and not evaluate them
  • Dynamic alloc LightLinking in DNA (#108090)
  • UI for easily adding scene collections and objects to the receiver collection
    • Drag-n-drop support of the objects and collections (#106101)
    • Operator to link selection to the active emitter
    • Change x next to list items to more standard - button next to list
    • Add + button next to list, with picker or using selected objects
    • Change light icon for exclude to checkbox (#112857)
    • Re-ordering of the light and shadow linking collections (#112849)
      • Ideally base on #107742
      • Short-term solution could be to use up/down buttons (similar Shapekey list)
  • Remove world and replace it by light object, that then supports linking
  • User interface with overview of all light and shadow links in the scene, where it's possible to switch between emtiter and receiver centrics views
  • USD import and export support (see USDLuxLightAPI.GetLightLinkCollectionAPI)
Support to have a light to influence only a subset of objects in the scene. * [User feedback topic](https://devtalk.blender.org/t/cycles-light-and-shadow-linking/29587) * Previous discussion: #68915 * [Implementation notes](https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Cycles) ### Plan This is implemented by having a collection per light, where only the objects in the collection are illuminated by that light. This is compatible with other software and USD, which makes interop easier. It is also simpler in production, since lights tend to be different for each shot and can be easily modified, whereas the linking being on the receivers or their materials would require heavy use of overrides in every shot. This is however not the most convenient user interface, and a better UI is planned to be added after the initial implementation lands. This UI would have a global overview of all links in the scene, and allow viewing and editing both from the emitter -> receiver and receiver -> emitter points of view. ### Cycles - [x] Add object bitmask for receiving and emitting, light bitmask for emitting - [x] Implement basic kernel side logic including for transparency, volumes, MIS - [x] Build specialized light tree for every light set (#107561) - [x] Shadow linking basic implementation (#106501) - [x] Shadow linking with MIS (#107439) - [x] Multiple lights on the ray path for shadow linking (#107739) - [x] Mesh emitters for shadow linking (#107981) - [x] Distant lights for shadow linking (#107979) - [x] Clamping (try to make `bounce` same as for main path) - [x] Path guiding: make recording consistent with main path (#108195) - [x] Regression tests (#107964) - [ ] Optimizatons for dedicated light paths - [x] Skip selecting random meshes that don't have matching light link set (#108091) - [ ] Dedicated intersection filter for selecting lights (scene intersection in `shadow_linking_pick_mesh_intersection()`) - [ ] MNEE optimizations - [ ] Reduce memory usage for objects and lights when not using light linking - [ ] Reduce memory accesses and conditionals related to light linking - [ ] Hydra import ### Blender - [x] Light linking receiver collection on objects - [x] A way to mark a member of the collection as inclusive or exclusive - [x] Separate collections for light and shadow linking - [ ] Depsgraph implementation to compute bitmask from collections - [x] Basic implementation - [ ] Optimize depsgraph to only weakly reference receiver objects and not evaluate them - [x] Dynamic alloc LightLinking in DNA (#108090) - [ ]UI for easily adding scene collections and objects to the receiver collection - [x] Drag-n-drop support of the objects and collections (#106101) - [x] Operator to link selection to the active emitter - [x] Change x next to list items to more standard - button next to list - [x] Add + button next to list, with picker or using selected objects - [x] Change light icon for exclude to checkbox (#112857) - [x] Re-ordering of the light and shadow linking collections (#112849) - Ideally base on #107742 - Short-term solution could be to use up/down buttons (similar Shapekey list) - [ ] Remove world and replace it by light object, that then supports linking - [ ] User interface with overview of all light and shadow links in the scene, where it's possible to switch between emtiter and receiver centrics views - [ ] USD import and export support (see `USDLuxLightAPI.GetLightLinkCollectionAPI`)
Brecht Van Lommel added the
Module
Render & Cycles
label 2023-02-20 15:14:56 +01:00
Brecht Van Lommel added this to the Render & Cycles project 2023-02-20 15:14:57 +01:00
Brecht Van Lommel locked as Off-topic and limited conversation to collaborators 2023-02-20 15:18:37 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#104972
No description provided.