Clustered Light Culing #68474

Closed
opened 2019-08-09 16:57:36 +02:00 by Clément Foucault · 19 comments

Lights evaluation is what takes the most time in eevee. Using Clustered light culling, we could cut down the evaluation time by evaluating only lights present in the view.

This needs further investigation as how to communicate what lights are visible. Light Bits is the most straight forward way but it severly limits the number of lights per froxel.
Also findMSB (glsl bitscan) is GL 4.0 only, so need to review other alternative. (avalanche studio slides link).

We need a way to cull thoses on GPU (pixel shader per froxel?) for efficiency.
Need more investigation about the state of the art techniques.
Issue is that it takes another texture slot. Could we use a UBO instead and use bigger froxel? (Can't write to UBO using shaders)

Estimate : 2 weeks

Lights evaluation is what takes the most time in eevee. Using Clustered light culling, we could cut down the evaluation time by evaluating only lights present in the view. This needs further investigation as how to communicate what lights are visible. Light Bits is the most straight forward way but it severly limits the number of lights per froxel. Also findMSB (glsl bitscan) is GL 4.0 only, so need to review other alternative. (avalanche studio slides [link](http://www.humus.name/Articles/PracticalClusteredShading.pdf)). We need a way to cull thoses on GPU (pixel shader per froxel?) for efficiency. Need more investigation about the state of the art techniques. Issue is that it takes another texture slot. Could we use a UBO instead and use bigger froxel? (Can't write to UBO using shaders) Estimate : 2 weeks
Author
Member

Added subscriber: @fclem

Added subscriber: @fclem

Added subscriber: @zebus3dream

Added subscriber: @zebus3dream

Added subscriber: @SomaZ

Added subscriber: @SomaZ

There's an alternative to clustered shading called BVH Accelerated Shading. Downside, you need to maintain a bvh on the cpu side, upside, you don't need any compute shaders and you aren't limted to a fixed count of lights.
Maybe worth looking into it: Simple Alternative to Clustered Shading for Thousands of Lights

There's an alternative to clustered shading called BVH Accelerated Shading. Downside, you need to maintain a bvh on the cpu side, upside, you don't need any compute shaders and you aren't limted to a fixed count of lights. Maybe worth looking into it: [Simple Alternative to Clustered Shading for Thousands of Lights ](https://worldoffries.wordpress.com/2015/02/19/simple-alternative-to-clustered-shading-for-thousands-of-lights/)

Added subscriber: @c2ba

Added subscriber: @c2ba

Added subscriber: @lemenicier_julien

Added subscriber: @lemenicier_julien

Added subscriber: @Nakara

Added subscriber: @Nakara

Added subscriber: @AnityEx

Added subscriber: @AnityEx
Contributor

Added subscriber: @KenzieMac130

Added subscriber: @KenzieMac130

Added subscriber: @Emi_Martinez

Added subscriber: @Emi_Martinez

Added subscriber: @dodo-2

Added subscriber: @dodo-2

Any update for this task ?

Any update for this task ?
Author
Member

I went for 2.5D light culling. It is already inside eevee-rewrite.

I went for 2.5D light culling. It is already inside `eevee-rewrite`.

In #68474#1236655, @fclem wrote:
I went for 2.5D light culling. It is already inside eevee-rewrite.

Ok nice 😊

> In #68474#1236655, @fclem wrote: > I went for 2.5D light culling. It is already inside `eevee-rewrite`. Ok nice 😊

Added subscriber: @Defka

Added subscriber: @Defka

@fclem I have build the EEVEE-REWRITE BRANCH, also i have tested the Simplify > Culling > Cam and Distance Cull, both doesn't work.
idk if the work is finish or just stated, but you can view my review here : https://developer.blender.org/T92482

Same thing in my post : I know is a branch and the job isn't finished ^^

I has read the desc but idk if is updated or no...if is i know why he doesn't work x')

Thank's :)

@fclem I have build the EEVEE-REWRITE BRANCH, also i have tested the Simplify > Culling > Cam and Distance Cull, both doesn't work. idk if the work is finish or just stated, but you can view my review here : https://developer.blender.org/T92482 Same thing in my post : I know is a branch and the job isn't finished ^^ I has read the desc but idk if is updated or no...if is i know why he doesn't work x') Thank's :)
Author
Member

@dodo-2 you misunderstood the feature. The light culling discussed here is not about the options under the Simplify tab which are specific to Cycles. I believe they are not working because my branch is quite outdated compared to master.

The light culling of this task is about an internal feature that speed up the rendering when there is a high number of light in the scene. There is no parameter in the UI since the feature is always enabled.

@dodo-2 you misunderstood the feature. The light culling discussed here is not about the options under the `Simplify` tab which are specific to Cycles. I believe they are not working because my branch is quite outdated compared to master. The light culling of this task is about an internal feature that speed up the rendering when there is a high number of light in the scene. There is no parameter in the UI since the feature is always enabled.

@fclem Oh okay my bad ^^' But at least you know that camera culling doesn't work x')

@fclem Oh okay my bad ^^' But at least you know that camera culling doesn't work x')
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:15:31 +01:00
Author
Member

Implemented in EEVEE-Next

Implemented in EEVEE-Next
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-02-26 14:10:29 +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 project
No Assignees
11 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#68474
No description provided.