Skip to content

GSOC 26: render multi-material models per part#8955

Open
Nixxx19 wants to merge 9 commits into
processing:mainfrom
Nixxx19:renderer-per-part
Open

GSOC 26: render multi-material models per part#8955
Nixxx19 wants to merge 9 commits into
processing:mainfrom
Nixxx19:renderer-per-part

Conversation

@Nixxx19

@Nixxx19 Nixxx19 commented Jun 24, 2026

Copy link
Copy Markdown
Member

part of my google summer of code 2026 project, "full texture support for .mtl files in p5.js". works toward #6924.

this is phase 3: the renderer side, building on the data + parser foundation in #8879. multi-material models now actually draw, one part per material, each with its own look. public api is unchanged, you still just call loadModel() and model().

project phases for context:

what's in here:

  • the renderer loops over a geometry's parts and draws each one
  • each part applies its own material (fill, specular, ambient, shininess, texture) around its draw, restored after so nothing leaks between parts
  • a single-material geometry is its own part, so that path renders exactly as before, byte for byte
  • p5.GeometryPart gains what the renderer needs to treat it as a drawable (hasFillTransparency, userVertexProperties)

tests:

  • a multi-material model (octa-color, 8 materials) draws one fill per part and passes the instance count through
  • the existing obj+mtl diffuse-colour visual test still matches its reference screenshot
  • full unit suite green, including the webgpu and visual (pixel-compare) tests

stacked on #8879, so it should go in after that one merges.

@Nixxx19 Nixxx19 changed the title render multi-material models per part GSOC 26: render multi-material models per part Jun 24, 2026
@p5-bot

p5-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

Continuous Release

CDN link

Published Packages

Commit hash: c9c0cc4

Previous deployments

ef33f8e


This is an automated message.

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