-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
This all sounds great, thanks @lasalvavida! Let's keep this PR open and squash git history once the spec and files stabilize. |
@pjcozzi This is updated with the 2.0 sample models generated from KhronosGroup/COLLADA2GLTF#20 |
Very nice, thanks @lasalvavida. Can you please add a README.md to the 2.0 directory and each model's directory? Why were the 1.0 files deleted? Were these extra files? We still want to keep 1.0 assets in this repo. |
I may need to squash for it to appear correctly. Collada source files were moved out of 1.0 into their own separate folder. |
@lasalvavida GearboxAssy does not exist. Is it a mistake? |
Yes it is a mistake. I will make sure it's there on the next round of regenerations. |
Hi @lasalvavida, I'm testing these against THREE.GLTFLoader and THREE.GLTF2Loader, and there's a change in the structure I wasn't expecting. Referencing RiggedSimple.gltf#L11-L92, the hierarchy of the glTF2.0 model is:
The glTF1.0 asset by contrast includes both the Armature and the Proxy as descendants of the default scene:
Is this an intended change? I could perhaps see an argument that the armature and joints would not be part of the scene necessarily, but it does break our current skinning implementation for three.js. |
Hi @donmccurdy! There are actually two changes here. The first is that skeleton nodes must be the root of a node hierarchy. That is why Armature is no longer a child of Y_UP_Transform. I don't think it is technically incorrect to list a skeleton node in scene nodes, but it is not explicitly required, and wasn't in 1.0 either. See: https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/SimpleSkin In this case, it is redundant to list the skeleton node in scene nodes because it is referenced as a skeleton. We had to make some changes in Cesium to accommodate this as well. |
It's no longer the case with 2.0. |
Ah, thank you for the clarification @lexaknyazev. My other point is correct though, right? Listing skeleton nodes in scene is unnecessary. |
Also, the 2.0 glTF branch still says: |
@lasalvavida
"Root of joints" could be non-root scene-wise. |
My mistake, I was looking at 1.0 in the 2.0 branch. |
Thanks for the clarification @lasalvavida and @lexaknyazev. Sounds good to me that the skeleton node does not need to be in a scene. I've run into one other difference: If |
Seems like this has a huge number of changes that have been open a long time, and other folks are filing pull requests directly against master. Should this be merged soon? Or abandoned and re-converted at some point? |
@emackey, I should have this updated today/tomorrow once I finish my testing. A 2.0 branch is probably the preferred solution since the spec is not officially ratified yet. edit: Actually since we have the 2.0 folder in master already, they should probably just go in there double edit: I had some stuff come up that I've been needing to deal with, but this will definitely be done on Friday. |
@lasalvavida Sounds good, just be aware that |
These are updated from the latest COLLADA2GLTF-2.0 which includes PBR and pbrSpecularGlossiness |
@lasalvavida looks like this still has a |
I need to merge in master, after that it should be fine |
This PR has been regenerated from the latest COLLADA2GLTF-2.0 build |
@pjcozzi can this be merged soon? There are a number of other draft 2.0 models already in a 2.0-named folder in master, from multiple contributors. I don't think the 2.0 folder would get removed from master before ratification, so it would be great to consolidate there by merging this in. When the 2.0 spec is finally ratified, there will need to be another pass to make sure all sample models already in master are in line with what was ratified, regardless if this was merged by then or not. Let's not wait. |
@lasalvavida GearboxAssy has not been generated yet. |
@cx20, that's not correct, GearboxAssy is present in this pull request https://github.com/lasalvavida/glTF-Sample-Models/tree/2.0/2.0/GearboxAssy |
@lasalvavida I'm sorry. It is my mistake. It is OK now. |
@lasalvavida In the latest version generator, .jpg seems to be used instead of .png. I think it is okay to delete .png. BarramundiFish_metallicRoughness.png |
@lasalvavida it looks like these models still have metallic in the |
Good eye @cx20! |
README.md
Outdated
@@ -5,7 +5,7 @@ | |||
# glTF Sample Models | |||
|
|||
- [glTF 1.0](1.0) | |||
- [glTF 2.0](2.0) | |||
- [glTF 1.1](1.1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a regression here, maybe a bad merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, looks like a bad merge
"sampler": 0, | ||
"source": 3, | ||
"target": 3553, | ||
"type": 5121 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format
, internalFormat
, target
, and type
have all been removed from 2.0.
I am testing generated 2.0 sample models. glTF 1.0 Duck.gltf Scale 1/1: |
@cx20 and @lasalvavida : This difference is likely caused by the camera. I did not verify this in depth, but it was my first guess, and it's very likely the reason: The camera for the duck in 1.0 is
The camera for the duck in 2.0 contains some really strange values
The FOV and aspect ratio are certainly not right... |
@javagl @lasalvavida I tried changing the value of the camera of gltf 2.0 to the value of 1.0, but the result did not change. I think not a camera problem. When I check the buffer of the Duck with WebGL Inspector and it seems that the scale of vertex data is 100 times. Is that the cause? |
Those camera values are certainly wrong. @cx20, I think that comes from this part of the COLLADA: <unit meter="0.01" name="centimeter"/> The old converter used to bake these asset scales into the data; I will be adding a scale to the root transform to reflect this which should correct the issue, but the data in the buffer will still be different. |
I'm OK with merging this whenever folks are happy, and making another pass for final glTF 2.0 cleanup. Please bump when it should be merged. |
Updated WEIGHT and JOINT -> WEIGHTS_0 and JOINTS_0. Asset scales are accounted for and the garbage values in the cameras are corrected. Updated metallicRoughness textures. Redundant images have been removed |
@lasalvavida is this in shape to merge? |
README.md still has a very minor bad merge. I haven't taken a detailed look at this latest incarnation but at a cursory glance things seem OK. We can make new issues after the merge of course. |
Okay, I'll update the readme and squash and then unless anybody has anything else this should be okay to merge |
Updated |
The README in the 2.0 folder still says
Also several models are missing from that readme. |
I'm looking through the models, they look good so far. |
That's from the current master. I'm pretty sure it refers to @javagl's simple models not being updated yet. Which models are missing? I'm looking at: https://github.com/lasalvavida/glTF-Sample-Models/blob/2.0/2.0/README.md and I'm not sure what you mean |
Ah. The missing ones aren't from this PR, they're mostly mine (like MetalRoughSpheres). I can open a separate PR to fix that. I haven't tested each and every model, but I'm starting to think this PR is good to go. |
Very nice! 🎆 |
Regarding the models that are not 2.0 yet: Most of them will be, as of PR #45 (Three of them are still not updated, and they'll be marked as such directly in the table of the README. These are the material-related ones, and I'm still working on that. If it takes too long, I'll update the PR to omit these models. There are more, better, "real" PRB-example models now...) |
glTF 2.0 models (spec still in progress): https://github.com/lasalvavida/glTF-Sample-Models/tree/2.0/2.0
Generated from CesiumGS/gltf-pipeline#191.
There may still be some changes to these, but they are at least valid 1.1 as per the validator.
These are optimized and the image assets have been minified. The 2.0 folder is ~76MB vs the 1.0 folder which is ~258MB.