External models references in bam.

I’m using blender and my level levels/tropic01.blend contains terrain mesh and other objects like trees and rocks are dupligroups from external libary e.g. …/models/rock01.blend.

So to export it to egg.pz I’m using ofcourse Chicken and rock inside rock01.blend contains tag ‘file’ = ‘…/models/rock’. It works perfect with egg: levels/tropic01.egg.pz refers to …/models/rock01.egg.pz.

Now I’m trying to convert tropic01.egg.pz to tropic01.bam but it lost that rock and other external models. Only terrain is visible.
egg2bam displays:
‘:egg(error): Could not locate …/models/rock01 in’

The egg loader searches for references relative to the egg file itself. So, if you have an egg file stored in, for instance, /my/model/dir/levels/tropic01.egg.pz that references “…/models/rock01”, then there must be a file called /my/model/dir/models/rock01.egg.pz. Is there such a file?

What is the command line you are passing to egg2bam?


Yes I have GAMEROOT/levels/tropic01.egg.pz and GAMEROOT/models/rock01.egg.pz. Game works perfect that way (with eggs). It doesn’t work with bam only.

I’m passing plain ‘egg2bam -o tropic01.bam tropic01.egg.pz’ I can’t see any options related to models, maybe I miss something ?I see options only for textures and for fixing full paths, but all may paths are relative, I always keeping it clean.

EDIT: --------------------------------
I found solution of my problem.
I had to unpack ‘rock01.egg.pz’ to ‘rock01.egg’ and rename to ‘rock01’ and then export level, then exchange rock01 to converted on side rock01.bam.

Seems egg2bam doesn’t respect all that automatic stuff with .egg/.bam also doesn’t recognize pzip.
But I’d like to leave tag inside blender without extension to use both .egg in development and .bam in deploying.

EDIT 2: ---------------------
No, models/rock01.bam is not necessary anymore, afterm changing to .bam all external models are bundled into level tropic01.bam. Is it possible to leave it external ? It’s waste of file size, thats why I leaved models external to reuse in every level.

Not automatically–the bam reader does not (presently) support external references. To achieve this sort of thing, you’d have to store just a dummy node in your egg/bam file, then write Python code to load up the referenced model separately and attach it to the dummy node.