Page MenuHome

Shader Nodes: Changes to node UI and default values to improve consistency
Needs ReviewPublic

Authored by Ethan Hall (Ethan1080) on Mar 7 2022, 6:09 AM.

Details

Summary

This patch makes a few changes to improve these three shader nodes.
It address my comments on https://developer.blender.org/rBed9b21098dd27bf9364397357f89b4c2648f40c2

This patch also includes the same change as: https://developer.blender.org/D14256
Which fixes: https://developer.blender.org/T96207

Diff Detail

Repository
rB Blender
Branch
ui_tweak_shader_nodes (branched from master)
Build Status
Buildable 20860
Build 20860: arc lint + arc unit

Event Timeline

Ethan Hall (Ethan1080) requested review of this revision.Mar 7 2022, 6:09 AM
Ethan Hall (Ethan1080) created this revision.
Hallam Roberts (MysteryPancake) added inline comments.
source/blender/nodes/shader/nodes/node_shader_eevee_specular.cc
29–30

These changes require versioning code in versioning_300:

if (!MAIN_VERSION_ATLEAST(bmain, 302, 3)) {
  FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
    if (ntree->type == NTREE_SHADER) {
      version_node_input_socket_name(ntree, SH_NODE_EEVEE_SPECULAR, "Clear Coat", "Clearcoat");
      version_node_input_socket_name(ntree, SH_NODE_EEVEE_SPECULAR, "Clear Coat Roughness", "Clearcoat Roughness");
      version_node_input_socket_name(ntree, SH_NODE_EEVEE_SPECULAR, "Clear Coat Normal", "Clearcoat Normal");
    }
  }
  FOREACH_NODETREE_END;
}
  • Fixed versioning
Ethan Hall (Ethan1080) marked an inline comment as done.Mar 7 2022, 6:59 AM

@Hallam Roberts (MysteryPancake) Thanks for spotting that.

  • Standardized emission color naming

If you look at the Principle BSDF and Specular BSDF, you will notice that the clearcoat sockets are ordered differently.
I'm waiting to hear which style is better, but making the order consistent could be a part of this patch.

EDIT
This idea will have to wait for another patch, changing node order is a complicated versioning problem.

The Principle BSDF node's Subsurface IOR, Principal Hair BSDF node's IOR, and Subsurface Scattering node's IOR are of the subtype PROP_FACTOR. Everywhere else that I can find the subtype for IOR Is left as default. I personally prefer making the subtype PROP_FACTOR everywhere since it makes fine tuning easier.

Waiting to hear which is better, but making IOR subtypes consistent could be a part of this patch.

Ethan Hall (Ethan1080) retitled this revision from -Made changes to shader nodes UI and default values to improve consistency to Shader Nodes: Changes to node UI and default values to improve consistency.Mar 7 2022, 2:03 PM
  • Renamed "Anisotropic" to "Anisotropy" for the Principle BSDF.
  • Changed the soft max value for IOR from 1000.0f to 5.0f.
  • Set subtype to PROP_FACTOR for sockets with small value ranges.
Ethan Hall (Ethan1080) edited the summary of this revision. (Show Details)Mar 7 2022, 6:15 PM

Concerning the Specular Shader, it looks fine to me.