Cycles: Replace Sheen model in the Principled BSDF #109949

Merged
Lukas Stockner merged 1 commits from LukasStockner/blender:sheen-principled into main 2023-07-27 02:17:52 +02:00
Member

This replaces the Sheen model used in the Principled BSDF with the model from #108869 that is already used in the Sheen BSDF now.

The three notable differences are:

  • At full intensity (Sheen = 1.0), the new model is significantly stronger than the old one. For existing files, the intensity is adjusted to keep the overall look similar.
  • The Sheen Tint input is now a color input, instead of the previous blend factor between white and the base color.
  • There is now a Sheen roughness control, which can be used to tweak the look between velvet-like and dust-like.
This replaces the Sheen model used in the Principled BSDF with the model from #108869 that is already used in the Sheen BSDF now. The three notable differences are: - At full intensity (Sheen = 1.0), the new model is significantly stronger than the old one. For existing files, the intensity is adjusted to keep the overall look similar. - The Sheen Tint input is now a color input, instead of the previous blend factor between white and the base color. - There is now a Sheen roughness control, which can be used to tweak the look between velvet-like and dust-like.
Lukas Stockner added the
Module
Render & Cycles
label 2023-07-11 02:25:43 +02:00
Lukas Stockner force-pushed sheen-principled from 222f4e5ba3 to 9b7ee1ffac 2023-07-24 16:10:28 +02:00 Compare
Lukas Stockner changed title from WIP: Replace Sheen model in the Principled BSDF to Replace Sheen model in the Principled BSDF 2023-07-24 16:10:52 +02:00
Lukas Stockner added this to the Render & Cycles project 2023-07-24 16:11:01 +02:00
Lukas Stockner requested review from Brecht Van Lommel 2023-07-24 16:11:07 +02:00
Brecht Van Lommel approved these changes 2023-07-25 15:46:58 +02:00
Brecht Van Lommel left a comment
Owner

Looks good besides minor comment that does not need re-review.

Looks good besides minor comment that does not need re-review.
@ -299,0 +301,4 @@
static void version_principled_bsdf_sheen(bNodeTree *ntree)
{
auto check_node = [](const bNode *node) {
return (node != nullptr) && (node->type == SH_NODE_BSDF_PRINCIPLED) &&

Why does this check node != nullptr, but square_roughness_node_insert does not?

Maybe move that check to version_update_node_input.

Why does this check `node != nullptr`, but `square_roughness_node_insert` does not? Maybe move that check to `version_update_node_input`.

Might be used version_node_id, version_node_socket_name, version_node_input_socket_name, node_tree_relink_with_socket_id_map too

Might be used `version_node_id`, `version_node_socket_name`, `version_node_input_socket_name`, `node_tree_relink_with_socket_id_map` too
Author
Member

Might be used version_node_id, version_node_socket_name, version_node_input_socket_name, node_tree_relink_with_socket_id_map too

These look useful in general, but in this case there's some additional conversion going on (the type of the socket changes, as well as the default value in case of old files), so there would need to be custom logic anyways.

> Might be used `version_node_id`, `version_node_socket_name`, `version_node_input_socket_name`, `node_tree_relink_with_socket_id_map` too These look useful in general, but in this case there's some additional conversion going on (the type of the socket changes, as well as the default value in case of old files), so there would need to be custom logic anyways.
Author
Member

Why does this check node != nullptr, but square_roughness_node_insert does not?

For some reason tests/render/reports/T48790.blend contains a link with tonode==NULL. But yeah, it's better to handle it in version_update_node_input.

> Why does this check `node != nullptr`, but `square_roughness_node_insert` does not? For some reason `tests/render/reports/T48790.blend` contains a link with `tonode==NULL`. But yeah, it's better to handle it in `version_update_node_input`.

These look useful in general, but in this case there's some additional conversion going on (the type of the socket changes, as well as the default value in case of old files), so there would need to be custom logic anyways.

Changing the socket type and its value, is this the area of runtime declarations...?

> These look useful in general, but in this case there's some additional conversion going on (the type of the socket changes, as well as the default value in case of old files), so there would need to be custom logic anyways. Changing the socket type and its value, is this the area of runtime declarations...?
Author
Member

Changing the socket type and its value, is this the area of runtime declarations...?

Not sure about the details, but I don't think so, the type of the socket is fixed - it's just a one-time change from older to newer versions.

> Changing the socket type and its value, is this the area of runtime declarations...? Not sure about the details, but I don't think so, the type of the socket is fixed - it's just a one-time change from older to newer versions.
Lukas Stockner force-pushed sheen-principled from 9b7ee1ffac to 866f1bcf18 2023-07-27 02:01:34 +02:00 Compare
Lukas Stockner changed title from Replace Sheen model in the Principled BSDF to Cycles: Replace Sheen model in the Principled BSDF 2023-07-27 02:13:14 +02:00
Lukas Stockner merged commit c66a694056 into main 2023-07-27 02:17:52 +02:00
Lukas Stockner deleted branch sheen-principled 2023-07-27 02:17:53 +02: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 Assignees
3 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#109949
No description provided.