character animation question

Blitz3D Forums/Blitz3D Beginners Area/character animation question

Santiworld(Posted 2008) [#1]
Hi,
I'm trying to make some tests about character animation, my character should walk, run, sit, bend, and too many more actions, which one could be the method that i must use?

I made my character using bones in format b3d

Should I use only one animesh for all the animations? or diferent b3d files each one having an animated action?

I don't have any program to create md2 files, at the time, I'll have to use b3d files

regards
Santiago

PS: if anyone knows any sample code that I could use, so I can learn, I would apreciate it... thanks


InvisibleKid(Posted 2008) [#2]
it's been atleast a couple years since i've used Blitz3D, but this is some code i had lying around on the HD. it should help you out.




i believe this is the model : http://www.psionic3d.co.uk/gallery/displayimage.php?album=2&pos=5

hope this helps.


Santiworld(Posted 2008) [#3]
thanks!...

i make this test, and works..

humano = loadanimmesh("b3d\stand.b3d")

a_1 = LoadAnimSeq (humano, "b3d\walk.b3d")
a_2 = LoadAnimSeq (humano, "b3d\stand.b3d")

while ...

if n = 0 then animate humano,a_1 ,.5,.1 < i change the las variable
if n = 100 then animate humano,a_1 ,.5,1 < i change the las variable
n = n +1
if n > 200 then n = 0

loop


Santiworld(Posted 2008) [#4]
another question...

i made it using the ninja example..

but my b3d file has some problem..
the body mesh doesn't move attached to the bones animation...
i used skin to the bones animation..

what i must do?

now, if i findchild a bone, and turn the bone, the bodymesh turns fine..

sorry my english..




Naughty Alien(Posted 2008) [#5]
it has to be rigging/skinning issue if you have used 3dsmax..it also may be way you export out of 3dsmax trough pipeline..make sure that you have settings like this




Santiworld(Posted 2008) [#6]
i found another post with the same problem..

i trying with the configuration you post in the image, but no changes in blitz...

i go to try with 3dsmax7.. maibe is the 9 version the problem...

thanks!..


Naughty Alien(Posted 2008) [#7]
..try to findchild your main animation root node and Animate it as an entity...


Santiworld(Posted 2008) [#8]
i go to try that... thanks..

when i export with pipeline, the preview works perfect, the human move with the bones animation...

so, if the b3d preview works, the problem is in the code... someone know what code use pipeline on the preview program?..

i post the code i use...
thanks alien...

here the b3d file...
http://www.latatoy.com.ar/temp/temp4.rar


THIS CODE IS FIXED!!!! NOW THE HUMAN MOVES AND BONES TOO..... THANKS TO ALL

graphics3d 1024,768,0,2

e# = .01

cam = createcamera()
camerarange cam,.1,1000
positionentity cam,2,2,-3


luz = createlight(2)
positionentity luz,100,100,100
lightrange luz,100

createmirror()
piso = createplane(8)
entityalpha piso,.6
;t_piso = loadtexture("maps\piso.jpg")
;entitytexture piso,t_piso
hidepointer

;OLD FAIL CODE BONES MOVE BUT NOT CHARACTER

;player = loadanimmesh("b3d\temp4.b3d")
;scaleentity player,e,e,e
;Global a_saluda=ExtractAnimSeq (player,0,130)
;global a_corre=ExtractAnimSeq (player,25,45)
;Animate player,1,.23,a_saluda,2

;THE CODE FIXED, THE BONES MOVE; AND THE HUMAN WITH FINDCHILD TOO.
;fix start
        player = loadanimmesh("b3d\temp.b3d")
        scaleentity player,e,e,e
        Global a_saluda=ExtractAnimSeq (player,0,130)
	Global a_corre=ExtractAnimSeq (player,25,45)
	h = findchild(player,"human")              ;findchild human mesh
	Animate player,1,.23,a_saluda,2
	Animate h
;fix end 
 

while not keyhit(1)

	pointentity cam,player

updateworld
renderworld


	
	
 	If KeyDown (200) Or KeyDown (17) Then vel# = -.03
	If KeyDown (208) Or KeyDown (31) Then vel# = .03
 	If KeyDown (203) Then late# = + 2
   If KeyDown (205) Then late# = - 2
   if keyhit (57) then  animate c,1 ,.5,3,0
   	
	turnentity player,0,late,0
	moveentity player,0,0,vel#

	vel# = 0
	late = 0
	

flip
wend
end