Include files in EGG files

Does the EGG format support an include file mechanism?

I have tried separating the texture definitions from the mesh by storing them in a separate EGG file and including the file with the directive without success.

most people would not be doing that. Normaly you just export the eggs form the model app and leave it at that. If you need to change the textures you do it in the program. In fact i attach all of my textures to eggs with i load them.

The reason I want to do this is to create easily editable texture sets (skins). If the EGG format doesnt support include files, then I will need to synthsize the final EGG file from pieces at runtime. This is easily doable but I would rather use a mechanism if it already exists.

The egg external reference syntax is designed for including additional geometry, not for defining references within the egg file that would be otherwise undefined (like textures). So, no. Each egg file has to be able to be interpreted correctly on its own.


why would you want to make egg files at run time … egg are very very … read you dont want to load eggs in production software(without a model-cache-dir) … its just like shipping your program with all the C files or py files without compiling them and have them be compiled every time the thing is loaded! Very wast full and very slow, in fact it would take 10 minutes on my computer to load iron angles without a bam cash! You would want to always distribute bam’s in the end or if you don’t know which version of panda they have them be compiled once upon installation or version change.

Now back to your problem with skins. It very fast to just


and be on your way… yet you might have different parts of the model that needs to be texture differently. No problem just find them


If you explain your set up i might suggest even a better method.

Hi Treeform,

We plan on generating BAM files on the client machine after we create the EGG from included, customized pieces.

then you would have bunch of bam files that have the same data with only difference being the textures? Bam files get a bit big some times :slight_smile: For skins you just want to change them at load time and you will be fine trust me.