Panda's native egg file format is human-readable. This is convenient, but a little bit slow to load. To accelerate loading, Panda supports a second native format, bam. These files are loaded very rapidly, but they cannot be edited in a text editor.
Texture pathnames in an egg file are first assumed to be relative to the egg file itself. If the texture is not found at that location, panda will search its model-path, which is specified in the panda config file. When doing this, panda concatenates the directory which is part of the model-path to the entire string in the egg-file. So if the model-path names the directory "/d/stuff", and the texture-path in the egg file is "mytextures/tex.png", then panda looks in "/d/stuff/mytextures/tex.png."
It is our intent that soon, bam files will behave exactly the same as egg files. However, at the time of this writing, there is a small inconsistency. Bam file texture paths only search the model-path, they do not search relative to the bam file itself. Also, bam files are specific to the version of Panda they are created with.
The program egg2bam is used to convert egg files to bam files. Egg2bam will complain if the textures aren't present. You must install the textures (into your model path) before you convert the bam file. You can run the egg2bam program as follows:
egg2bam -ps rel -o bamFileName.bam eggFileName.egg
|
The egg2bam program accepts a number of other parameters that may be seen by running egg2bam –h . When the bam file has been created, move the texture files where they should be relative to the Panda3D program.
|