Compositor: Redesign Sun Beams node #116787

Merged
Omar Emara merged 1 commits from OmarEmaraDev/blender:redesign-sun-beams-node into main 2024-01-10 14:31:07 +01:00
Member

This patch redesigns the Sun Beams node. The old implementation produces
unexpected results with an arbitrary alpha channel, due to the use of a
step count normalization instead of a weighted normalization. The
quality is also questionable due to the use of nearest neighbour
interpolation as well as a low resolution integration.

This patches redesign the node to be a simple line integration towards
the source, limited by the maximum ray length. The sampling resolution
covers the entire path of the integration and the image is sampled using
bilinear filtering, producing smoother results. No alpha is introduced.

This patch redesigns the Sun Beams node. The old implementation produces unexpected results with an arbitrary alpha channel, due to the use of a step count normalization instead of a weighted normalization. The quality is also questionable due to the use of nearest neighbour interpolation as well as a low resolution integration. This patches redesign the node to be a simple line integration towards the source, limited by the maximum ray length. The sampling resolution covers the entire path of the integration and the image is sampled using bilinear filtering, producing smoother results. No alpha is introduced.
Omar Emara added the
Interest
Compositing
Module
VFX & Video
labels 2024-01-04 15:48:09 +01:00
Omar Emara added 1 commit 2024-01-04 15:48:20 +01:00
c771c50d4a Compositor: Redesign Sun Beams node
This patch redesigns the Sun Beams node. The old implementation produces
unexpected results with an arbitrary alpha channel, due to the use of a
step count normalization instead of a weighted normalization. The
quality is also questionable due to the use of nearest neighbour
interpolation as well as a low resolution integration.

This patches redesign the node to be a simple line integration towards
the source, limited by the maximum ray length. The sampling resolution
covers the entire path of the integration and the image is sampled using
bilinear filtering, producing smoother results. No alpha is introduced.
Author
Member

Old (Notice weird alpha from nowhere):

20240104-162442.png

New:

20240104-162446.png

Old (Notice noise):

20240104-162527.png

New:

20240104-162531.png

Old (Notice pixelation):

20240104-162542.png

New:

20240104-162548.png

Old (Notice weird alpha from nowhere): ![20240104-162442.png](/attachments/8f223e2b-77e9-4c49-91b3-f386b9456c6b) New: ![20240104-162446.png](/attachments/6be11b6a-f2fd-4b7a-a7dc-dcb3871df1f3) Old (Notice noise): ![20240104-162527.png](/attachments/ac571e8d-1cbb-4c1d-8a32-6ae987b3ec05) New: ![20240104-162531.png](/attachments/36aa8c5a-af89-4d97-872c-2b81cc924760) Old (Notice pixelation): ![20240104-162542.png](/attachments/7fd2d4e3-3600-412e-a9eb-619538673454) New: ![20240104-162548.png](/attachments/2fd18792-b39a-4066-ba1c-bd4b08d1b7c5)
Omar Emara requested review from Sergey Sharybin 2024-01-04 15:56:05 +01:00

The result looks so much better now indeed.

How does this compare to the CPU compositor? Do we need to do similar redesign there as well?

The result looks so much better now indeed. How does this compare to the CPU compositor? Do we need to do similar redesign there as well?
Author
Member

@Sergey Yes. I will do the same redesign for CPU if this is accepted.

@Sergey Yes. I will do the same redesign for CPU if this is accepted.
Sergey Sharybin approved these changes 2024-01-09 16:07:10 +01:00
Omar Emara merged commit 9e358fcd44 into main 2024-01-10 14:31:07 +01:00
Omar Emara deleted branch redesign-sun-beams-node 2024-01-10 14:31:09 +01:00
Sign in to join this conversation.
No reviewers
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
2 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#116787
No description provided.