Bam File Format

I want to write a model loader for fun.
I don’t want to use egg file format because it is too large.
How do I find docs about using the bam file format?
I know it will be hard but I wanna try.

The bam file format is documented within the Panda3D source code itself. In particular, see panda/src/putil/bamReader.* and bamWriter.*.

But I don’t recommend writing directly to bam format. It’s just not designed for that. The bam format is designed to be as close as possible to Panda’s internal structures so that models are loaded quickly and easily; but for this reason, the bam format changes subtly with every release of Panda. If you were to write a program that generated a bam file directly, not only would it be difficult to write, but it would very quickly get out of date.

The egg file format is designed specifically to be an interface format, between Panda and anything else. It’s designed to be easy to read, even for a human, and easy to write, from any number of third-party programs. It’s also designed to be easy to operate on. It’s not designed to be small because it doesn’t have to be small. This is the 21st century, and files that are hundreds of megabytes are not difficult to deal with.


The idea is to use egg2bam to translate my models to bam format.
Then I want to read from the bam file. The main reason is that with airblade the one model was 50MB!!!
But the bam was 7MB.
So I just want to save space.
Thanks for showing me where the docs are.
Your a great help.

Ok, I see that bam is quite difficult.
I will use egg instead.
Can I legally use your egg format in any commercial products
that I make with my own engine? (ie not panda)
Why does panda have all these great things on the right and when you
click on them you go to the gallery?
I want to download this stuff. How can I?

Also, can you make the download size of panda smaller.
Like make the samples and the actual engine two separate downloads.

You can write an egg loader if you want, and use it in any application of your devising, with or without Panda. There’s no copyright on the egg syntax. Though I imagine it would be easier to use Panda’s egg library to read the egg file, since that code is already written for you. (You can use the egg loader without using Panda to do the rendering, if you want to do that for some reason. You can to load up an egg file as a table of egg structures, and then walk through the table to read the contents of the egg file, without converting it to renderable Panda geometry.)

Note that you can use the egg.pz format to compress your egg files and make them much smaller. This is just a zlib-compressed egg file. Panda can load the egg.pz format just as easily as it loads a plain uncompressed egg file. Of course, if you write your own egg loader, you would have to deal with this yourself.

The pictures on the right are shots from several different projects that have been developed with Panda. Most of them are not available for download. In many cases, this is because these were student projects for the Building Virtual Worlds class, and they were designed for the semester and not for long term. In other cases, it is because they are ongoing projects that are still being developed.

There have been other requests to separate the binary engine from the samples. However, the samples do tend to change (at least a little) with each release, so you may end up downloading them anyway. And note that the source code can be downloaded separately from the samples.


How would I use this egg loader in my assembly program.
Do I call it like a DLL?
we do it like this
call ‘DLLname.DLLfunction’ parameters

or do I have to call it with python?

Does the model loader still need any modifications or is it complete?

The egg loader is written in C++. You can call it like you would call any C++ function. See the code in panda/src/egg and panda/src/egg2pg for more information.


What is the name of the opengl dll files on linux?
On windows
we have opengl32.dll , glu32.dll, glwext.dll and glut32.dll

linux dosent have any dll’s
i have some’s in my /usr/lib could be the thing you’r looking for