Implement arrangement framework for node groups

- Introduced `frames.py` to manage field complex calculations and their arrangement within node groups.
- Added functionality to create and remove field frames based on node arrangements.
- Developed `passages.py` to find unobstructed paths for connections around calculation frames.
- Implemented `references.py` to route shared results on peripheral tracks, ensuring efficient distribution of outputs.
- Created `sections.py` to reserve space for field calculations adjacent to geometry consumers.
- Added `sources.py` to position shared calculation sources effectively beside their distribution channels.
- Enhanced outline smoothing with `outline_smoothing.py` to adapt camera depth along original outlines.
This commit is contained in:
2026-09-12 12:19:07 +08:00
parent dd32ccdc44
commit 5b2dc59f79
57 changed files with 2253 additions and 700 deletions

View File

@@ -110,7 +110,7 @@ def build_image_depth_balloon_group():
group = bpy.data.node_groups.new(name, 'GeometryNodeTree')
group.is_modifier, group.use_fake_user = (True, True)
group.color_tag = 'GEOMETRY'
group['anyimage_asset_revision'] = 11
group['anyimage_asset_revision'] = 12
interface_socket(group, 'Geometry', 'INPUT', 'NodeSocketGeometry')
float_input(group, 'Thickness', 1.0).description = 'Balloon profile multiplier; zero returns the sheet'
float_input(group, 'Depth Scale', 1.0)
@@ -120,8 +120,8 @@ def build_image_depth_balloon_group():
iterations.min_value, iterations.max_value = (0, 20)
options = group.interface.new_panel(name='Options', default_closed=True)
float_input(group, 'Cleanup Threshold', 0.0, parent=options)
float_input(group, 'Reference Depth', 1.0, subtype='DISTANCE', parent=options)
float_input(group, 'Smooth Weight', 1.0, maximum=1, subtype='FACTOR', parent=options)
float_input(group, 'Reference Depth', 1.0, subtype='DISTANCE', parent=options)
vector_input(group, 'Depth Direction', (0, 0, 1), subtype='DIRECTION', parent=options)
data = group.interface.new_panel(name='Data', default_closed=True)
interface_socket(group, 'Inward Axis', 'INPUT', 'NodeSocketMenu', data).hide_in_modifier = True

View File

