feat: Add new Geometry Nodes groups for image relief and shadeless shader

- Implemented the "O Image Relief Plane" Geometry Nodes group to create a fixed-base image relief using depth images and various parameters.
- Created the "O Shadeless" shader node group to display color without scene lighting while preserving shadows and reflections.
- Introduced a preview feature for node groups, allowing for interactive visualization of node arrangements in an HTML format.
- Added a template HTML file for rendering node previews with customizable views and controls.
This commit is contained in:
2026-09-09 21:24:57 +08:00
parent f5aff50b13
commit 89087fc2e2
118 changed files with 5635 additions and 3130 deletions

View File

@@ -16,6 +16,9 @@ from anyimage.operators.clipboard_image import actions as clipboard_actions
from anyimage.operators.convert_to_plane import object as plane_object
from anyimage.operators.cutout_tool import shape as cutout_shape
from image_object_test_support import _depth_image, _depth_metadata, _evaluated_positions, _inputs
from tools.nodes.groups.image_plane import build_image_plane_group
from tools.nodes.groups.image_depth_plane import build_image_depth_plane_group
from tools.nodes.groups.image_relief_plane import build_image_relief_plane_group
def test_build_plane_keeps_one_quad_and_generates_topology_in_geometry_nodes():
@@ -76,6 +79,7 @@ def test_clipboard_plane_uses_the_mesh_material_slot():
def test_converted_planes_center_the_origin_without_moving_world_corners():
bpy.ops.wm.read_factory_settings(use_empty=True)
build_image_depth_plane_group(build_image_plane_group())
def create_source(name):
image = bpy.data.images.new(name, width=200, height=100)
@@ -146,6 +150,7 @@ def test_converted_planes_center_the_origin_without_moving_world_corners():
(2, 2),
1.0,
),
"DEPTH",
)
assert_centered(depth_plane, depth_bounds, depth_matrix)
assert depth_plane["anyimage_mesh_shape"] == "DEPTH_PLANE"
@@ -167,8 +172,9 @@ def test_converted_planes_center_the_origin_without_moving_world_corners():
)
def test_depth_plane_builds_a_fixed_base_terrain_block():
def test_relief_plane_builds_a_fixed_base_terrain_block():
bpy.ops.wm.read_factory_settings(use_empty=True)
build_image_relief_plane_group(build_image_plane_group())
image = bpy.data.images.new("Terrain", width=4, height=4)
source = bpy.data.objects.new("Terrain", None)
source.empty_display_type = "IMAGE"
@@ -191,7 +197,10 @@ def test_depth_plane_builds_a_fixed_base_terrain_block():
(4, 4),
1.0,
),
"RELIEF",
)
assert result["anyimage_mesh_shape"] == "RELIEF_PLANE"
assert result.modifiers[0].node_group.name == "O Image Relief Plane"
modifier = result.modifiers[0]
group = modifier.node_group