Results 1 to 3 of 3

Thread: A bug in the <skin> XML sample in 1.4.1 specification?

  1. #1
    Junior Member
    Join Date
    Dec 2007

    A bug in the <skin> XML sample in 1.4.1 specification?

    On page 4-100 and 4-101 in the 1.4.1 specification document, there is some code that purports to show how weights are assigned to bones.

    In this code, there are weights assigned to bones -1 through 3. This makes sense, as -1 means "bind pose" and 0..3 means the four joints defined.

    However, it then goes on to use blend weights with index 0..4. This confuses me, as there are only 4 blend weights defined -- it seems that a weight index of 4 would be out-of-bounds for the data defined. Is this a typo, or am I misunderstanding something?

  2. #2
    Join Date
    Dec 2007
    Costa Rica
    Hi, is this Jon Watte from the ODE list?

    It seems to be a typo, all arrays I've encountered in COLLADA are zero based, and as you mention, 4 would be out of bounds.

    I have not encountered a file that uses the bind shape (whatever that means in this context).

    I recommend looking at functional dae files from the Model Bank rather than rely on the samples in the spec, most of the time the spec samples are incomplete or contain just the minimal information to get you started.

    here is the sample xml for reference:
    Code :
    <skin source="#base_mesh">
    <source id="Joints">
    <Name_array count="4"> Root Spine1 Spine2 Head </Name_array>
    <source id="Weights">
    <float_array count="4"> 0.0 0.33 0.66 1.0 </float_array>
    <source id="Inv_bind_mats">
    <float_array count="64"> ... </float_array>
    <input semantic="JOINT" source="#Joints"/>
    <input semantic="INV_BIND_MATRIX" source="#Inv_bind_mats"/>
    <vertex_weights count="4">
    <input semantic="JOINT" source="#Joints"/>
    <input semantic="WEIGHT" source="#Weights"/>
    <vcount>3 2 2 3</vcount>
    -1 0 0 1 1 2
    -1 3 1 4 
    -1 3 2 4 
    -1 0 3 1 2 2

  3. #3
    Junior Member
    Join Date
    Dec 2007
    Thanks. Yes, I thought as much, but it's always good to double-check.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean