Actor exporting with blend2bam

Hello. Can someone tell me how to export a model and its animation with blend2bam from blender?
A reply from @Moguri would be appreciated as he/she created blend2bam

Which part are you struggling with? It should work without special consideration, assuming that it is an armature animation (other types of animation are not supported).

I made the first animation from this video (I am learning Blender animation and now I am trying to export to panda3d). It has no armatures as in the video it doesn’t show so.

How do I overcome this? (I can’t use YABEE as there is an issue with it so anything else will do).

Here is the file. (Sorry about the multiple posts).
actor.blend (756.3 KB)

Don’t keyframe animate in Blender unless you’re keyframe animating an armature.

Panda3D has more than enough “keyframe” animation capabilities with the Task system, intervals, sequences, and parallels. IE do your static animations in Panda.

You can animate this way if you’re dealing with a complex animation of many objects, such as in a cutscene, you just have to create an armature and attach all the objects to bones in the armature.

It will be more efficient that way, anyway.

1 Like

So you are saying that instead of doing this I can just do a posInterval and an hprInterval, right?

You can, indeed, I do believe.

However, rdb’s point stands above: this can be also be done via an armature.

Now, I take rdb’s word that it’s more efficient (I don’t myself know whether it is), but there’s another advantage: using an armature allows you to design the animation visually, rather than via pure numbers. The former can–for me at least–prove rather more intuitive, and thus rather easier to produce the desired results with.

In any case, if you want to produce animations more complex than translations, scalings, rotations, and shearings, then you’ll likely want to take up armature animation eventually. And it makes some sense to start learning while handling simpler animations, I feel.

Thanks! I will learn armatures as I have completely NO idea about what they are.

That’s fair!

The short version is that an armature is a “skeleton” that defines how a model moves. Each vertex is given a “weight” that determines to what degree each “bone” in the armature controls it, and then, as the bones are moved, the vertices move accordingly.

I daresay that there are tutorials out there that will teach the concept in more detail, and further, how to use them in Blender!

Armatures (often called skeletons in other programs) are designed so handle complex moving characters, by assigning different bones to different body parts and having those animate independently. Each individual bone can have their position and rotation animated, allowing you to deform the mesh as you wish.

However, you can also use them to animate separate objects in a scene, by just creating a separate bone for each object, and assigning each object to their bone. Then each object will follow their bone, and you can animate those bones as you wish. This is the method that @janEntikan and I used in Hobot’s Ascent; each moving object in those scenes is a separate bone and we just run a bunch of different animations on them.

I was generalising a little, but one advantage of using an armature is that it allows independently moving parts to exist together as a single flattened-together mesh (since the individual vertices are animated), allowing a reduction in the number of Geoms sent to the GPU, though this is assuming that the objects also share the same material and textures.

Of course, CPU animation can sometimes make things more expensive if there are many vertices to animate, though enabling hardware skinning can offset that.

1 Like

So you are saying that instead of doing this I can just do a posInterval and an hprInterval, right?

I admit it’s a bit “mathy” to animate this way, but I like it. Maybe it’s easier from a workflow perspective to just animate with single bones transformations in Blender, like rdb described. I personally do not care about a 10 frame per second speedup when I can get programs using intervals to run in the multi-thousand frames per second range. Using a few position intervals probably isn’t going to make or break your game.

The main reason I like animating with intervals is because it allows precise live control of objects in the game world. That said, I do use armature actions for skeleton-like movements. And I even care so much about armature performance that I created hardware skinning support that works with simplepbr shaders by merging some code together.

My favorite thing about Panda3D is that it’s not opinionated.

2 Likes