Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Question about material extension #29

Closed
Arcnor opened this issue Jul 3, 2017 · 7 comments
Closed

Question about material extension #29

Arcnor opened this issue Jul 3, 2017 · 7 comments
Labels

Comments

@Arcnor
Copy link

Arcnor commented Jul 3, 2017

Sorry if this is not the right place for questions, but I don't see any other channel for this kind of thing.

I see that the exporter uses the KHR_materials_cmnBlinnPhong extension for materials. However, this doesn't seem to be the same extension defined at https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_materials_common (that name is not even found in the whole of the repository, including issues). Also, it doesn't seem to be the same extension ThreeJS implements (that one seems to be called KHR_materials_common and it seems to match a bit what the official repository discuss in some issues)

So the question is, where is this extension defined? I'm trying to implement an exporter and viewer, but I'm finding it very difficult to support all extensions out there, as there seems to be little in the way of documentation.

Thanks in advance, and again sorry if this is not the right channel.

@donmccurdy
Copy link
Contributor

donmccurdy commented Jul 4, 2017

Hi @Arcnor — the core glTF2.0 spec is finalized, including PBR, but the extensions for common materials are not final yet. The previous versions used KHR_materials_common for common materials, but it's likely we'll switch to KHR_materials_cmnBlinnPhong for the glTF2.0 extension.

So, the Blender exporter is closer to where I think things will end up, but that feature is still experimental (and hasn't been implemented in three.js yet). Assuming no major changes, we'll probably implement KHR_materials_cmnBlinnPhong in three.js in a few weeks.

@Arcnor
Copy link
Author

Arcnor commented Jul 4, 2017

Ok, thanks for the information. Any place where I can find where/when this happens? As I said, the only place where this extension is even named on what it appears to be the whole Internet is this repository 😄 .

In any case, I'll change my exporter to the new thing soon as well, although I'm guessing even if ThreeJS supports the new standard, is going to ignore the ambientTexture for example, as it ignores ambient right now, am I correct? In that case I'll probably check Babylon instead, as my exporter needs to work with all properties without changes.

Thanks again!

@donmccurdy
Copy link
Contributor

You can subscribe to updates on these: KhronosGroup/glTF#947 KhronosGroup/glTF#633

But that's correct; three.js doesn't do a separate ambient color or map on phong materials, and it's possible ambient will be omitted from glTF's blinn-phong extension in the end, too. If that's a problem for you please weigh in here. :)

@Arcnor
Copy link
Author

Arcnor commented Jul 4, 2017

Thank you again @donmccurdy , I'll probably do although I don't see mention of dropping support for ambient on that ticket. In any case, I'll subscribe to those tickets.

@UX3D-nopper
Copy link
Contributor

Thanks a lot Don for answering the questions.
In the coming days, we will create a schema for the extension plus a short documentation.
We will then make a pull request and if the glTF 2.0 working group accepts the extension, it will be an offical one.
Please note, any extension listed in the experimental section are not final and/or official.
As soon as an experimental extension is accepted, it will be listed somewhere else in the exporter.

@Arcnor
Copy link
Author

Arcnor commented Jul 4, 2017

Thank you both, I'll keep an eye on the repository for the new PR and adapt my code if needed.

@UX3D-nopper
Copy link
Contributor

I am closing this, as the effort of the extension can be tracked here:
KhronosGroup/glTF#947

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants