B3D Animation/ B3D Pipeline

Blitz3D Forums/Blitz3D Programming/B3D Animation/ B3D Pipeline

Makepool(Posted 2004) [#1]
Okay, I’m almost at my wits end. I only want to be able to create an animated b3d model so that I can load it using the LoadAnimMesh command and load in subsequent animation with LoadAnimSeq.


Eg
mesh = LoadAnimMesh( "Marine Breath.b3d" )
LoadAnimSeq(mesh,"Marine Walk.b3d")
LoadAnimSeq(mesh,"Marine Shoot.b3d")

However, I have the slight problem of I’m working in a team, I do the programming, my friend does the models. Neither of us is very good at doing anything related to the others’ jobs and I can’t find a tutorial anywhere that describes how to do this apart from one on blitzcoder which uses physique. We DON’T have physique, we have B3D pipeline! So far we’ve managed to get something working entirely by chance. He’s been exporting models in different ways and by chance I found that by using a model exporting in a particular way and loading that in via LoadAnimMesh and then loading all subsequent animations via LoadAnimSeq that have been exported another way I got it to work….somehow. Here’s the code.


mesh = LoadAnimMesh( "Marine Breath.b3d" )
mesh = GetChild (mesh,3)
LoadAnimSeq(mesh,"Marine Walk.b3d")


We’re stabbing around in that dark and it’s extremely annoying can somebody please help? We’ve got bones that are visible in max, sometimes static, sometimes they animate while the model remains motionless!


wizzlefish(Posted 2004) [#2]
Please restate your question in one sentence. I'm confused with what you want to accomplish.


Ruz(Posted 2004) [#3]
You have to use the skin modifier for Puddings exporter, physique is not supported. The way I do it is to have all my animations in one max file, then export all the sequences as one B3d file. you can then extract animations from them. ie frame 1 -15 could be walk, frame 16 to 30 could be run
You can use 'note tracks' in max to keep track of the sequences

ExtractAnimSeq (p\mesh,0,30) ;1 run
ExtractAnimSeq (p\mesh,31,45) ;2 idle
ExtractAnimSeq (p\mesh,46,46) ;4 still
ExtractAnimSeq (p\mesh,47,48) ;5 turnleft
ExtractAnimSeq (p\mesh,47,48) ;6 turnright
ExtractAnimSeq (p\mesh,49,51) ;7 dying1
ExtractAnimSeq (p\mesh,52,63) ;8 bigslap
ExtractAnimSeq (p\mesh,64,68) ;9 jumpup

so yeah just load the b3d using LoadAnimMesh then
ExtractAnimSeq to get your individual animations.

[Edit] yeah forgot to mention I attach all my meshes and skin it as one mesh [Edit]


wizzlefish(Posted 2004) [#4]
I have a question - how would you animate the model using these extracted sequences?


Ruz(Posted 2004) [#5]
check out the animate commands in the help file
for example
Animate entity[,mode][,speed#][,sequence][,transition#]


Pudding(Posted 2004) [#6]
Blitz animation commands seem to expect a single skinned mesh at the root of a b3d file. You can work around this using GetChild(), but things can get confusing.

In the simplest case, your model should have a single skinned mesh at the root of the hierarchy. If you have multiple skinned meshes, attach them and skin them as one mesh. Then export with the "Scene Root" option unchecked.

NOTE: B3d files must have a single root, if you cannot uncheck "Scene Root", it is because doing so would result in an invalid b3d file - you may need to modify your scene or export options so you can uncheck "Scene Root".

Only use the "Scene Root" option with animated meshes if you're comfortable navigating model hierarchies, finding nodes, animating meshes explicitly etc. Check out SubAnims.bb in the B3d Extensions Library (used by the B3d Viewer) for an example of finding and animating all skinned meshes in a hierarchy. Also check out the B3d Pipeline Forum below...

-Pudding


wizzlefish(Posted 2004) [#7]
Glad to hear from the officials :)


Bob3d(Posted 2004) [#8]
if you have max 6, yonce you'r done, you can export as fbx, and reimport as fbx.This will convert any biped and physique animation , or biped and skin, or bones and physique (i used long ago the second, some people prefer one of the other combinations) into a totally skin and bones animation, while you worked it all with your lovely biped and physique (if it's lovely for you) . It's a very cool and working trick (in Max 6)

The other way possible is using Ultimate Unwrap plugin and Ultimate Unwrap later on fo rfinal b3d export. It was reported to work pretty well too. I suppose is more about each one's preferences.


Ruz(Posted 2004) [#9]
Nice idea Bob3d


Bob3d(Posted 2004) [#10]
I think is quite helpful method, yep.. actually, if I'm honest, I think I found the trick in some rare forum googling a bit :)


IPete2(Posted 2004) [#11]
Bob3d,

That is a top tip! Thanks,

IPete2.


Makepool(Posted 2005) [#12]
The problem wasnt with animating a file, we have managed that. we could load 1 animated file but we couldnt then load in an additional animated file using the 'animseq' command and get it to work. What we want, is to get them both to work without having to use the 'getchild' command.


Ruz(Posted 2005) [#13]
I am presuming that because load animseq returns the sequence number , then you have to animate it
like so
mesh = LoadAnimMesh( "Marine Default.b3d" )

meshwalk=LoadAnimSeq(mesh,"Marine Walk.b3d")
meshshoot=LoadAnimSeq(mesh,"Marine Shoot.b3d")
meshbreathe=LoadAnimSeq(mesh,"Marine Breathe.b3d")

Animate mesh,1,.2,meshwalk
Animate mesh,1,.2,meshshoot
Animate mesh,1,.2,meshbreathe

etc

I just tested this with my own character and it worked fine.
The initial loadanimmesh does not return a sequence number so meshwalk will be sequence 1, mesh shoot will be sequence 2 and so on
For the default 'Loadanimmesh' I just imported a 1 frame default pose . In puddings exporter dialogue you would still export 'animation' and 'bones , but leave 'sceneroot' unchecked even for the default sequence

I not sure , but won't it just be easier to use extract animseq. Thats How I have been doing it.
Thats mainly because I have all my anims in one max file.
If you have all you max animations in seperate files, you will have to use 'loadanimseq'


Ruz(Posted 2005) [#14]
Oh and I am presuming that you are using max6 and have all the pipeline updates installed.