Skip to content

GSOC 26: multi-material .mtl loading test coverage - #9065

Open
Nixxx19 wants to merge 4 commits into
processing:mainfrom
Nixxx19:phase6-mtl-tests
Open

GSOC 26: multi-material .mtl loading test coverage#9065
Nixxx19 wants to merge 4 commits into
processing:mainfrom
Nixxx19:phase6-mtl-tests

Conversation

@Nixxx19

@Nixxx19 Nixxx19 commented Aug 9, 2026

Copy link
Copy Markdown
Member

what

rounds out the test coverage for multi-material .mtl loading (phase 6), on top of the parser/data layer from #8879 and the renderer from #8955. covers the happy path, the error modes, and the edges the proposal called out.

unit tests

parser (parseMtl.js):

  • a Kd-only material parses without error
  • a malformed mtl (unknown token, missing value, blank line) does not throw

loader (loadModel.js):

  • a single-material obj stays one part (no split, zero regression)
  • a 12-material obj splits into 12 parts, every face accounted for
  • parts get computed normals when the obj has no vn lines
  • each part carries its own localised uvs
  • a failed texture load warns instead of failing silently, and the model still loads

visual regression tests (webgl.js)

  • a multi-material obj renders each material part (textured.obj)
  • a slice with a missing texture falls back to its colour instead of crashing (missing_texture.obj)
  • a 12-material obj renders every material (multi_material_12.obj)
  • a single-material obj renders through the part path (single_material.obj)

each visual test commits a stable reference screenshot.

fixtures added

missing_texture (404 map_Kd), multi_material_12 (12 materials), single_material (one material).

testing

  • loadModel + parseMtl unit suites green
  • all four visual tests generate stable references and match on re-run

part of the gsoc multi-material .mtl work, follows #8879 and #8955.

@p5-bot

p5-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant