Selection of meshes inside of scene.

All right guys, hopefully you can all help me out. Ive been staring at the manual for a bit and it seems like it should be plausible (do it with animated models all the time), but cant seem to figure out how to approach this one.

I am making a Risk-style game inside of panda, and I just completed the 3d model i am using for the game map ( … lored2.jpg). I have grouped the ‘territories’ into different groupings inside of Maya (meshes they are called).

I need to be able to manipulate and interact with those specific meshes inside of the node on the scene graph. I know this is done within animations, say the arm is moving independent of the body, but the code ive looked at it seems like it is being connected up inside of panda3d itself not Maya. Theres got to be an easy way to go about doing this, I just cant seem to find it.

Thanks alot for your help in advance guys - currently working on serializing up the game data in text. Adding the graphics later wont be too difficult. Look forward to seeing some stuff in the showcase section very soon.

you can always search for names in nodepaths.
e.g. you wanna hide europa:

territory = loader.loadModel("territory.egg")
europa = territory.find("**/europa")

have a look at the manual:


Also, it might be necessary to ensure each mesh is a separate node in Maya, and that each one is tagged with the flag as described in Manipulating a Piece of a Model.

You can use the eggObjectFlags.mel script, described in another forum post, to add this tag to the nodes in Maya.


Sweet, thanks!

To makes sure i got this right, I apologize if im beating the dead horse with questions :slight_smile:.

Every model, when loaded, becomes a ModelNode in the scene graph. Beneath the ModelNode are one or more GeomNodes containing the actual polygons. If you want to manipulate a piece of a model, for instance, if you want to change the texture of just part of a model, you need a pointer to the relevant geomnode.

So when i load up my new scene into panda, there will be a top node on the graph who is the scene/collection of models, whose children are the nodes , and the children of the models are the polygon data for those, in this case territories.

Thanks again for your help everyone,I really appreciate it.

Right. You’ll only have actual Model nodes if you use the egg tag, but that’s the right idea.