feat: Implement depth cutout symmetry and associated functionalities
- Introduced a new proposal for depth cutout symmetry, allowing for the reuse of depth replacement and geometry operations. - Added requirements for maintaining default thickness values for cutout nodes and ensuring proper initialization during object creation. - Enhanced symmetry node to handle existing geometry, including alignment, mirroring, and boundary filling. - Implemented fill smoothing to control the geometry of generated walls while preserving original surfaces. - Created tests to validate the functionality of the new symmetry features against baseline geometry. - Updated existing assets and node groups to support the new symmetry capabilities without introducing additional dependencies.
This commit is contained in:
@@ -15,15 +15,13 @@ NODE_GROUP_NAME = "O Image Depth Cutout"
|
||||
|
||||
|
||||
def build_normal_weight(group, is_shell):
|
||||
"""Scale normal smoothing by the active mode's relative thickness."""
|
||||
control = group_input(group.nodes, {"Thickness", "Shell Thickness", "Reference Depth"})
|
||||
"""Use full shell smoothing and thickness-weighted balloon smoothing."""
|
||||
control = group_input(group.nodes, {"Thickness"})
|
||||
amount = group.nodes.new("GeometryNodeSwitch")
|
||||
amount.input_type = "FLOAT"
|
||||
group.links.new(is_shell, amount.inputs["Switch"])
|
||||
group.links.new(control.outputs["Thickness"], amount.inputs["False"])
|
||||
ratio = _math(group, "DIVIDE", control.outputs["Shell Thickness"],
|
||||
_math(group, "MAXIMUM", control.outputs["Reference Depth"], 1e-8))
|
||||
group.links.new(ratio, amount.inputs["True"])
|
||||
amount.inputs["True"].default_value = 1
|
||||
ramp = group.nodes.new("ShaderNodeMapRange")
|
||||
ramp.interpolation_type = "SMOOTHSTEP"
|
||||
ramp.clamp = True
|
||||
@@ -343,8 +341,8 @@ def build_image_depth_cutout_group():
|
||||
group.color_tag = 'GEOMETRY'
|
||||
interface_socket(group, 'Geometry', 'INPUT', 'NodeSocketGeometry')
|
||||
interface_socket(group, 'Mode', 'INPUT', 'NodeSocketMenu')
|
||||
float_input(group, 'Thickness', 1.0).description = 'Control how much the surface bulges in Balloon mode. Zero removes the bulge.'
|
||||
float_input(group, 'Shell Thickness', 0.5, subtype='DISTANCE').description = 'Add thickness behind the original surface while keeping the front surface in place.'
|
||||
float_input(group, 'Thickness', 0.0).description = 'Control how much the surface bulges in Balloon mode. Zero removes the bulge.'
|
||||
float_input(group, 'Shell Thickness', 0.0, subtype='DISTANCE').description = 'Add thickness behind the original surface while keeping the front surface in place.'
|
||||
float_input(group, 'Depth Scale', 1.0)
|
||||
float_input(group, 'Depth Split', 0.1, maximum=1, subtype='FACTOR').description = 'Split the mesh where depth changes abruptly. Higher values detect smaller depth jumps. Zero disables splitting.'
|
||||
iterations = interface_socket(group, 'Smooth', 'INPUT', 'NodeSocketInt')
|
||||
|
||||
Reference in New Issue
Block a user