how to work with animation

Blitz3D Forums/Blitz3D Beginners Area/how to work with animation

GC-Martijn(Posted 2004) [#1]
I know how to work with blitz3d :)
But I don't understand what the best way is to handle an animation.

I have a walking dog animation http://www.zquare.nl/dog.max
exported with Pipeline to .b3d

But that one isn't working oke for me because i used bones.

And now i'm :( so now I really want to know what
the correct way is to handle this:
- make a dog (with-out bones and other crap)
- export them as parts (leg1.b3d,head.b3d,tail.b3d)
- load them as LoadMesh()
- make a parent and place the parts oke to it
- now coding the animation in a function dogWalk() dogJump()
-----------------
Or
- make a dog with bones
- export the dog with the bones
- load the dog as loadanimesh()
- use the animation key when walking
-----------------
oR
- make a dog again with-out bones
- animate it with-out bones in 3dmax
- export the dog
- load the dog as loadanimesh()
- use the animation key when walking
------------------

Thanks for the information
GC-Martijn


Beaker(Posted 2004) [#2]
Depending how you want to model your dog, I would make a dog shaped mesh (not seperate parts) and use the animated skeleton you have to animate it.

Problem with that animated skeleton is that it doesn't animate on the spot. Take a look at psionics dog to see what I mean:
http://www.turbosquid.com/FullPreview/Index.cfm/ID/184961/Action/FullPreview


GC-Martijn(Posted 2004) [#3]
Hey thanks a lot beaker,

That's a step forward for me.

I downloaded the dog.b3d
and did dog = LoadAnimMesh("dog.b3d")
works oke.

the doganimationinfo.txt says this:
Assuming the first frame is 1, then the anim ranges are as follows!!
2-14 = walk anim
16-24 = run anim
26-60 = idle anim
You might have to remove one frame off the end if it doesn't loop perfectly (cus the first and last frames are the same)


that means that I only have to fix one thing :)

If KeyDown(200)
Animate dog,1 <-- now run dog run //16-24 = run anim

But that's looping all the frames.

And now the final big question.
How to play only Frame 16-24 = run anim ? while keydown

Then I can make something.


GC-Martijn(Posted 2004) [#4]
I think that i know how now

http://www.blitzcoder.com/cgi-bin/articlesubmissions/code_showentry.pl?f=tigerz04232003153110

before the game loop I did this.
ani_run		= ExtractAnimSeq(dog,15,23)
ani_idle	= ExtractAnimSeq(dog,26,60)
Animate dog,1,1,ani_idle,4


but the dog does nothing :S
ExtractAnimSeq() : frame 1 = 0 or frame 1 = 1
I tryed ExtractAnimSeq(dog,25,59) but the dog still dead