From b35fff7bbef8aaf5c6ce66cd210523c9ecd5076c Mon Sep 17 00:00:00 2001 From: Jesse Yurkovich Date: Sun, 3 Dec 2023 01:27:31 -0800 Subject: [PATCH 1/2] Fix #105040: Adjust Real Snow addon to Principled BSDF changes --- real_snow.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/real_snow.py b/real_snow.py index 8cc0e6855..b4c7daf91 100644 --- a/real_snow.py +++ b/real_snow.py @@ -6,8 +6,8 @@ bl_info = { "name": "Real Snow", "description": "Generate snow mesh", "author": "Marco Pavanello, Drew Perttula", - "version": (1, 3), - "blender": (3, 1, 0), + "version": (1, 3, 1), + "blender": (4, 0, 0), "location": "View 3D > Properties Panel", "doc_url": "{BLENDER_MANUAL_URL}/addons/object/real_snow.html", "tracker_url": "https://gitlab.com/marcopavanello/real-snow/-/issues", @@ -274,19 +274,18 @@ def add_material(obj: bpy.types.Object): # Change node parameters principled.distribution = "MULTI_GGX" principled.subsurface_method = "RANDOM_WALK" - principled.inputs[0].default_value[0] = 0.904 + principled.inputs[0].default_value[0] = 0.904 # Base color principled.inputs[0].default_value[1] = 0.904 principled.inputs[0].default_value[2] = 0.904 - principled.inputs[1].default_value = 1 - principled.inputs[2].default_value[0] = 0.36 - principled.inputs[2].default_value[1] = 0.46 - principled.inputs[2].default_value[2] = 0.6 - principled.inputs[3].default_value[0] = 0.904 - principled.inputs[3].default_value[1] = 0.904 - principled.inputs[3].default_value[2] = 0.904 - principled.inputs[7].default_value = 0.224 - principled.inputs[9].default_value = 0.1 - principled.inputs[15].default_value = 0.1 + principled.inputs[7].default_value = 1 # Subsurface weight + principled.inputs[9].default_value = 1 # Subsurface scale + principled.inputs[8].default_value[0] = 0.36 # Subsurface radius + principled.inputs[8].default_value[1] = 0.46 + principled.inputs[8].default_value[2] = 0.6 + principled.inputs[12].default_value = 0.224 # Specular + principled.inputs[2].default_value = 0.1 # Roughness + principled.inputs[19].default_value = 0.1 # Coat roughness + principled.inputs[20].default_value = 1.2 # Coat IOR vec_math.operation = "MULTIPLY" vec_math.inputs[1].default_value[0] = 0.5 vec_math.inputs[1].default_value[1] = 0.5 @@ -321,7 +320,7 @@ def add_material(obj: bpy.types.Object): # Link nodes link = mat.node_tree.links link.new(principled.outputs[0], output.inputs[0]) - link.new(vec_math.outputs[0], principled.inputs[2]) + link.new(vec_math.outputs[0], principled.inputs[8]) link.new(com_xyz.outputs[0], vec_math.inputs[0]) link.new(dis.outputs[0], output.inputs[2]) link.new(mul1.outputs[0], dis.inputs[0]) @@ -329,7 +328,7 @@ def add_material(obj: bpy.types.Object): link.new(add2.outputs[0], add1.inputs[0]) link.new(mul2.outputs[0], add2.inputs[0]) link.new(mul3.outputs[0], add2.inputs[1]) - link.new(range1.outputs[0], principled.inputs[14]) + link.new(range1.outputs[0], principled.inputs[18]) link.new(range2.outputs[0], mul3.inputs[0]) link.new(range3.outputs[0], add1.inputs[1]) link.new(vor.outputs[4], range1.inputs[0]) -- 2.30.2 From 7c9cecedca416617961f0e13145e4c53c6a14815 Mon Sep 17 00:00:00 2001 From: Jesse Yurkovich Date: Mon, 4 Dec 2023 08:48:45 -0800 Subject: [PATCH 2/2] Match subsurface method to prior value --- real_snow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/real_snow.py b/real_snow.py index b4c7daf91..b60a4392f 100644 --- a/real_snow.py +++ b/real_snow.py @@ -273,7 +273,7 @@ def add_material(obj: bpy.types.Object): coord.location = (-1900, 0) # Change node parameters principled.distribution = "MULTI_GGX" - principled.subsurface_method = "RANDOM_WALK" + principled.subsurface_method = "RANDOM_WALK_SKIN" principled.inputs[0].default_value[0] = 0.904 # Base color principled.inputs[0].default_value[1] = 0.904 principled.inputs[0].default_value[2] = 0.904 -- 2.30.2