How to Load glTF Without Joint Data

(Zicklag) #1

I’m trying to load a glTF using the glTF example in Amethyst 0.10.4, but it will only work for meshes that have Joint data for meshes. When I try to load a model without any joint data ( like this sample ) I get an error:

[ERROR][amethyst_renderer::pass::util] Required vertex attribute buffer with format [(“joint_ids”, Element { format: Format(R16_G16_B16_A16, Uint), offset: 0 })] missing in mesh

Also, if I try to load a model without any materials, while it doesn’t throw any errors, it doesn’t display anything at all. That isn’t really a big deal, because I can just provide a material, but I thought it worth mentioning.

(Gray Olson) #2

The no material thing is expected at the moment I believe, however the first is not. Could you post the setup of the RenderGraph you’re using as well as how you’re importing the gltf? :slight_smile:

(Zicklag) #3

Here’s what I did exactly:

  1. clone amethyst
  2. git checkout v0.10
  3. Copy all files from here to amethyst/examples/assets/mesh
  4. Change the line in amethyst/examples/assets/prefab/puffy_scene.ron that references mesh/puffy.gltf to use mesh/BoomBox.gltf.
  5. Run cargo run --example gltf --release
(Thomas Schaller) #4

Ah, I think this is a restriction in 0.10. If I remember correctly, you can globally remove this requirement by not calling with_vertex_skinning.

1 Like
(Zicklag) #5

Thanks! It looks like that worked. Now I just have to figure out why it looks like this:

It looks like it is rendering only the speculars. Here is my glTF material:

"materials" : [
      "pbrMetallicRoughness": {
        "baseColorFactor": [ 0.5, 0.5, 0.5, 1.0 ],
        "metallicFactor": 0.0,
        "roughnessFactor": 0.5

The BoomBox example actually didn’t show up other than a tiny few pixels of white that would dance in the middle of the screen when moving the mouse, which might have been some bit of specular.

PS: Yes that is a really goofy scene, with three monkey heads and a truck, though it is especially hard to tell with the current renderer setup. :wink:

1 Like
(Zicklag) #6

Since I don’t need PBR yet, I just switched to the basic shaded renderer and that worked:

1 Like
(Gray Olson) #7

Try the new 0.11 release! The GLTF import and rendering is significantly more robust (hopefully) :slight_smile:

1 Like
(Zicklag) #8

I’m dying to try it, but I only have OpenGL on the machine I’m using for dev right now, so I’ve got to wait for OpenGL support. :upside_down_face: I’ll be jumping all over it as soon as that is in.

(Gray Olson) #9

Ah! Unfortunate