I was trying to save a model (which I initially load from an Egg) as Bam and then convert it to Egg. The idea is to be able to work on materials and textures in a wysiwyg fashion by writing a simple editor.
Export to Bam works very well. If I set a new material on the model, save it as bam, and then load the bam, the model looks as expected.
I have a problem with using bam2egg, though. The material never gets written into the Egg. There’s always only the geometry data. Also, if the model has textures applied to it I get the following error:
Assertion failed: n >= 0 && n < (int)_render_stages.size() at line 104 of built/include/textureAttrib.I
EDIT: I know bam2egg isn’t the most reliable solution and that it might not always work, but this is a very simple case.
I’ll appreciate any help
EDIT2: Ok, I learned what seems to be the right way to do what I need. Instead of messing with bams I just modify the EggData, which seems a lot cleaner.
Still, it would be nice anyway if bam2egg worked, even just for the sake of it.