Saving as .egg file

Hi,

I’m looking for a way to save my scene-graph as an .egg file.
Currently, I use the following approach:

  1. save the scene-graph as .bam (with np.writeBamfile)
  2. I execut bam2egg on the bam file.

However there are a few problems here (apart from that it feels backwards):

bam2egg removes certain informations from the scene, for example, switch nodes are not preserved and also collision nodes are lost in this process.

So is there a way to either save the egg file directly or to make bam2egg keep all info?

And of course someone will ask (rightly so) why I do need the .egg files and can’t use the .bams directly.
Well, I want to run the things through egg-palettize. For various pipeline reasons on our end, I don’t have the original egg files or the original egg files are not what I want, because I do some re-grouping in the scenegraph, and want to run this re-grouped thing into egg-palettize.

Any comments appreciated,

Erik

Well, I guess your two approaches are:
(1) write some Python code to iterate through your scene and generate the appropriate egg structures, or;
(2) write some C++ code to fix the missing parts of bam2egg.

Between the two, I’d guess that (2) would be the simpler, because you’re already closer to the finish line. Also, this effort could be more easily contributed back to the community.

There are some things that are more difficult than others. bam2egg doesn’t support animated characters (Actors), for instance, mainly because doing so properly would be a lot of effort. For the other things you mentioned, though, the only reason they’re missing is that no one has needed them before, and they would be very easy to add.

David

Another idea that I had:

since the need for .egg files comes mainly from my desire to use egg-palettize, another possibility might be to change it into a bam-palettize.

How big an effort would that be?

Cheers,

Erik

Huge, I think. egg-palettize does a lot of work, a lot more than bam2egg. And part of that work is examining and modifying texture coordinates, which is much easier in egg files than in bam files.

David