Big egg

Hello,

I downloaded few blender models from turbosquid site. I used chicken plugin to transform this blender models into egg files.
But at my surprise, these egg files are so big (> 100Mo), and when I load them into panda while the game, it takes more than 10 sec, and freeze.
Is there any parameters while exporting to reduce this size? Am I doing something wrong?

Thanks

The size of an egg file is directly proportional to the amount of geometry in it - if its kicking out large files then that just means it has a lot of data. I’m afraid if you want to reduce the detail you will have to do so yourself, in blender - there is no automatic way of reducing the amount of geometry that is 100% safe. (Look into the retopo and baking tools if doing that though - they are really effective.) Note however that if your sticking an entire level into an egg file then you should expect it to be that large, probably larger. Also you can hit the .pz option in Chicken to compress the file and make it smaller, and as long as the bam cache is working the slow load should only happen the first time - it should be faster on repeated loads, and that speed when you create a p3d file or installer, due to the automatic conversion to a bam file during that process.

Yeap. I am newbie in Blender. I have so few skills (sigh).
It is not level, but battleships.

What you advice to me? To load a maximum of egg models at the start of the game? Or there is a way to load models in background to not freeze the game.

Well, a battleship is going to be pretty big if it is detailed! With size it is all a matter of context - you have a finite amount of run-time storage and a finite amount of patience during the loading screen - you have to choose how to split that up between your assets.

You can certainly load models in the background (The asynch loading methods.), create loading screen etc. There are some example scripts in the forums, and I have a particularly complicated, though powerful, example in Naith. However, at this point I wouldn’t worry - get whatever your working on working, then worry about details, such as loading screens, later.

You still might want to spend time reducing the detail of the battleship in the future, but right now you probably don’t need to, so I’ld wait till you have no choice, and hence have the motivation to spend the time learning Blender.

I don’t know the asynch matter in Panda. I will check into documentation.

Thanks for advice!

i want to bring up .bam files. unlike the plain-text version-compatible egg files. .bam files are binary and usualy only work with the version of panda they where created with.
due to their binary and engine-optimized nature bam files are a LOT smaller than egg files, and they load many times faster.

usualy you want to work with egg files during development, and ship your game with .bam files. if you find egg files to be an annoyance during development you can use .bam files there,too. but make sure you keep a backup in egg format or you’ll run into problems once you switch to a newer version of panda.

Or take advantage of the model-cache (the first time you load an .egg file, a .bam version of it will be cached, so that the game loads fast the second time). You can use eggcacher to force an .egg file to be cached.

Chances are turbosquid mode you got is very high poly and not meant for games. Thats why it takes so big.

Yeah I saw that. But for the moment, at this state of the game, I just want a few models to make the core of the game, and be able to show it to people.

After that, I think I will able to find 3D model designer to join the project.

Thanks for your response