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

The glTF model of "Polly" does not displayed #89

Open
cx20 opened this issue Oct 9, 2017 · 1 comment
Open

The glTF model of "Polly" does not displayed #89

cx20 opened this issue Oct 9, 2017 · 1 comment

Comments

@cx20
Copy link

cx20 commented Oct 9, 2017

The project "Polly" seems to have been created to introduce all new features of glTF 2.0.
https://www.youtube.com/watch?v=l7TB1O51X_M

However, I tried to display project_polly.gltf but it was not displayed.

Grimoire.js + glTF Loader + project_polly.gltf result:
image

DefaultInstanciator.ts:125 
Uncaught (in promise) Error: specified node was not found
    at DefaultInstanciator.ts:125
    at Array.forEach (<anonymous>)
    at DefaultInstanciator.__instanciateNode (DefaultInstanciator.ts:111)
    at DefaultInstanciator.__instanciateNode (DefaultInstanciator.ts:91)
    at DefaultInstanciator.__instanciateScene (DefaultInstanciator.ts:26)
    at DefaultInstanciator.instanciateAll (DefaultInstanciator.ts:20)
    at GLTFModelComponent.ts:15
    at <anonymous>
skinInfo.joints.forEach((j, jointIndex) => {
    if (instanciatedNodes[j]) {
        const invBindShapeMatrix = new Array(16);
        for (let i = 0; i < 16; i++) {
            invBindShapeMatrix[i] = getInvBindShapeElement(i + 16 * jointIndex);
        }
        instanciatedNodes[j].setAttribute("class", instanciatedNodes[j].getAttribute("class") + " gltf-joint-" + jointIndex);
        instanciatedNodes[j].addComponent("GLTFJoint", {
            invBindShapeMatrix: invBindShapeMatrix,
            skinIndex: node.skin,
            jointIndex: jointIndex
        });
    }
    else {
        throw new Error("specified node was not found");
    }
});
@cx20
Copy link
Author

cx20 commented Dec 5, 2017

I have updated the library. However, nothing is displayed this time.
http://jsdo.it/cx20/ut2oU

index.js:4895 
Uncaught Error: [TypeError]: Cannot read property 'buffer' of undefined

This exception was thrown in message function. Following information are snapshot of GOML tree status.

* Node:  <gltf.model>
* Component:  <animation.Animation>
* Message:  $update 

* Node map:
 
  <fundamental.goml>
    ...
    <fundamental.scene>
      <fundamental.camera class: camera/>・・・(0)
      <gltf.model/>・・・(1)
      ^^^^^^^^^^^^^--------(Error was thrown from animation.Animation component of this node.)
      <forward-shading.light/>・・・(2)
    </fundamental.scene>
  </fundamental.goml>


* Components of this node:
  (0)  <grimoirejs.GrimoireComponent>  

   Attributes:
    grimoirejs.GrimoireComponent.id --- null
    grimoirejs.GrimoireComponent.class --- null
    grimoirejs.GrimoireComponent.enabled --- true


  (1)  <fundamental.Transform>  

   Attributes:
    fundamental.Transform.position --- (0, 0, 0)
    fundamental.Transform.rotation --- axis(0,0,1,0)
    fundamental.Transform.scale --- (1, 1, 1)


  (2)  <gltf.GLTFModel>  

   Attributes:
    gltf.GLTFModel.src --- https://cdn.rawgit.com/KhronosGroup/glTF-Blender-Exporter/0e23c773bf27dad67d2c25f060370d6fa012d87d/polly/project_polly.gltf
    gltf.GLTFModel.scene --- null
    gltf.GLTFModel.waitForLoad --- false
    gltf.GLTFModel.autoAnimate --- true


  (3)  <grimoirejs.Rotate>  

   Attributes:
    grimoirejs.Rotate.speed --- 0


  (4)  <animation.Animation>  <<<<<<<<< This component

   Attributes:
    animation.Animation.animation --- gltf-animation-0
    animation.Animation.clips --- default
    animation.Animation.timeScale --- 1
    animation.Animation.loop --- true
    animation.Animation.timeOffset --- 0





 [Message stack]: $render at <fundamental.RenderScene> on <fundamental.render-scene>

 [Message stack]: $renderViewport at <fundamental.Renderer> on <fundamental.renderer>

    at MorphGeometry._calculateWeights (index.js:14641)
    at MorphGeometry._updateForSemantics (index.js:14632)
    at MorphGeometry.setWeight (index.js:14619)
    at GLTFVertexMorpher.ts:9
    at index.js:3515
    at Array.forEach (<anonymous>)
    at Attribute._notifyChange (index.js:3514)
    at Attribute.set (index.js:3561)
    at GLTFVertexMorpher.setAttribute (index.js:1194)
    at AnimationClip.ts:35

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

1 participant