Loading Animated Model from 3ds max

Hi,I am a c++ game programmer,I am new to panda3d. This is my first post ever. I will get straight to the problem. My Mesh is loading properly from 3ds Max complete with animation and everything however parts of the character like the eyeballs,shoes,patch of hair,boxing gloves are being left behind on animation.What i want to do is find these individual pieces of geometry and transpose them wrt to the main body and make them children nodes.
I am at a loss how to do so. Please help. :confused:

Well, you will have to process the egg file with egg-optchar, and use the -flag option to identify the pieces that you need to reparent. This will make these pieces appear as separate nodes that you can then locate in-game with the actor.find(’**/nodename’) command (use actor.ls() to list all of the nodes).

By reparent them to the main body, I assume you mean you want them to inherit the animation of the main body (or head, or whatever node you want). To do this, you need to expose the particular joint you want to parent them to, either via actor.exposeJoint() at runtime, or via the -expose option to egg-optchar, and then you can reparent the newly-flagged pieces (above) to this joint.

But it would probably be better just to fix the animation in Max so that it converts correctly; and then you won’t have to deal with any of these issues. I don’t know what specifically the problem is, but it shouldn’t be too hard to find it. Probably the way these pieces are assigned to the skeleton isn’t supported by max2egg, so you should just use a different way to assign them.

David

If you want to fix this in max, then you need to use the skin modyfier to attach all the parts to the bones, and they need to be bones or parts of a biped system, dummies, helpers, geometry, lines don’t get exported as joins.

Thanks David and Wezu for the quick reply.

i was fiddling with egg-optchar before posting but i could not get the command to work properly and the program kept crashing at the

“egg-optchar -d outputDir -flag Sphere01=theHead modelFile.egg anim1.egg anim2.egg” line.

I substituted ‘outputDir’ with my directory name that contains the model and instead of “Sphere01” i put the geom name from 3ds max and named the proper model and animation file in the required order.

Moreover the Actor.ls() function doesn’t seem to list the names of the Geometry. It displays the follow lines

PandaNode Character
Character __Actor_modelRoot
GeomNode <5 geoms: S:>

How do i get the names of these 5 geometries?

@wezu :the reason i can’t combine the the separate geometries together in 3ds max is because then the materials/textures get all messed up. This is because i believe multiple materials/textures are not supported on a single mesh in Panda3d.

P.s: i think you are right i bought this model off the web and i noticed it has helpers to attach these parts to the skeleton.

If you tell me the output from egg-optchar, I might be able to provide a clue why it’s crashing. But simply the fact that it’s “crashing” gives me nothing to go on.

The output of ls() is correct. That is the geometry under the model. It doesn’t have anything interesting yet because you haven’t yet flagged anything.

David

You don’t need to make it one mesh. Add a skin mod to the gloves and add just one bone to that skin.

If optchar won’t work you can hand edit the egg file. It’s a bit of work but not that hard. You’d need to add a name to all the polygons of a mesh, but they all should be in one .