question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Obj2Gltf doesn't always convert materials

See original GitHub issue

I’ve spent some time trying to get this library to use the proper materials in the glTF files it creates, without success. I decided to do a sanity check and attempt to use Obj2Gltf to convert a .obj created with this library to glTF and see if materials were imported. To my surprise, they were not.

Every OBJ viewer I have tried loads the materials properly. The materials, in this case, are just some colors, and not any textures. The materials are stored in a .mtl file with the same basename and path as the .obj file.

If you would like the files I am using, please let me know.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
javaglcommented, Apr 12, 2018

There’s the KHR_materials_common extension. It was originally only defined for glTF 1.0. I thought there are also efforts for creating something similar for glTF 2.0, but couldn’t find it in the meeting agendas right now. In any case, there are currently some other, related extensions (mainly KHR_lights) that are currently being sorted out.

Leaving the issue open until the MTL-to-glTF-PBR translation is extended to at least a “more reasonable” state is fine. I hope that I can allocate some more time for this soon…

0reactions
javaglcommented, Jul 14, 2018

A very basic extension of the translation from MTL to PBR was done in https://github.com/javagl/JglTF/commit/2470c78a2e3218f383db803a33829746cdff6ba9 . It will have to be extended after the extended MTL support is part of a released version of the OBJ library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OBJ2GLTF: Convert OBJ assets to glTF - Morioh
In today's post we will learn about obj2gltf: Convert OBJ assets to glTF. ... workflows where the .mtl does not exist or is...
Read more >
A-frame not loading materials
I can successfully get the model in but it always comes out grey with the console telling me: "Material component properties are ignored ......
Read more >
Our miserable journey from OBJ to GLB or How to get a ...
3Ds Max doesn't have native tools to export to GLTF/GLB, so there're two ... thread hoping to convert OBJ directly to glTF, obj2gltf...
Read more >
Your Home Digital Twin: Interactive floor 3d plan - ...
I converted my obj to glb as per instructions on the github page ... but It looks like objects with a single material...
Read more >
Understanding how Materials work with glTF models - YouTube
Any questions? Join us in discord: https://discord.com/invite/dFJncWwHunNote: The beginning of this stream is missing audio, but it kicks in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found