B3D format and animations

Blitz3D Forums/Blitz3D Beginners Area/B3D format and animations

EddieRay(Posted 2004) [#1]
Can I have multiple animation sequences in a single .B3D file and play them individually and separately? For example, say I have a scene with a radar dish that can animate (spin about Y or whatever), and a door that can animate (open/close). Can I have both of these animations in a single B3D file, and play them independently?

Can I take animations from one B3D file and copy them into another B3D file? What are the restrictions? For example, say I have a B3D file with a bunch of biped motions, and I want to use those motions on a new mesh I've made. Do I just need to make sure the mesh heirarchy is the same, with the same node names, etc.?

Thanks,

Ed


Hujiklo(Posted 2004) [#2]
yes - if you animate them in your 3d app. one after the other i.e. not on the same frame count. You can then use 'animsequence' command to grab just the frames you want, remember them and play them back as and when you want them.


Hujiklo(Posted 2004) [#3]
uh - as for the last point. I think not....but I haven't tried it - I think there will be some complications.


EddieRay(Posted 2004) [#4]
"animsequence" command?


Ricky Smith(Posted 2004) [#5]

Can I have multiple animation sequences in a single .B3D file and play them individually and separately? For example, say I have a scene with a radar dish that can animate (spin about Y or whatever), and a door that can animate (open/close). Can I have both of these animations in a single B3D file, and play them independently?



Yes - animation sequences are just sections of key frames.You can either create sequences by extracting a number of frames from the base frames or a sequence can be loaded from a file individually.
When creating your animation you can either save all your animation frames in one .b3d file and then extract each sequence i.e walk, run using the ExtractSequence command.You could also save each individual sequence as a seperate .b3d file. These animations can then be appended to the model using the LoadSequence command.
You could create the radar dish , the door and any other animated objects as you like and load them into your scene. You have complete control over each individual entity using the animation commands.
In theory you can also nest animated models but you would have to create the file yourself as there is no tool at the moment which does this. In the above example there would be no need.



Can I take animations from one B3D file and copy them into another B3D file? What are the restrictions? For example, say I have a B3D file with a bunch of biped motions, and I want to use those motions on a new mesh I've made. Do I just need to make sure the mesh heirarchy is the same, with the same node names, etc.?


You can also use these animation sequence files for other models IF - the joint/node names are the same AND all joints in the reference frame for both models have the same or very similar initial rotation values - this is very important because the animation will be offset by the difference.
Many animation apps export models with wierd initial rotation values and it can be very difficult to get 2 different models to share animation without tweaks which defeats the object of sharing animation.
The best thing is to make sure your models use the same skeleton and that initial rotation values in the reference frame are as close to each other as is possible.
You can view bones,create & extract anim sequences with this little tool:
http://webzoom.freewebs.com/smiff/pacemakerver1.zip


EddieRay(Posted 2004) [#6]
Thanks Smiff! That's a really cool program! I'll have to play with it for a while to figure out how to use it tho'... it's pretty daunting.

Thanks for the info. Still I'm wondering, if I have a scene in a single B3D file, and that scene has a radar dish, door, and swinging light fixture, can I load it in as a single entity, with all the animations there, and then play the dish/door/light animations mix-n-match any time I want? I.e., if I start up the swinging light fixture animation, and while that one's still running, can I start the door animation without affecting the swinging light fixture?

Thanks,

Ed


Ricky Smith(Posted 2004) [#7]
Yes - if you use nested animated meshes you can control each individually.Use LoadAnimMesh()to load your file containing the scene and animated meshes.
The parent mesh could be the static scenery and the children could be your animated models.
You would then establish a "pointer" variable to each child object in the main mesh using FindChild(level,"name").
Having said this the difficulty is finding an application that will export a single .b3d file with nested animated meshes. Quill3d is the only app that will export nested static .b3d's - but not animated.(the .b3d pipeline may - i don't know)
Unless its absoluteley necessary that the whole level is contained in one file it would be simpler if your main scene file contains the static part of your level and then you load the animated models after individually either manually or using a level builder like Cshop or Quill3d.

I'll have to play with it for a while to figure out how to use it tho'... it's pretty daunting



Have a look at the included html file. I must get those tutorials done !
p.s. if anyone needs a non-limited version i.e. > 1500 polys mail me.


EddieRay(Posted 2004) [#8]
Okay... great info. Smiff, thanks!

I understand what you mean about the nested .b3d file. I was just toying with ideas on how to make a "level" that had all the animated objects along with the static scene itself, and then just being about to use the heirarchy to find the particular child, and possible include "entity" data in there that the program could use to decide what to do with the child objects that have animation. For a level where there are ambient animations like leaves blowing in the wind, screen doors flapping, curtains rustling, etc., it could be nice to just have the program find children that have these animations and run them randomly from time-to-time... or that sort of thing. ;-)

The issue I see with any sort of level animation is how to make a lightmapped level look good with real-time-lit objects in it. It seems to me like the RTL objects would appear "out of sorts", lacking shadows cast on them by the static parts of the level, or generally looking lit right. But those are other issues...

I've been looking at the .b3d file format spec. and it's not clear to me how I'd go about creating a .b3d file with multiple children each with their own animation(s). The examples are a bit sparse... ;-) Know of any more thorough docs than the one in the B3D official place?

Is there a command in B3D that will tell you how many "sequences" are available for a particular entity, and how many animation frames are in a particular sequence? It seems like you might have to read the .b3d file directly to determine these...

How would I logically structure a .b3d file to describe a scene with a parent object (cube1) and two child objects (cube2 and cube3) where cube2/3 have an animation, but it doesn't include cube1 (so they can be played independently)?

Thanks,

Ed

p.s. I've been trying to get gameSpace to produce .b3d files for animated objects (with not-so-great results) and it seems to produce a hierachy of bones and such (at least), but I'm not sure whether it has the capability to export separate child animations (since I don't have any objects that have that sort of thing). I did get it to load into PaceMaker, but it's obvious that gameSpace is doing something wrong with the joints.

See http://udel.edu/~ed/gs/asabeph.zip