feat(cutout): implement boundary padding for cutout textures

- Introduced a new `Boundary Padding` preference in the Cutout Tool with a default of 2 px and a configurable range of 1-4 px.
- Updated the Cutout client to establish inward mapping from the final Mask, sampling in a fixed direction and processing independent material RGBA and Depth.
- Enhanced the handling of RGBA and Depth during cutout operations, ensuring proper mapping and preservation of source data.
- Added tests to validate the new boundary padding functionality and its integration with existing cutout processes.

feat(geometry): remove overall mesh smoothing from geometry nodes

- Removed the `Smooth` input from several geometry node groups to eliminate unnecessary overall mesh smoothing.
- Retained `Smooth Weight` for depth nodes while removing it from Cutout and Relief Plane nodes.
- Ensured that boundary, normal, and fill smoothing behaviors remain intact and consistent.
- Updated tests and documentation to reflect the changes in node interfaces and behaviors.

feat(normals): scale tangent normals with depth

- Reused the existing `o_normal_reduction` attribute to adjust Tangent Normal strength based on the geometry's `Depth Scale`.
- Ensured that Tangent Normal strength is consistent with the geometry depth, preserving full strength for materials that do not provide the attribute.
- Updated tests to verify the correct behavior of normal strength adjustments in both Tangent and Object Space.
This commit is contained in:
2026-09-15 00:40:24 +08:00
parent ab282e4fdf
commit 591e62085a
93 changed files with 1915 additions and 2851 deletions

View File

@@ -67,14 +67,12 @@ def surface(*, step=6.0, size=1.0, resolution=2, wrapper=False):
("Front Inflation", 0.0),
("Depth Split", 0.0),
("Mode", 1),
("Smooth", 0),
("Boundary Smooth", 0),
):
set_value(name, value)
if wrapper:
set_value("Cleanup Threshold", 0.0)
set_value("Depth Axis", 0)
set_value("Smooth", 0)
return obj, set_value

View File

@@ -125,16 +125,12 @@ def _add_cutout_modifier(obj, shape):
object_data.modifier_input_identifier(group, "Cleanup Threshold"),
0.0,
)
object_data.set_modifier_input(
modifier,
object_data.modifier_input_identifier(group, "Smooth Weight"),
0.0,
)
object_data.set_modifier_input(
modifier,
object_data.modifier_input_identifier(group, "Smooth"),
1,
)
if shape == "DEPTH_SOLID":
object_data.set_modifier_input(
modifier,
object_data.modifier_input_identifier(group, "Smooth Weight"),
0.0,
)
return modifier
@@ -167,7 +163,6 @@ def _depth_surface_step_object():
("Uniform Scale", 1.0),
("Reference Depth", 1.0),
("Thickness", 0.0),
("Smooth", 0),
):
object_data.set_modifier_input(
modifier,

View File

@@ -54,6 +54,8 @@ def create_surface(plane_type):
("Uniform Scale", 0.5), ("Reference Depth", 1.2),
("Depth Scale", 0.0), ("Thickness", 0.0)):
set_value(name, value)
if "Depth Offset" in inputs:
set_value("Depth Offset", 0.0)
if "Boundary Smooth" in inputs:
set_value("Boundary Smooth", 0)
if "Depth Split" in inputs: