Bone animation problem

Blitz3D Forums/Blitz3D Programming/Bone animation problem

Makepool(Posted 2005) [#1]
I’m having a problem playing back boned animations, when I start playing a secondary animation loaded via LoadAnimSeq the animation doesn’t play correctly, I assume this is a problem with how I’ve exported the models rather than a code problem.

(Code)
Graphics3D 800,600


mesh_3ds = LoadAnimMesh( "marinebr.b3d" ) ;anim seq 0
mesh_3ds = GetChild(mesh_3ds,1);
LoadAnimSeq(mesh_3ds,"marinewlk.b3d")


pivot=CreatePivot()
cam=CreateCamera( pivot )
PositionEntity cam,0,1,-2


lit=CreateLight()
RotateEntity lit,45,45,0


trans=10
Animate mesh_3ds,1,.5,0,1 ;start ping-pong anims...


While Not KeyHit(1)
Time = MilliSecs()

If KeyDown(30) MoveEntity cam,0,0,10
If KeyDown(44) MoveEntity cam,0,0,-10

If KeyDown(203) TurnEntity pivot,0,3,0
If KeyDown(205) TurnEntity pivot,0,-3,0

UpdateWorld()

If KeyDown(28)
If AnimSeq(mesh_3ds)=0 Animate mesh_3ds,1,0.4,1,trans
Else
If AnimSeq(mesh_3ds)=1 Animate mesh_3ds,1,0.7,0,trans
EndIf

RenderWorld
Flip
Wend
ClearWorld
End
(Code/)

here’s the rules I’m following while exporting in B3D Pipeline:

1. Make sure all bones have a starting and ending key frame. not just the bones that are going to be animated.

2. Prime animations (in this case the breathing anim) are to be exported with just the mesh visible, hide the bones.

3. Any subsiquent animations must be exported with just the bones visble by hiding the mesh.

4. Make sure all boxes are checked in the b3d exporter.


Any ideas on what’s wrong?


jfk EO-11110(Posted 2005) [#2]
Maybe this helps:
When you export a sequence that is part of a longer sequence, make sure to set a key for each bone (for position, rotation and scale) at the very first frame of the partial sequence before you export it.