aframevr / aframevr/aframe

Docs: Add note in 'material' component or FAQ about texturing models

Open
#3,133 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

Common questions we should probably cover somewhere:

  1. The material component doesn't work on loaded models, except for OBJ models that do not already have an MTL (material) file.
  2. It's usually better to texture in DCC software (e.g. Blender). (Link to tutorial?)
  3. If you do need to texture or re-color something on-the-fly, use three.js APIs like this:
el.addEventListener('model-loaded', function(event) {
  event.details.model.traverse(function(object) {
    if (object.isMesh) {
      object.material.foo = bar;
    }
  });
});

For documentation on THREE.Material and its subclasses, see: https://threejs.org/docs/#api/materials/Material

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

Locate the material component documentation or FAQ entry as the possible destination. Add the requested guidance about loaded models, DCC texturing, runtime three.js material changes, and the THREE.Material reference; done means these common questions are documented clearly in one suitable place.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, three.js
Domain
computer-graphics, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.