[212] Pathtracer Etappe 4: Normalen- und Rauigkeitskarten (Tangentenrahmen der planaren UV, Toksvig), Mip-Stufen mit LOD nach Strahlkegel, Bildkarten bis zum ersten Abpraller, Gelände-Material (TerrainMesh.componentId, Objekt-Info, 3D/Pathtracer/Blender), Wiese Grass005 statt prozedural

This commit is contained in:
Claude committed 2026-11-13 17:37:57 +00:00
1 parent 118d06010c
commit ca30e74ce1
27 files changed
+1188 -132

No files matched your search

+15
View File
@@ -28,6 +28,7 @@ import {
renderCameraOf,
splitRoofMaterials,
TERRAIN_MATERIAL,
terrainRenderMaterial,
type BlenderHost,
type RenderOptions,
} from "./blenderRender";
@@ -366,6 +367,20 @@ describe("Materialzuordnung Gelände und Dach ([211])", () => {
expect(t2.textures).toBeUndefined();
});
it("[212] Gelände mit Bauteil: dessen Bildkarten statt der Wiese", async () => {
const kies = (mk.components ?? []).find((c) => c.material?.color?.includes("Gravel043"))!;
expect(kies).toBeDefined();
const withComp: Project = { ...mk, context: (mk.context ?? []).map((o) => (o.type === "terrainMesh" ? { ...o, componentId: kies.id } : o)) };
expect(terrainRenderMaterial(withComp)).toBe(kies.material);
expect(terrainRenderMaterial(mk)).toBe(TERRAIN_MATERIAL);
const loaded: string[] = [];
const pkg = await buildRenderPackage(withComp, opts(), async (url) => (loaded.push(url), new Uint8Array([1])));
const terrain = pkg.scene.materials.find((m) => m.role === "terrain")!;
expect(terrain.textures?.color).toBeDefined();
expect(loaded).toContain(kies.material!.color);
expect(loaded).not.toContain(TERRAIN_MATERIAL.color);
});
it("Glas und Öffnungsteile haben ihre Rolle, Wände „building“", async () => {
const pkg = await buildRenderPackage(mk, opts());
expect(pkg.scene.materials.find((m) => m.glass)?.role).toBe("opening");