Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

RigGeometry with no bones/weights #392

Open
marchelbling opened this issue Jul 27, 2015 · 2 comments
Open

RigGeometry with no bones/weights #392

marchelbling opened this issue Jul 27, 2015 · 2 comments

Comments

@marchelbling
Copy link

When generating an osgjs file using the disableAnimation from the gles plugin, we currently end up with a RigGeometry that has no bones and no weights i.e.

"osgAnimation.RigGeometry": {
  "SourceGeometry": {
    "osg.Geometry": {
      "UniqueID": 114,
      "PrimitiveSetList": [ {
        "DrawElementsUByte": {
          "UniqueID": 119,
          "Indices": {
            "Array": {
              "Uint8Array": {
                "File": "model_file.bin.gz",
                "Size": 142,
                "Offset": 0
              }
            },
            "ItemSize": 1,
            "Type": "ELEMENT_ARRAY_BUFFER"
          },
          "Mode": "TRIANGLE_STRIP"
        }
      } ],
      "VertexAttributeList": {
        "Normal": {
          "UniqueID": 116,
          "Array": {
            "Float32Array": {
              "File": "model_file.bin.gz",
              "Size": 96,
              "Offset": 144
            }
          },
          "ItemSize": 3,
          "Type": "ARRAY_BUFFER"
        },
        "Tangent": {
          "UniqueID": 118,
          "Array": {
            "Float32Array": {
              "File": "model_file.bin.gz",
              "Size": 96,
              "Offset": 1296
            }
          },
          "ItemSize": 4,
          "Type": "ARRAY_BUFFER"
        },
        "TexCoord0": {
          "UniqueID": 117,
          "Array": {
            "Float32Array": {
              "File": "model_file.bin.gz",
              "Size": 96,
              "Offset": 2832
            }
          },
          "ItemSize": 2,
          "Type": "ARRAY_BUFFER"
        },
        "Vertex": {
          "UniqueID": 115,
          "Array": {
            "Float32Array": {
              "File": "model_file.bin.gz",
              "Size": 96,
              "Offset": 3600
            }
          },
          "ItemSize": 3,
          "Type": "ARRAY_BUFFER"
        }
      },
      },
      "osg.ComputeBoundingBoxCallback": {
        "UniqueID": 120
      }
    }
  }
}

When using this, I then have promises issues that make me suspect that osgjs is not resilient to missing bones/weights on a RigGeometry.

@stephomi
Copy link
Collaborator

https://github.com/cedricpinson/osgjs/blob/feature/animation/sources/osgWrappers/serializers/osgAnimation.js#L372
^ It's the lack of boneMap that triggers the warning.

That being said, I don't know if we would be resilient without bones and weights.
@cedricpinson Is that something we should do?

@cedricpinson
Copy link
Owner

We should add a warning and not fail

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

No branches or pull requests

3 participants