Color management issues for .obj + .mtl
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
A-Frame Version: 1.4.2
Platform / Device: chrome for windows different versions, oculus quest2 browser
I'm trying to export scene from Blender to my AFrame based web page for VR. For some reasons i prefer to use obj+mtl format. I found a few issues regarding loading model to AFrame:
- All the materials during load assumed to have sRGB colors and converted to linear color space using convertSRGBToLinear(). BUT blender export the exact colors i wish to see in scene and i can not find a way to disable this mandatory color "correction" which ruine the model. Take a look at MTLLoader.js line 387 method createMaterial_( materialName )
- For models which use material more than once all material colors become black or about black. I'm not sure about reason but a think that's because that correction apply multiple times to same material.
- The diffuse map textures become dark (also color space "correction") until i set renderer="colorManagement: true"
Please can you help me to overcome this obj+mtl loading issues or add an option to disable unnecessary color "corrections" for <a-obj-model>?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with MTLLoader.js at line 387, in createMaterial_(materialName), and review how loads materials. Reproduce the reported behavior with a Blender-exported OBJ+MTL model, including reused materials and diffuse maps, in the listed Chrome or Oculus Quest 2 environments. Done means the model colors and textures load correctly without unwanted repeated color correction, or the requested opt-out is clearly supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100