processing / processing/p5.js

Support for `.mtl` Files with Textures

Open
#6,924 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:WebGL Enhancement
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Increasing access

This enhancement would make it easier for people to use pre-made 3D models within their p5.js projects. It would broaden the creative possibilities for artists and designers by enabling more detailed and textured 3D models within p5.js projects.

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)
Feature enhancement details

Since version 1.9.2, p5.js supports .mtl files, but only for vertex colors (see processing/p5.js#6710).

This request aims to extend that support to include textures loaded by an .mtl file. Implementing this feature would involve creating a new data structure capable of handling both 3D models and their associated textures, potentially multiple per model.

Example sketch with a single texture: https://aijs.io/editor?user=sableraph&project=multiTextureMaterial_test

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing .mtl support described in processing/p5.js#6710 and the linked multiTextureMaterial_test example. Clarify how textures associated with .mtl materials should be represented alongside 3D models, including multiple textures per model. Done means .mtl files load their textures correctly in p5.js WebGL sketches.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.