WIP: Cycles: Implement BSDF layering #110444

Closed
Lukas Stockner wants to merge 3 commits from LukasStockner/blender:layering into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Depends on #110443, so ignore the first commit.

The second commit implements the layer() function of OSL, which is a) needed for the Principled BSDF changes and b) good to have in general for e.g. MaterialX.

The third commit implements a "Layer BSDF" node, similar to the Mix and Add nodes, and adds the SVM logic to make it work. In OSL mode, it just uses layer().
With this one, I'm not sure yet - having a general node for layering is one approach, but since only a handful of BSDFs would support acting as the top layer (notably Glass and Sheen), it might make more sense to instead add an optional BSDF input to those nodes instead. That would also be cleaner as far as the SVM compiler/execution is concerned (just give them a hidden output for base weight and hook that up to the SVM Mix Weight input of whatever is connected to the input).

Depends on #110443, so ignore the first commit. The second commit implements the `layer()` function of OSL, which is a) needed for the Principled BSDF changes and b) good to have in general for e.g. MaterialX. The third commit implements a "Layer BSDF" node, similar to the Mix and Add nodes, and adds the SVM logic to make it work. In OSL mode, it just uses `layer()`. With this one, I'm not sure yet - having a general node for layering is one approach, but since only a handful of BSDFs would support acting as the top layer (notably Glass and Sheen), it might make more sense to instead add an optional BSDF input to those nodes instead. That would also be cleaner as far as the SVM compiler/execution is concerned (just give them a hidden output for base weight and hook that up to the SVM Mix Weight input of whatever is connected to the input).
Lukas Stockner added 3 commits 2023-07-25 04:06:29 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
2931602812
Cycles: Cleanup: Move SVM execution state into a helper struct
This way we don't have to pass the offset all over the place, and
adding additional state (e.g. for layering in the future) becomes
easier.
Lukas Stockner added this to the Render & Cycles project 2023-07-25 04:06:38 +02:00
Lukas Stockner added the
Module
Render & Cycles
label 2023-07-25 04:06:46 +02:00

Layering support was added in another PR. There is no layer node yet, but we agreed to instead add closure inputs to BSDF nodes that support layering.

Layering support was added in another PR. There is no layer node yet, but we agreed to instead add closure inputs to BSDF nodes that support layering.

Pull request closed

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 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#110444
No description provided.