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

@@ -0,0 +1,42 @@
## ADDED Requirements
### Requirement: Panorama input uses an exact centered 2:1 crop
The system SHALL prepare panorama conversion from the largest centered integer-pixel rectangle whose width is exactly twice its height. The prepared color material and AI analysis input MUST use the same cropped pixels without stretching, padding, or aspect-ratio resampling.
#### Scenario: Source is wider than 2:1
- **WHEN** a user converts a usable static image whose width is greater than twice its height
- **THEN** the system crops columns equally where possible from the left and right and prepares an exact 2:1 input at the source height
#### Scenario: Source is narrower than 2:1
- **WHEN** a user converts a usable static image whose width is less than twice its height
- **THEN** the system crops rows equally where possible from the top and bottom and prepares the largest exact 2:1 input at or below the source width
#### Scenario: Source width is odd
- **WHEN** a usable static source has an odd width that cannot be part of an exact integer-pixel 2:1 rectangle
- **THEN** the system omits the unmatched column as part of its deterministic centered crop
#### Scenario: Source is already 2:1
- **WHEN** a user converts a usable static image whose width is exactly twice its height
- **THEN** the system prepares the full source image without removing pixels
### Requirement: Panorama crop is disclosed to the user
The system SHALL issue one warning whenever panorama input preparation removes source pixels, and the warning MUST identify both the original and cropped pixel dimensions.
#### Scenario: Conversion requires cropping
- **WHEN** the computed 2:1 bounds differ from the source bounds
- **THEN** the system reports a warning containing the source width and height and the cropped width and height
#### Scenario: Conversion does not require cropping
- **WHEN** the source bounds already form an exact 2:1 image
- **THEN** the system does not report a crop warning
### Requirement: Unsupported panorama sources remain rejected
The system MUST reject animated images and images too small to produce a positive integer-pixel 2:1 crop before submitting panorama generation.
#### Scenario: Source is animated
- **WHEN** a user attempts to convert an animated image
- **THEN** the system reports an error and does not submit panorama generation
#### Scenario: Source cannot produce a positive crop
- **WHEN** a source image cannot provide at least a 2-pixel-wide by 1-pixel-high crop
- **THEN** the system reports an error and does not submit panorama generation