Skip to content
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

gltf version #30

Closed
psilord opened this issue Oct 23, 2019 · 7 comments · Fixed by #31
Closed

gltf version #30

psilord opened this issue Oct 23, 2019 · 7 comments · Fixed by #31

Comments

@psilord
Copy link

psilord commented Oct 23, 2019

Hello,

Can it be made more clear which version of gltf 1.0 or 2.0 this tutorial targets? If both, does it consistently point out the differences when they arise?

Thank you!

@javagl
Copy link
Contributor

javagl commented Oct 23, 2019

The tutorial targets version 2.0 only (but it's true that this is not mentioned explicitly...)

A (very technical) list of the differences between 1.0 and 2.0 is contained in KhronosGroup/glTF#605 , but it would be hard to understand this without a lot of background knowledge about the spec. Some of them are on a low technical level, e.g. the change from using "dictionaries" in 1.0 to using arrays in 2.0. We considered creating some "1.0-to-2.0 change log" from issue 605 - and in fact, this was assigned to me, if I "... have the bandwidth." - but until now, there didn't seem to be so much demand for that: Most people either adapted 2.0, or started using glTF with version 2.0 altogether...

On a higher level:

Most of the concepts have remained the same between 1.0 and 2.0. The largest conceptual difference refers to the material handling: Version 2.0 uses the PBR materials. In 1.0, the materials had been described with shader programs that had been contained in the assets (which brought some complexity, and possible portability issues)

Pointing out the differences between 1.0 and 2.0 in the tutorial could be difficult (and potentially confusing). A dedicated "mini-tutorial" about the way how materials had been handled in 1.0 could make sense.

Do you have a particular interest in the comparison of 1.0 and 2.0?

@psilord
Copy link
Author

psilord commented Oct 23, 2019

Thank you for your response!

I don't have so much of an interest of knowing the difference between 1.0 and 2.0. What I wanted to avoid was spending a huge amount of time understanding and then implementing the spec from the tutorial for my game engine and then discover it was for version 1.0 and not 2.0.

I mostly got confused because 'gltf' usually means gltf 1.0 and 'gltf2' usually means gltf 2.0. When I only saw 'gltf' everywhere and a statement in the tutorial about how the asset object was optional in 1.0 and required in 2.0, it made me question just what version the tutorial was based on, and how precisely it showed the differences.

I'm much more interested in gltf 2.0 and don't need a diff between 1.0 and 2.0. The tutorial is currently ambiguous if it demonstrates 1.0, 2.0, or both.

I think if the README and some early text in the tutorial was made more clear that it is in fact gltf 2.0 (and maybe a few edits to assume gltf2 forms by default) it would mostly fix the problem.

Thank you!

@psilord
Copy link
Author

psilord commented Oct 23, 2019

It also seems to me after some inspection that the phrase "gltf2" is a community created term, and not an official Khronos term. So, I suppose maybe the tutorial should clear up some naming issues about how to identify gltf with respect to its version.

@javagl
Copy link
Contributor

javagl commented Oct 24, 2019

I'm not entirely sure what you mean: I think that (unfortunately) the only way to determine the glTF version of an asset (when it is given as JSON) is to parse it, and then look at the version number. (Been there, done this, in https://github.com/javagl/JglTF/blob/82bb96b0064732436fdc9e771bdbe717a2b8d8f2/jgltf-model/src/main/java/de/javagl/jgltf/model/io/GltfReader.java#L130 ... not so much a problem for the "untyped JavaScript world", though...).

However, it could indeed be made clear(er) that the tutorial is about glTF 2.0....

@psilord
Copy link
Author

psilord commented Oct 25, 2019

I guess what I mean is that unless I already fully understood the glTF 1.0 and glTF 2.0 specification and differences therein, I wouldn't realize which version the tutorial was targetting in its explanation since it wasn't clear in its introduction.

I do get what you say about having to parse the gltf forms to see what actual version it turns out to be.

I think at this point though, we've extracted all the usefulness out of this issue. Some updates to the tutorial introduction that mentions its focus on glTF 2.0 is good enough for me.

Thank you!

@javagl
Copy link
Contributor

javagl commented Oct 30, 2019

I've added the statement

This tutorial focuses on glTF version 2.0, where support for Physically Based Rendering was introduced, but the other concepts that are explained here are similar to how they had been implemented in glTF version 1.0.

at https://github.com/javagl/glTF-Tutorials/tree/master/gltfTutorial#gltf-tutorial

Do you think that will resolve ambiguities? (I considered adding a reference to KhronosGroup/glTF#605, but that would likely not be helpful for readers at that point...)

If so, I'd PR+merge this change.

@psilord
Copy link
Author

psilord commented Nov 6, 2019

I'm satisfied. Thank you!

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

Successfully merging a pull request may close this issue.

2 participants