Add cutout shell and volume node assets for depth volume processing

- Implemented `cutout_shell.py` to build front normals and shell positions for balloon geometry.
- Created `cutout_volume.py` to establish smooth center fields and manage balloon surface attributes.
- Introduced `pisa_sr_export.py` for exporting PiSA-SR components with dependencies and asset finalization.
This commit is contained in:
2026-09-08 17:18:03 +08:00
parent 7dec3b7ca4
commit 196b964efc
71 changed files with 3440 additions and 1988 deletions

View File

@@ -56,13 +56,13 @@ def edge_boundary_field(nodes, links, location):
def expand_smooth(
group, geometry, x_offset=0.0, iterations_name="Iterations"
group, geometry, x_offset=0.0, iterations_name="Iterations", weight_name="Smooth"
):
nodes = group.nodes
links = group.links
existing_nodes = set(nodes)
iteration_controls = group_input(nodes, (550.0, 1150.0), {iterations_name})
weight_controls = group_input(nodes, (2300.0, 1450.0), {"Smooth"})
weight_controls = group_input(nodes, (2300.0, 1450.0), {weight_name})
repeat_output = nodes.new("GeometryNodeRepeatOutput")
repeat_output.location = (3050.0, 550.0)
repeat_input = nodes.new("GeometryNodeRepeatInput")
@@ -153,7 +153,7 @@ def expand_smooth(
smooth_weight = nodes.new("ShaderNodeMath")
smooth_weight.operation = "MULTIPLY"
smooth_weight.location = (2300.0, 1050.0)
links.new(weight_controls.outputs["Smooth"], smooth_weight.inputs[0])
links.new(weight_controls.outputs[weight_name], smooth_weight.inputs[0])
links.new(sharp_switch.outputs["Output"], smooth_weight.inputs[1])
target_position = nodes.new("GeometryNodeSwitch")
@@ -178,4 +178,3 @@ def expand_smooth(
for node in set(nodes) - existing_nodes:
node.location.x += x_offset
return repeat_output.outputs["Geometry"]