Can you animate a .bam without having the .egg or .obj

I have existing animations in .bam and I have the models in .bam but i have no eggs or objs. Is it still possible to animate these models? If so, how?

If model and animation has the same bones structure, then you can load actor and animation by usual way. Also you can use chain of coverters bam2egg -> egg2<another_format>, but not sure that it support bones, anyway you can try.

I did bam2egg then egg2x then converted x to obj, but it appears that the bones are not preserved, how may I go about reassigning bones to the model?

*.obj files does not supports skeletal animation as far as I know, and you should check files whether they contain bones after each step.

I don’t think the bones even made it past bam2egg.

Animation after and before bam2egg: imgur.com/a/1GhFW

Anyways, I’ve converted to collada (.dae) instead, and now I have this…

imgur.com/a/3SGyt

Hmm another question - are you sure that your bam and bam2egg have the same version? Manual say

I’m not 100% sure, but I think it should be possible to expose each joint in a loaded actor, list their hierarchy and re build the animation (egg) frame by frame. Think of it as reverse motion capture.

Do you know how I could go about doing this?

Can you find out what version of panda3d is associated with a bam?

You can use the bam-info utility to print out information about a .bam file, including the .bam version number. You could use that version number to find out which version of Panda created files with that .bam version.

Well, It’s 6.24 so I tried using Panda 1.7.1’s (6.24’s corresponding version?) bam2egg with the same result…

Unfortunately I’ve not seen BAM -> Panda versions collation, but you can make any BAM file with your current Panda, then check it version with bam-info and compare results.

Well, if you can use bam2egg at all, that proves that it can read your .bam file. The only issue is that bam2egg only supports a few features, and does not offer a complete conversion.

Hmm, I did some experiments, and think that perhaps it’s a bug in the bam2egg - something wrong happens with bone transforms.
What interesting - single bone works well, so perhaps, that bam2egg writes absolute transforms of each bone instead of relative.

Ok, i’ve found something:
eggSaver.cxx Line 350
character_joint->get_net_transform(transformf);
I think it should be character_joint->get_transform(transformf);

With this fix I can successfully convert simple BAM with joints to the EGG. If you’ll send me your BAM file with animation I can test how it works with more complex files.

Thanks, I really appreciate the help :smiley:

mediafire.com/folder/jn274k … or_bam2egg

Ouch, your animation file use fftw, but my Panda, compiled without fftw and I have no fftw libraries to recompile. Can you send uncompressed animation file? I.e. converted to egg? Problem should affect only on base model file and not on file with animation data, but I can’t check result without it.

Well, all the animations I have for my models are in .bam (and presumably fftw), so my goal it to get the model into blender to create new animations for the .bam models. (by converting the animations down from .dae to .x then .egg)

Thanks ninth! I can confirm that this fixes my own animated models with bam2egg. I’ve pushed your fix. 8)

I also noticed that bam2egg didn’t export materials, and I thought: Gee, that would be really easy to add. So I pushed support for that as well.

@Xioms I need this file only for testing fix correctness.

@rdb Thanks! Also there another one issue - seems bam2egg removes texture entries if can not find corresponding files, I think that it would be useful if bam2egg will have flag, which allows to keep wrong texture entries to correct it by hand later.