about enableBlend()

I have three .egg file, a_bas.egg, a_bas-run.egg and a_bas-waist.egg, there are created by Blender 2.61. a_bas.egg is a model, it have 48902 vertexs. a_bas-run.egg is a bone animation. a_bas-waist.egg is a shape animation.

there can worked, but it’s some blame when I use enableBlend().

When I try

enableBlend()
setControlEffect('run',1.0)
setControlEffect('waist',1.0)
loop("run")
pose("waist",50)

or

enableBlend()
setControlEffect('run',1.0)
setControlEffect('waist',1.0)
loop("run")
loop("waist")

or

enableBlend()
setControlEffect('run',1.0)
setControlEffect('waist',1.0)
pose("run",1)
pose("waist",100)

The travel olny only half.

Blending means that you average the effect of two or more animations. So if you average a running animation with some other animation, you only get a total of 50% contribution from the running animation.

The total weighting of all of the animations is normalized, so that if you apply two animations both with an effect of 1.0, the actual effect is 0.5 of both. (It wouldn’t work to apply a net effect that exceeds 1.0; the vertices would fly apart.)

David

Thank David. But I want ask an another question.

I try read the a_bas-run.egg. I see

<CoordinateSystem> { Z-up } 
<Table> {
  <Bundle> Mesh.042 {
    <Table> "<skeleton>" {
      <Table> Hip {
        <Xfm$Anim> xform {
          <Scalar> order { sprht }
          <Scalar> fps { 24 }
          <Scalar> contents { ijkprhxyz }
          <V> {
            1.000 1.000 1.000 109.497 -0.000 0.000 0.000 0.689 4.0
            1.000 1.000 1.000 109.497 -0.000 0.000 0.000 0.689 4.17
            1.000 1.000 1.000 109.497 -0.000 0.000 0.000 0.689 4.08
            ...
            ...
            ...
        }
      }
    }
    <Table> morph {
      <S$Anim> waist {
        <Scalar> fps { 24 }
        <V> { 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 }
      }
    }
  }
}

I guess the egg file contains skeleton animation and morph animation. I know I can use controlJoint method to control bone. But I do not know whether control morph in the code.

The morph can also be controlled via controlJoint(). It will return a node whose X position can be set to a value between 0 and 1 to control the morph slider.

David

Oh! It is too useful, too easily. Now I can control all animation. Thank David.