bones

Blitz3D Forums/Blitz3D Beginners Area/bones

Alberto(Posted 2003) [#1]
Hello

I have a couple if question about animated mesh

1) I have created an 8.1 "Skin and bones" .x file using CharacterFX
The file includes 30 bones
I have uploaded the file in BliTz3D using the LoadAnimMesh() comand
then I used the comand CountChildren()
I was expecting the funxtion to return 30 but it returns 1
why?

2) CharacterFX support also the blitz3D format .b3d but the
LoadAnimMesh() function does not load such file format

thanks in advance


Binary_Moon(Posted 2003) [#2]
1) AFAIK blitz doesn't support directx 8.1 boned files. I belive it can load static ones but not with bones.

2) Yes it does.


puki(Posted 2003) [#3]
"blitz doesn't support directx 8.1 boned files" - that explains why I came across this problem a few months ago after converting a load of models - I thought it was just down to me. Let's hope it does get supported soon (perhaps with built-in inverse kinetics!)


Alberto(Posted 2003) [#4]
thanks for reply

yes, it loads the static mesh in .x 8.1 format, but not the bones

I use the comand

man = LoadAnimMesh("man.b3d")
PositionEntity man,0,0,2


but I get the error message " entity does not exist "
I have created the man.b3d file using both CharacterFX and Milkshape, same result.
The original 3d model is the same both for the
.x and the b3d file


jfk EO-11110(Posted 2003) [#5]
make shure you have the latest update installed. Blitz3D supports B3D (of course). Get the Update from the members section here.


Alberto(Posted 2003) [#6]
jfk

thanks

I downloaded both Blitz3d , CharacterFX and Milkshape just a few days ago ,so I suppose they are updated
I can imagine that BlitzBasic support its own file format but please note that the LoadAnimMesh() comand call for .x and .3ds file format only.
In the Comand reference and Tutorials I can not find even a word about .b3d
However I would like to use skeleton animation (b3d or .x or .3ds it does not matter) rather than vertex animation.
Is it possible with Blitz basic + CharacterFX + Milkshape ?


Binary_Moon(Posted 2003) [#7]
LoadAnimMesh does work with b3d it just isn't mentioned in the docs. Could you upload the model so that we can have a look/ try it ourselves?

Does the mesh load with loadMesh - is it just the loadanimmesh command that fails?


Alberto(Posted 2003) [#8]
Binary_Moon

both LoadMesh and LoadAnimMesh fail
I downloaded Blitz3D just few days ago, so I suppose it is updated
It is a 3D model originally in .skn format (The Sims)
I converted it into a .b3d file format using MilkShape 1.6.6
I will e-mail mesh and texture to you.
thanks a lot if you can be so kind to test it for me


Binary_Moon(Posted 2003) [#9]
It doesn't animate but it loads fine. I suspect it is an error with your code.

I used this to test the mesh. It loads fine but there is no movement.

Graphics3D 640,480,16,2

mesh=LoadAnimMesh("man.b3d")
Animate mesh,1,2

camera=CreateCamera()
light=CreateLight(camera)
MoveEntity camera,0,3,-5

debugmesh(mesh)

DebugLog AnimLength(mesh)

Repeat

	UpdateWorld
	RenderWorld
	Flip

Until KeyHit(1)

End

Function debugmesh(mesh)

	DebugLog "children= "+CountChildren(mesh)
	DebugLog "class= "+EntityClass(mesh)
	
	For i=1 To CountChildren(mesh)
		child=GetChild(mesh,i)
		debugmesh(child)
	Next

End Function


Make sure your mesh is in the same directory as the bb file.

Also to check your blitz version go to the help menu and click about. If you have the latest version then your runtime will be 1.85.

If it isn't 1.85 then go to the account tab at the top of the page and download the latest update from the product updates page.


Alberto(Posted 2003) [#10]
Binary_moon

Thanks indeed for your support

Actually my blitz version was 1.64.
Well..I downloaded it a couple of days ago from the official Blitz web site, I suppose Blitz team should enable the downloading of the last version, anyway it is not a serious matter.
The file I sent you did not include animation, just a mesh and the skeleton.
The skeleton has been imported, I played with the Entity movement comands and everything seems working fine


Binary_Moon(Posted 2003) [#11]
no problem :)