Add new tests and functionality for image processing and geometry handling

- Introduced color_image.py for preparing standalone color images for tests.
- Added hdr_image.py to create HDR textures for testing.
- Implemented test_image_depth_panorama.py to evaluate panorama topology, UVs, and depth discontinuities.
- Created test_shadeless.py to validate the opacity and HDR color endpoints of the Shadeless group.
- Developed moge3_export.py for exporting dynamic MoGe-3 backbone and ONNX graphs.
- Added material.py to inherit material slots onto generated geometry.
- Built image_depth_panorama.py to construct a quad panorama with depth separation and sampling.
This commit is contained in:
2026-09-10 14:42:17 +08:00
parent 27ca25224a
commit 489003c2cc
136 changed files with 5758 additions and 1083 deletions

View File

@@ -7,6 +7,8 @@ from mathutils import Matrix, Vector
from anyimage.common import depth as depth_data
from anyimage.common import color_image as colors
from tests.support.color_image import color_image as prepared_color_image
from anyimage.common import image as image_data
from anyimage.common import material as material_data
from anyimage.common import object as object_data
@@ -808,24 +810,20 @@ def test_bounds_input_preserves_rectangular_rgba_and_stays_packed_after_cleanup(
),
dtype=np.float32,
)
path = image_data.prepare_image_bounds_input(image, rgba, (1, 1, 5, 4))
path = colors.prepare_material_color_input(image, (1, 1, 5, 4), rgba)
result = None
try:
result = image_data.load_packed_rgba_image(
path,
image,
"Bounds Result",
)
result = colors.load_material_color_image(path)
loaded = image_data.image_rgba(result)
np.testing.assert_allclose(loaded, rgba[1:4, 1:5], atol=1.0 / 255.0)
assert result.packed_file is not None
image_data.cleanup_image_input(path, True)
colors.cleanup_material_color_input(path)
assert not path.exists()
assert result.packed_file is not None
finally:
image_data.cleanup_image_input(path, True)
colors.cleanup_material_color_input(path)
if result is not None:
bpy.data.images.remove(result, do_unlink=True)
@@ -898,8 +896,8 @@ def test_local_cutout_builds_from_blender_image_pixels_without_a_job():
selection_mask.values,
alpha_threshold=0.5,
)
color_image = cutout_object.create_cropped_color_image(
source,
color_image = prepared_color_image(
source.data,
selection_mask.bounds,
rgba,
)