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

@@ -110,16 +110,6 @@ class RectifyToolTest(BlenderTestCase):
self.assertEqual(len(moving), 4)
def test_rectify_draws_scene_linear_texture_as_srgb_in_blender_5(self):
draw_options = self.rectify_preview.preview_texture_draw_options
self.assertEqual(draw_options((4, 5, 3)), {})
self.assertEqual(
draw_options((5, 0, 0)),
{"is_scene_linear_with_rec709_srgb_target": True},
)
def test_rectify_tightly_crops_alpha(self):
import numpy as np
@@ -214,19 +204,6 @@ class RectifyToolTest(BlenderTestCase):
self.assertAlmostEqual(ratio, 2.0)
def test_rectify_ignores_an_already_removed_preview(self):
operator = self.rectify.RectifyImagePerspective()
operator._preview_image = object()
def remove(*_args, **_options):
raise ReferenceError("StructRNA of type Image has been removed")
self.fake_bpy.data = SimpleNamespace(images=SimpleNamespace(remove=remove))
operator._remove_preview()
self.assertIsNone(operator._preview_image)
def test_rectify_maps_crop_to_source_plane_bounds(self):
bounds = self.rectify_geometry.perspective_placement_bounds(
((10, 20), (30, 20), (30, 40), (10, 40)),