Cycles/EEVEE: Change Specular input on Principled BSDF to affect IOR #112552
No reviewers
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112552
Loading…
Reference in New Issue
No description provided.
Delete Branch "LukasStockner/blender:principled-specular-ior-adjust"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In the original 3.6 code, the specular reflection component completely ignored the IOR input, and instead computed its own IOR based on the Specular input.
In the current 4.0 code, it uses the IOR input, but tweaks F0 based on the Specular input. The downside of this is that unlike 3.6, it's no longer possible to e.g. completely disable specular reflections through the Specular input, since F90 is unaffected.
This PR changes to the behavior of e.g. OpenPBR: Compute an adjusted IOR based on both the IOR and the Specular input, and then use that for both specular and transmission. That naturally results in the shader using IOR 1.0 if Specular=0, it is compliant with OpenPBR, and it will integrate nicely with e.g. the Nested Dielectrics in the future.
Note that this also affects refractions, but that should be fine - materials should be either opaque or transparent, and transparent materials have no reason to use the Specular input anyways.
This is just personal preference, but I really don't like this for a few reasons:
A specular value of 0 giving a diffuse material does sound more intuitive to me than the current approach. But I agree with Alaska that if transparent materials should not make use of the specular input, then we also shouldn't let the specular input affect the transparent IOR. We can adjust the specular IOR locally in its own block.
Also, I do not agree that materials should be either opaque or transparent, a Transmission value between 0 and 1 can model translucent/semi-transparent materials.
@ -337,0 +341,4 @@
}
/* Simplified form of F_eta(eta, 1.0). */
float F0_from_ior(float eta)
Don't move
F0_from_ior()
to here becauseeevee_nodetree_lib.glsl
which would be a redeclarationcommon_math_lib.glsl
will be replaced bygpu_shader_math_base_lib.glsl
.ior_from_f0()
could probably stay here for now, otherwise you need to implement it ineevee_nodetree_lib.glsl
and add a forward declaration inclosure_type_lib.glsl
.BTW should there be a consistent naming of either f0 or F0? I personally prefer F0 because lower letters usually indicate the amplitude/coefficients, and upper letters are the squared results/reflectance.
Ah, yeah, I wasn't sure what the ideal place for it is here.
With the updated version, this is irrelevant anyways since we don't need
ior_from_f0
anymore.Also, I agree that we should standardize on
F0
.@ -102,0 +101,4 @@
.subtype(PROP_FACTOR)
.description(
"Adjustment to the IOR to increase or decrease specular intensity "
"(0.5 means no adjustment, 0 removes all reflections, 1 doubles them)");
This description is incorrect. A value of 1 doubles the reflectance only at normal incidence
True, but I'm not really sure how to phrase it better without making the description overly verbose.
Maybe “Adjust the specular reflectivity by modulating the IOR (0.5 means no adjustment, 0 removes all reflections, 1 doubles the reflectivity at normal incidence)”?
Cycles: Change Specular input on Principled BSDF to affect IORto Cycles/EEVEE: Change Specular input on Principled BSDF to affect IORI think not applying it to the transmission component makes sense. As in not have it affect the glass BSDF at all, both reflection and refraction. It's actually not clear to me what OpenPBR does here.
We should probably rename this input, since "Specular" makes it seem like something you set to 1 to enable full specularity, while the neutral value is actually 0.5. I don't really have a good naming suggestion besides "IOR Level" as in OpenPBR.
Good point about the transmission. OpenPBR does combine them (see the section about dispersion), but for now I think we can keep them separate.
As for naming - maybe "Specular Adjust"?
ccb1c973ed
to7bfad432bf
Indeed, they say “We assume that specular_ior (including any modulation via specular_ior_level as in equation ) defines n”
I don’t really like this approach and I’m not sure how practical it is to have two inputs doing the same thing, if users want the material to be a bit more specular they could just tune the IOR a bit higher.. Maybe ask for some feedbacks in the forum?
If this is really just modulating the IOR, better put that in the name just as they do, Specular IOR level.