@@ -4,7 +4,8 @@ from mathutils import Matrix
from anyimage.operators.cutout_tool.shape import CUTOUT_Z_TO_X, NORMAL_SCALE_ATTRIBUTE_NAME
from ..common.nodes import interface_socket, group_input, math_node, float_input, menu_switch, read_float_attribute, store_float_attribute, prepare_node_group, sample_field, evaluate_field
from ..common.smoothing import expand_smooth
from ..common.boundary_smoothing import smooth_boundary_camera, smooth_cut_boundary
from ..common.boundary_smoothing import smooth_cut_boundary
from ..common.outline_smoothing import smooth_outline_camera
from ..common.cutout import _island_cleanup, _position_field, _remove_zero_thickness, _shade_output
from ..common.depth_surface import _math, project_depth_surface, build_surface_camera, split_depth_surface, sample_face_camera, thicken_depth_surface
from ..common.smoothing import edge_boundary_field
@@ -72,83 +73,33 @@ def build_volume_fields(group):
return {"rim": rim, "center": center, "thickness": thickness}
def build_volume_rounding(group, geometry, fields, uniform, normal_weight=1):
links = group.links
control = group.nodes.new("NodeGroupInput")
profile = group.nodes.new("GeometryNodeInputNamedAttribute")
profile.data_type = "FLOAT"
profile.inputs["Name"].default_value = "o_balloon"
balloon = profile.outputs["Attribute"]
maximum = group.nodes.new("GeometryNodeAttributeStatistic")
maximum.data_type, maximum.domain = "FLOAT", "POINT"
links.new(geometry, maximum.inputs["Geometry"])
links.new(balloon, maximum.inputs["Attribute"])
limit = _math(group, "MAXIMUM", maximum.outputs["Max"], 1e-8)
falloff = group.nodes.new("ShaderNodeMapRange")
falloff.interpolation_type = "SMOOTHERSTEP"
falloff.inputs["To Min"].default_value = 1
falloff.inputs["To Max"].default_value = 0
links.new(balloon, falloff.inputs["Value"])
links.new(limit, falloff.inputs["From Max"])
weight = _math(group, "MULTIPLY", falloff.outputs[0], control.outputs["Edge Round"])
center = fields["center"]
position = group.nodes.new("GeometryNodeInputPosition")
axes = group.nodes.new("ShaderNodeSeparateXYZ")
def build_shell_fields(group, geometry, fields, uniform, normal_weight=1):
"""Evaluate rear directions on the center surface and select shell thickness."""
nodes, links = group.nodes, group.links
position = nodes.new("GeometryNodeInputPosition")
axes = nodes.new("ShaderNodeSeparateXYZ")
links.new(position.outputs[0], axes.inputs[0])
target = _math(group, "ADD", center, balloon)
delta = _math(group, "SUBTRACT", target, axes.outputs["Z"])
delta = _math(group, "MULTIPLY", delta, weight)
enabled = _math(group, "MINIMUM", control.outputs["Thickness"], 1)
enabled = _math(group, "MAXIMUM", enabled, 0)
delta = _math(group, "MULTIPLY", delta, enabled)
rear = _math(group, "MULTIPLY", balloon, weight)
rear = _math(group, "MULTIPLY", rear, control.outputs["Thickness"])
thickness = fields["thickness"]
total = _math(group, "ADD", thickness, delta)
total = _math(group, "ADD", total, rear)
# Evaluate normals on a separate center surface with identical point indices.
center_position = group.nodes.new("ShaderNodeCombineXYZ")
center_position = nodes.new("ShaderNodeCombineXYZ")
for axis in ("X", "Y"):
links.new(axes.outputs[axis], center_position.inputs[axis])
links.new(center, center_position.inputs["Z"])
surface = group.nodes.new("GeometryNodeSetPosition")
links.new(fields["center"], center_position.inputs["Z"])
surface = nodes.new("GeometryNodeSetPosition")
links.new(geometry, surface.inputs["Geometry"])
links.new(center_position.outputs[0], surface.inputs["Position"])
normal = group.nodes.new("GeometryNodeInputNormal")
blur = group.nodes.new("GeometryNodeBlurAttribute")
normal = nodes.new("GeometryNodeInputNormal")
blur = nodes.new("GeometryNodeBlurAttribute")
blur.data_type = "FLOAT_VECTOR"
blur.inputs["Iterations"].default_value = 100
links.new(normal.outputs[0], blur.inputs["Value"])
local = group.nodes.new("NodeGroupInput")
links.new(local.outputs["Normal Smooth"], blur.inputs["Iterations"])
normalized = blend_normal(group, normal.outputs[0], blur.outputs[0], normal_weight)
index = group.nodes.new("GeometryNodeInputIndex")
sample = group.nodes.new("GeometryNodeSampleIndex")
sample.data_type, sample.domain = "FLOAT_VECTOR", "POINT"
links.new(surface.outputs[0], sample.inputs["Geometry"])
links.new(normalized, sample.inputs["Value"])
links.new(index.outputs[0], sample.inputs["Index"])
thickness = group.nodes.new("GeometryNodeSwitch")
rear_normal = sample_field(group, surface.outputs[0], normalized, "FLOAT_VECTOR")
control = group_input(nodes, {"Uniform Thickness"})
thickness = nodes.new("GeometryNodeSwitch")
thickness.input_type = "FLOAT"
links.new(uniform, thickness.inputs["Switch"])
links.new(total, thickness.inputs["False"])
links.new(fields["thickness"], thickness.inputs["False"])
links.new(control.outputs["Uniform Thickness"], thickness.inputs["True"])
rounding = {
"edge_weight": weight, "front_delta": delta,
"thickness": thickness.outputs[0], "normal": sample.outputs[0],
}
displacement = group.nodes.new("ShaderNodeCombineXYZ")
links.new(delta, displacement.inputs["Z"])
front = group.nodes.new("GeometryNodeSetPosition")
links.new(geometry, front.inputs["Geometry"])
links.new(displacement.outputs[0], front.inputs["Offset"])
choose = group.nodes.new("GeometryNodeSwitch")
choose.input_type = "GEOMETRY"
links.new(uniform, choose.inputs["Switch"])
links.new(front.outputs[0], choose.inputs["False"])
links.new(geometry, choose.inputs["True"])
return choose.outputs[0], rounding
return {"thickness": thickness.outputs[0], "normal": rear_normal}
def build_front_fields(group, rim, front_normal, normal_weight=1):
@@ -186,14 +137,10 @@ def build_front_fields(group, rim, front_normal, normal_weight=1):
structure = _math(group, "MAXIMUM", structure, 0)
normal = front_normal
controls = group.nodes.new("NodeGroupInput")
# Keep the accepted broad front-direction filter at the default of 50;
# zero disables both this filter and the initial front/back normal filters.
spread = _math(group, "MULTIPLY", controls.outputs["Normal Smooth"], 256 / 50)
smooth = group.nodes.new("GeometryNodeBlurAttribute")
smooth.data_type = "FLOAT_VECTOR"
links.new(normal, smooth.inputs["Value"])
links.new(spread, smooth.inputs["Iterations"])
smooth.inputs["Iterations"].default_value = 512
normalized = blend_normal(group, normal, smooth.outputs[0], normal_weight)
return {"structure": structure, "inflation_normal": normalized}
@@ -247,17 +194,21 @@ def build_inflation_position(group, position, distance, uniform, fields):
result.operation = "ADD"
links.new(position, result.inputs[0])
links.new(offset.outputs[0], result.inputs[1])
return result.outputs[0]
enabled = group.nodes.new("GeometryNodeSwitch")
enabled.input_type = "VECTOR"
links.new(control.outputs["Front Inflation"], enabled.inputs["Switch"])
links.new(position, enabled.inputs["False"])
links.new(result.outputs[0], enabled.inputs["True"])
return enabled.outputs[0]
def build_front_normal(group, normal_weight):
links = group.links
normal = group.nodes.new("GeometryNodeInputNormal")
control = group.nodes.new("NodeGroupInput")
blur = group.nodes.new("GeometryNodeBlurAttribute")
blur.data_type = "FLOAT_VECTOR"
links.new(normal.outputs[0], blur.inputs["Value"])
links.new(control.outputs["Normal Smooth"], blur.inputs["Iterations"])
blur.inputs["Iterations"].default_value = 100
normalized = blend_normal(group, normal.outputs[0], blur.outputs[0], normal_weight)
return evaluate_field(group, normalized, "FLOAT_VECTOR", "POINT")
@@ -291,35 +242,14 @@ def build_shell_position(group, position, front, uniform, fields):
thin_offset = vector("SCALE", normal, distance)
uniform_position = vector("ADD", front, thin_offset)
# R = t * (front_z - center) + (1 - t) * front_delta, with t clamped.
# This avoids division by Thickness and removes the old zero-thickness drift.
control = group.nodes.new("NodeGroupInput")
control = group_input(group.nodes, {"Thickness"})
clamp = group.nodes.new("ShaderNodeClamp")
links.new(control.outputs["Thickness"], clamp.inputs["Value"])
t = clamp.outputs[0]
center = fields["center"]
delta = fields["front_delta"]
radius = _math(group, "SUBTRACT", front_z, center)
radius = _math(group, "MULTIPLY", radius, t)
remaining = _math(group, "SUBTRACT", 1, t)
remainder = _math(group, "MULTIPLY", remaining, delta)
radius = _math(group, "ADD", radius, remainder)
# Front and rear use the same edge field, evaluated on their own caps.
edge = fields["edge_weight"]
mask = read_float_attribute(group, "o_normal_scale")
remaining = _math(group, "SUBTRACT", 1, edge)
remaining = _math(group, "MULTIPLY", remaining, mask)
weight = _math(group, "SUBTRACT", 1, remaining)
difference = _math(group, "SUBTRACT", weight, edge)
base = _math(group, "MULTIPLY", difference, radius)
layer = _math(group, "MULTIPLY", weight, distance)
rear_radius = _math(group, "ADD", base, layer)
front_radius = _math(group, "MULTIPLY", edge, radius)
normal = fields["normal"]
direction = vector("SUBTRACT", normal, (0, 0, 1))
front_shift = vector("SCALE", direction, front_radius)
front_position = vector("ADD", front, front_shift)
radius = _math(group, "MULTIPLY", _math(group, "SUBTRACT", front_z, fields["center"]), t)
rear = _math(group, "SUBTRACT", 1, read_float_attribute(group, "o_normal_scale"))
rear_radius = _math(group, "MULTIPLY", rear, _math(group, "ADD", radius, distance))
direction = vector("SUBTRACT", fields["normal"], (0, 0, 1))
rear_shift = vector("SCALE", direction, rear_radius)
axis_offset = group.nodes.new("ShaderNodeCombineXYZ")
links.new(distance, axis_offset.inputs["Z"])
@@ -334,7 +264,7 @@ def build_shell_position(group, position, front, uniform, fields):
links.new(transition.outputs[0], mix.inputs[0])
links.new(thin_offset, mix.inputs[4])
links.new(full_offset, mix.inputs[5])
balloon_position = vector("ADD", front_position, mix.outputs["Result"])
balloon_position = vector("ADD", front, mix.outputs["Result"])
choose = group.nodes.new("GeometryNodeSwitch")
choose.input_type = "VECTOR"
links.new(uniform, choose.inputs["Switch"])
@@ -351,11 +281,11 @@ def _build_depth_surface(group, geometry, controls):
scale = controls.outputs["Uniform Scale"]
original = geometry
geometry, corner_camera, cut_vertex = split_depth_surface(
group, geometry, sample_face_camera(group, image), split, scale, triangles=True,
group, geometry, sample_face_camera(group, image), split, controls.outputs["Reference Depth"], triangles=True,
)
geometry = remove_boundary_triangles(group, geometry)
camera = build_surface_camera(group, _position_field(group, image), corner_camera, cut_vertex, split)
camera = smooth_boundary_camera(group, camera)
camera = smooth_outline_camera(group, original, geometry, camera, scale)
projection = project_depth_surface(
group, geometry, camera, scale, controls.outputs["Reference Depth"], controls.outputs["Depth Scale"], split,
)
@@ -370,10 +300,10 @@ def _build_depth_surface(group, geometry, controls):
normal_weight = build_normal_weight(group, uniform)
normal = build_front_normal(group, normal_weight)
front = build_front_fields(group, volume["rim"], normal, normal_weight)
rounded, rounding = build_volume_rounding(group, projection, volume, uniform, normal_weight)
thickness = sample_field(group, projection, rounding["thickness"], "FLOAT")
shell_fields = build_shell_fields(group, projection, volume, uniform, normal_weight)
thickness = sample_field(group, projection, shell_fields["thickness"], "FLOAT")
shell = thicken_depth_surface(
group, rounded, thickness, back_mask=NORMAL_SCALE_ATTRIBUTE_NAME, weld_zero_thickness=True,
group, projection, thickness, back_mask=NORMAL_SCALE_ATTRIBUTE_NAME, weld_zero_thickness=True,
)
fields = {
name: sample_field(group, projection, value, data_type, index=shell["source_index"])
@@ -385,7 +315,7 @@ def _build_depth_surface(group, geometry, controls):
fields.update({
name: sample_field(group, projection, value, "FLOAT_VECTOR" if name == "normal" else "FLOAT",
index=shell["source_index"])
for name, value in rounding.items()
for name, value in shell_fields.items()
})
oriented = build_shell_position(group, shell["position"], shell["front"], uniform, fields)
links.new(oriented, shell["position_input"])
@@ -405,7 +335,7 @@ def build_image_depth_cutout_group():
group = bpy.data.node_groups.new(name, 'GeometryNodeTree')
group.is_modifier, group.use_fake_user = (True, True)
group.color_tag = 'GEOMETRY'
group['anyimage_asset_revision'] = 18
group['anyimage_asset_revision'] = 23
interface_socket(group, 'Geometry', 'INPUT', 'NodeSocketGeometry')
interface_socket(group, 'Mode', 'INPUT', 'NodeSocketMenu')
float_input(group, 'Thickness', 1.0).description = 'Balloon profile multiplier; zero returns the sheet'
@@ -416,17 +346,16 @@ def build_image_depth_cutout_group():
iterations.default_value = 0
iterations.min_value, iterations.max_value = (0, 20)
options = group.interface.new_panel(name='Options', default_closed=True)
boundary_smooth = interface_socket(group, 'Boundary Smooth', 'INPUT', 'NodeSocketInt', options)
boundary_smooth.default_value, boundary_smooth.min_value, boundary_smooth.max_value = 5, 0, 20
boundary_smooth.description = 'Smooth boundary depth and geometry along the original outline and split edges'
float_input(group, 'Cleanup Threshold', 0.0, parent=options)
float_input(group, 'Reference Depth', 1.0, subtype='DISTANCE', parent=options)
float_input(group, 'Edge Round', 0.2, maximum=1, subtype='FACTOR', parent=options)
float_input(group, 'Front Inflation', 1.0, maximum=32, parent=options)
normal_iterations = interface_socket(group, 'Normal Smooth', 'INPUT', 'NodeSocketInt', options)
normal_iterations.default_value = 50
normal_iterations.min_value, normal_iterations.max_value = (0, 50)
float_input(group, 'Smooth Weight', 1.0, maximum=1, subtype='FACTOR', parent=options)
float_input(group, 'Reference Depth', 1.0, subtype='DISTANCE', parent=options)
boundary_smooth = interface_socket(group, 'Boundary Smooth', 'INPUT', 'NodeSocketInt', options)
boundary_smooth.default_value, boundary_smooth.min_value, boundary_smooth.max_value = 2, 1, 20
boundary_smooth.description = 'Boundary geometry iterations and depth blur steps per outline smoothing round'
outline_smooth = interface_socket(group, 'Outline Depth Fix', 'INPUT', 'NodeSocketInt', options)
outline_smooth.default_value, outline_smooth.min_value, outline_smooth.max_value = 16, 0, 200
outline_smooth.description = 'Adaptive ray-distance smoothing rounds around the original outline; preserves split boundary distance'
float_input(group, 'Front Inflation', 0.0, maximum=1, subtype='FACTOR', parent=options)
data = group.interface.new_panel(name='Data', default_closed=True)
interface_socket(group, 'Inward Axis', 'INPUT', 'NodeSocketMenu', data).hide_in_modifier = True
float_input(group, 'Uniform Scale', 1.0, parent=data).hide_in_modifier = True

View File

@@ -39,7 +39,7 @@ def _quad_sphere(group, segments):
def build_image_depth_panorama_group():
group = bpy.data.node_groups.new("O Image Depth Panorama", "GeometryNodeTree")
group.is_modifier = group.use_fake_user = True
group["anyimage_asset_revision"] = 14
group["anyimage_asset_revision"] = 15
interface_socket(group, "Geometry", "INPUT", "NodeSocketGeometry")
subdivide = interface_socket(group, "Subdivide", "INPUT", "NodeSocketInt")
subdivide.default_value, subdivide.min_value, subdivide.max_value = 7, 0, 8
@@ -57,7 +57,6 @@ def build_image_depth_panorama_group():
float_input(group, "Invalid Distance", 100, minimum=1e-5, subtype="DISTANCE", parent=options)
data = group.interface.new_panel("Data", default_closed=True)
interface_socket(group, "Depth Image", "INPUT", "NodeSocketImage", data).hide_in_modifier = True
float_input(group, "Reference Distance", 1, minimum=1e-6, subtype="DISTANCE", parent=data).hide_in_modifier = True
interface_socket(group, "Geometry", "OUTPUT", "NodeSocketGeometry")
nodes, links = group.nodes, group.links
@@ -151,11 +150,15 @@ def build_image_depth_panorama_group():
links.new(group_input(nodes, {"Valid Only"}).outputs["Valid Only"], selection.inputs["Switch"])
links.new(delete.outputs[0], selection.inputs["False"])
links.new(culled, selection.inputs["True"])
controls = group_input(nodes, {"Split Threshold", "Reference Distance"})
controls = group_input(nodes, {"Split Threshold"})
strength = controls.outputs["Split Threshold"]
geometry, corner_camera, cut_vertex = split_depth_surface(group, selection.outputs[0], depth(combine(face_u, face_v))[0], strength,
_math(group, "DIVIDE", 1, controls.outputs["Reference Distance"]),
face_center=face.outputs["Value"])
face_camera = depth(combine(face_u, face_v))[0]
radial = nodes.new("ShaderNodeSeparateXYZ")
links.new(face_camera, radial.inputs[0])
geometry, corner_camera, cut_vertex = split_depth_surface(
group, selection.outputs[0], face_camera, strength, 1.0,
face_distance=radial.outputs["X"], face_center=face.outputs["Value"],
)
distance = build_surface_camera(group, pixel, corner_camera, cut_vertex, strength)
axes = nodes.new("ShaderNodeSeparateXYZ")
links.new(distance, axes.inputs[0])

View File

@@ -25,7 +25,7 @@ def build_image_depth_plane_group(image_plane_group):
"GeometryNodeTree",
)
group.is_modifier = True
group["anyimage_asset_revision"] = 14
group["anyimage_asset_revision"] = 16
geometry = _interface_socket(group, "Geometry", "INPUT", "NodeSocketGeometry")
geometry.structure_type = "SINGLE"
subdivide = _interface_socket(group, "Subdivide", "INPUT", "NodeSocketInt")
@@ -40,35 +40,18 @@ def build_image_depth_plane_group(image_plane_group):
depth_scale = _interface_socket(group, "Depth Scale", "INPUT", "NodeSocketFloat")
depth_scale.default_value = 1.0
depth_scale.min_value = 0.0
float_input(group, "Split Threshold", 0.0, maximum=1, subtype="FACTOR")
float_input(group, "Split Threshold", 0.1, maximum=1, subtype="FACTOR")
iterations = _interface_socket(group, "Smooth", "INPUT", "NodeSocketInt")
iterations.default_value = 0
iterations.min_value, iterations.max_value = 0, 20
valid_only = _interface_socket(group, "Valid Only", "INPUT", "NodeSocketBool")
valid_only.default_value = True
options = group.interface.new_panel(name="Options", default_closed=True)
float_input(group, "Smooth Weight", 1.0, maximum=1, subtype="FACTOR", parent=options)
float_input(group, "Reference Depth", 1.0, subtype="DISTANCE", parent=options)
boundary_smooth = _interface_socket(group, "Boundary Smooth", "INPUT", "NodeSocketInt", parent=options)
boundary_smooth.default_value, boundary_smooth.min_value, boundary_smooth.max_value = 5, 0, 20
boundary_smooth.default_value, boundary_smooth.min_value, boundary_smooth.max_value = 2, 0, 20
boundary_smooth.description = "Smooth boundary depth and cut-edge geometry while preserving the original image border"
base_plane_depth = _interface_socket(
group,
"Reference Depth",
"INPUT",
"NodeSocketFloat",
parent=options,
)
base_plane_depth.default_value = 1.0
base_plane_depth.min_value = 0.0
base_plane_depth.subtype = "DISTANCE"
normal_smooth = _interface_socket(
group, "Normal Smooth", "INPUT", "NodeSocketInt", parent=options,
)
normal_smooth.default_value, normal_smooth.min_value, normal_smooth.max_value = 50, 0, 50
normal_smooth.description = "Smooth the shell thickness direction"
smooth_weight = _interface_socket(group, "Smooth Weight", "INPUT", "NodeSocketFloat", parent=options)
smooth_weight.default_value = 1.0
smooth_weight.min_value, smooth_weight.max_value = 0.0, 1.0
smooth_weight.subtype = "FACTOR"
validity_threshold = _interface_socket(group, "Validity Threshold", "INPUT", "NodeSocketFloat", parent=options)
validity_threshold.default_value = 0.9
validity_threshold.min_value, validity_threshold.max_value = 0.0, 1.0
@@ -134,9 +117,10 @@ def build_image_depth_plane_group(image_plane_group):
links.new(culled, cull.inputs["True"])
links.new(protected, cull.inputs["False"])
split_input = _group_input(nodes, {"Split Threshold"})
reference_input = _group_input(nodes, {"Reference Depth"})
geometry, corner_camera, cut_vertex = split_depth_surface(
group, cull.outputs["Output"], sample_face_camera(group, texture_input.outputs["Depth Image"]),
split_input.outputs["Split Threshold"], scale_input.outputs["Uniform Scale"],
split_input.outputs["Split Threshold"], reference_input.outputs["Reference Depth"],
)
camera = build_surface_camera(
group, texture.outputs["Color"], corner_camera, cut_vertex,
@@ -150,10 +134,10 @@ def build_image_depth_plane_group(image_plane_group):
depth_input.outputs["Depth Scale"], split_input.outputs["Split Threshold"],
)
surface = smooth_cut_boundary(group, surface, original_boundary)
shell_input = _group_input(nodes, {"Thickness", "Normal Smooth"})
shell_input = _group_input(nodes, {"Thickness"})
shell = thicken_depth_surface(
group, surface, shell_input.outputs["Thickness"],
normal_smooth=shell_input.outputs["Normal Smooth"],
normal_smooth=100,
)
positive = nodes.new("ShaderNodeMath")
positive.operation = "GREATER_THAN"