Hooray! Getting an animation from C4D

Okay, I’ve spent a few hours investigating this problem (as I didn’t want to ditch Panda3D) and I’ve finally been able to get an animation from C4D into Panda3D. I’ve listed the steps I used for anyone else trying to get an animation from Cinema4D into Panda3D. Note: I have not been able to replicate this success with any bone-based animation thus far. [color=red](EDIT - I’ve had some success since posting this… watch this space. :wink:)

First of all I needed to get a 3rd party X exporter from here: spackenz.de/~philipp/.

Secondly, I could NOT use bones. The animation is of two seperate objects. I moved the object axis of one of the objects so that it became an ‘elbow’ between the two objects and then rotated the object around that.

I then set up a short animation to move the object around its axis (so it looked like a bending leg). Once I’d set that up, I exported the file using the X-exporter plugin above (X-file Export). Note: I unchecked “Export Bones” and “Only Bones” in the exporter’s dialogue.

Now onto converting it into two egg files.

For an animation we need the model file and the animation file, so to seperate the x file into the two required files I used x2egg with the “-model” and “-anim” flags as follows:

x2egg -model arm.x armmodel.egg
x2egg -anim arm.x armanim.egg

Once I’d done that, I tested it in the panda preview:

pview armmodel armanim

HOORAY! It worked!


1 Like


In the manual, at the bottom of the TOC you see some guides how to export from different 3D programs. If you want, you can add a guide for C4D there too.

Okay - sounds good - I’d love to help out other C4D users that are trying to get their models into Panda.

I’ve had a little bit of success with Boned animation but it’s proving to be rather restrictive - it only seems to work with absolute vertexed rigging which, in all honesty is pretty much deprecated in C4D now. I believe it’s only there for compatability with mocap systems.

Thanks… this’ll really help me out as a fellow C4D user.

Hi Sickfish,
This may be a stupid question…but I had some trouble getting my models out with a texture in the Maya2pandatool but maybe this will help. How did you invoke the x2egg tool? Is it from code in your game:

loader.loadModelCopy( 'models/box.x' )

which runs the importer? If thats the case thats cool!

Also does it matter if you have the extension on there (ie *.x) or can you leave it off? Thanks!

Well… you run x2egg the following way:

  1. start up a console
  2. cd to the directory where the .x file is located
  3. type:
x2egg yourfile.x yourfile.egg
  1. And you’re done!

Right. But note that loading an .x file directly is also supported by Panda, as illustrated in the posted code; this implicitly runs the converter on-the-fly with the default arguments.


Thanks for both answers, its exactly what I was looking for!

bonjour j’ai un probleme avec la convertion de mon file.c4d en .x, la texture n’est pas enregistrer dans le .x … pouvez vous m’aider svp