-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for glTF 2.0 #10806
Comments
There may be some breaking changes here... @mrdoob @takahirox is it best to keep work on a branch until we're at least able to support features from v1.0 when loading files of v2.0 format? |
Considering that there aren't that many files out there yet... Would make sense to do a new |
https://github.com/KhronosGroup/glTF/tree/master/specification/1.0#asset Branching some logics depending on the version would be another option UPDATE: UPDATE2: |
Well the good news is, GLTFLoader already supports most of the existing 2.0 sample models. The only exception I see is the glTF-MaterialsCommon versions, which will need changes, and I don't have any samples of those models yet. Since a lot of the 2.0 changes involve logic going from extension A to extension B, or to/from the core spec, branching within one loader sounds a little unpleasant. If we split into Or possible middle ground, we could drop support for 1.0 extensions (lights in |
I would vote for forking to |
Sounds reasonable to me. @takahirox The key thing is probably converters. Once collada2gltf and obj2gltf provide glTF2.0, use of 1.0 will taper off, and that's when we can consider dropping the first version. It would be great to use |
OK, that sounds good to me. Just what I concerned was if 1.0 keeps being used or not. Just in case, I'm asking @pjcozzi about their opinion. |
Anyways, let's start with making BTW I received the answer from @pjcozzi .
|
Yay! I will start a clean copy now unless you've started someplace. :)
|
@takahirox FYI I'm working on the .GLB changes now (and attempting to keep the checklist above up to date). |
Done Specular-Glossiness. |
I am testing glTF 2.0 sample models and Three.js glTF 2.0 Loader. However, it seems that some PBR models are not displayed properly. I think that it was caused by updating to the latest specification about 10 days ago. |
@cx20 Do you mind, if you open a new issue for this? 😊 |
glTF 2.0 has been released! Time to replace |
+1 from me. The only change to GLTFLoader since r85 was the TextDecoder PR. |
Hi. Would like to ask if what is the meaning of this error: THREE.Object3D.add: object not an instance of THREE.Object3D. undefined. |
Hi @densetsughem — Could you open a new issue, and include: (1) the version of three.js you are using, and (2) the model itself? One of us will be able to help you then. :) |
What do you guys think of renaming |
+1 from me. Currently GLTF2Loader still attempts to load glTF1.0 files. Right now that mostly works, but when the KHR_materials_common and KHR_technique_webgl extensions are updated to glTF2.0 (those parts of the spec are not final yet) it will not be backward-compatible. So, throwing an error if the version is not 2+ would probably be best. My only hesitation on timing is that the COLLADA2GLTF converter hasn't been updated to glTF2.0 yet (but its 2.0 branch should be fairly close). Meanwhile the glTF Blender exporter does support most glTF2.0 features. |
Hey folks, thanks for the great work on glTF support for Three.JS! I have a question about the texture orientation. However, I figured out that the Three.JS glTF 2.0 loader, at least the one used by this example, does not perform this flip. Instead, it assumes that the texture images are already flipped. We are running into this issue with our exporter, and it seems others experienced it as well: They already ended up flipping the UVs - but I would interpret the glTF 2.0 spec in such a way that the implementation of the renderer, so, in this case, Three.js, should flip the texture (or UVs) if it's necessary, not the exporter. What do you think? Thanks in advance. |
P.S.: Also asked the glTF folks for clarification as well: |
A recent correction to the spec; and yes our loader and sample models are not updated yet.
We can't detect at runtime whether it's necessary, I assume? So we'll add code in THREE.GLTF2Loader to always perform the flip, once we have updated sample models. |
AFAIK, that's what most OpenGL-based applications out there do as well, pretty much standard, so this should cause less trouble with most models, as it's considered the default orientation of texture images for most (all?) exporters |
With the exception of the For future readers, note that the KHR_lights and KHR_common_materials are still in an experimental state (although they should match what is exported from glTF-Blender-Exporter). Thank you to @takahirox for major portions of the implementation, as well as to @cx20 and everyone who has helped us find issues! |
Error: THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. |
@qxx861305133 You load a glTF asset with an unsupported version. Please ask at the forum for further guidance. |
Core changes:
node.mesh
, notnode.meshes
array.Extension changes:
I'm probably missing some things, there is a more exhaustive list: Spec changes from 1.0 to 2.0. This will settle over the coming weeks.
/cc @pjcozzi @takahirox
The text was updated successfully, but these errors were encountered: