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

can't open merged.glb #5

Open
j2l opened this issue Feb 19, 2019 · 8 comments
Open

can't open merged.glb #5

j2l opened this issue Feb 19, 2019 · 8 comments

Comments

@j2l
Copy link

j2l commented Feb 19, 2019

This is great idea, congrats!
I can't see model though in Godot 3.1b4 and Blender 2.8beta and Windows 3D Viewer.

@shrekshao
Copy link
Owner

shrekshao commented Feb 19, 2019 via email

@j2l
Copy link
Author

j2l commented Feb 19, 2019

Thanks @shrekshao for replying fast.

I forked it, gltf files open with a weird behavior, illustrating "watch your back" literally :)
image
but merged output.gltf doesn't open at all.

I don't know gltf at all, but I like inquiries.
May be I'm totally wrong here, but here's what I understand:
After formatting JSON of models\gltf\merged-saber-maid\output.gltf, I can see stuff in it like:

"name": "accessor_buffer_F010_Saber.001_skin_1",
			"type": "VEC4"

this name is not foundable elsewhere in the file, hence missing the index to a .bin file I guess.
If glb file is complete it should be right in the tool you wrote.
But actually it throws 842 errors:
image

Here's an excerpt:

MESH_PRIMITIVE_TOO_FEW_TEXCOORDS | Material is incompatible with mesh primitive:  Texture binding '/materials/2/pbrMetallicRoughness/baseColorTexture'  needs 'TEXCOORD_3' attribute. | /meshes/2/primitives/0/material
-- | -- | --
MESH_PRIMITIVE_TOO_FEW_TEXCOORDS | Material is incompatible with mesh primitive:  Texture binding '/materials/3/pbrMetallicRoughness/baseColorTexture'  needs 'TEXCOORD_4' attribute. | /meshes/3/primitives/0/material
FILE_NOT_FOUND | File not found. Node Exception: TypeError: NetworkError when attempting to fetch resource. | /images/2/uri
ACCESSOR_MAX_MISMATCH | Declared maximum value for this component (0) does not match actual maximum (-0.000010251998901367188). | /accessors/1/max/2

followed by numerous ACCESSOR_MAX_MISMATCH errors.

I just discovered VSCode has a gltf extension, pretty useful:
image

It's 11pm so I stop here for now.
Hope it helps narrow something.

@shrekshao
Copy link
Owner

shrekshao commented Feb 20, 2019 via email

@j2l
Copy link
Author

j2l commented Feb 20, 2019

Thank you for your time on this!
I tested multiple tools to understand (Blender gltf imports with different options, http://github.khronos.org/glTF-Validator/, ... ), most just don't validate and throw all 800+ errors.

I noticed that https://blackthread.io/gltf-converter/ on a merged model says:
TypeError: normal.clone is not a function
May be face.normal.clone() is not executed but written as is in the .bin file?

Could you please share your process to generate skeleton and accessories?
Thanks again

@shrekshao
Copy link
Owner

Sorry about not making any progress so far. Let me try to fight with my laziness this weekend (facepalm

@j2l
Copy link
Author

j2l commented Apr 7, 2019

Thanks. Good to see you didn't forget :)

@vpenades
Copy link

vpenades commented Sep 6, 2019

Hi, I've just tried to export a merged GLB, and indeed, it's an invalid format, as others said, glTF validator throws lots of errors.

Checking the file, I noticed that a skins have invalid InverseBindMatrix accessors.

So far this is what I've found:

  • A Skin with 5 joints must have 5 bind matrices, no more, no less.
  • An accessor with InverseBindMatrices must be defined with component MAT4, not VEC4, so it should store matrices, not vectors.

@shrekshao
Copy link
Owner

Hi. Sorry about the errors.
Unfortunately I haven't visited this lib for some time. I don't think I have plans to fix this recently. 😭
If you are interested in opening a pull request I'd be loved to look at it and merge.

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

No branches or pull requests

3 participants