In the last days I had the time to dig into the topic “animation export”. Here is what I found out. First I have to say that I work on a Windows Computer and many of the following tips are only valid for the windows platform, because of the absence of some plugins on the Apple platform. Sorry. Not my fault. I work with Cinema R11, but the plugins I use in the following short tutorial are a bit older, so they should work with older versions of C4D, too.
During the last weeks I found 3 ways to bring animation data from Cinema 4D into Blender. I mention the first 2 ones here, because they exist “theoretically”. I didnt have much success with these ways.
- md2 export with the plugin “animesh”
- collada export
- mdd export with the plugin “mdd writer”
This plugin exports an ams file which in a 2nd step has to be converted to a md2 file with the executable amstmd2.exe which comes with the animesh plugin in the plugin directory of the cinema folder. (md2 is an old format of the quake engine) This works hassle free. I wish I could say the same thing about the md2 importer of Blender. Sometimes it works but most of the times it’ s not. Instead it stutters some script errors, which are mysteries to the inadept. It worked for me one day, so I want to mention it here. But for some unknown reason to me, I must have raised the wrath of the gods and Blender will not import the md2 files anymore. Maybe it works for you. When it worked on my computer I was able to export Position/Scale/Rotation Animation. I couldn’t test PLA Animation.
Collada is a format for Cinema 4D since the release of version 11. It is an open xml based format which was invented as an 3D exchange format by the gaming industry and is supported by many 3D software packages, one of which is Blender. As far as I found out Collada only supports Position/Scale/Rotation animation. No Vertex animation. Although it should support Mesh Morphs. But I dont know how to export this data from Cinema 4D. At least I couldnt achieve more. Cinema 4D writes a collada file with the version 1.4. So the proper Blender Importer (1.4) should be used. But before importing anything into Blender a bit manual work is necessary, because Blender chokes on the dae file from C4D resulting in no animation at all in Blender.
Open the collada file in a text editor. Search for the tag <library animation> . Cinema nests all animation data tags in one surrounding animation tag. This seems to be unreadable for Blender. So just remove the surrounding tag. Instead of:
It should look like that:
I wont go into more details about using the collada format, because I had hard times with the collada importer of Blender besides the problems with the file structure. The importer simply refuses to work sometimes, which makes it a pain to work with.
This leads me to the last option which I would recommend because it worked more reliable than the other options for me.
The .mdd format saves animation as vertex animation data in an additional mdd file. It only saves vertex animation. No Position/Scale/Rotation. Here are the steps:
1. select the .mdd writer plugin from the plugins menu. This will create a .mdd writer object in the object manager.
2.use it to export every object which takes part in the fluid simulation and save the according .mdd file(s).the .mdd file only holds the animation data. Not the object itself.
3. export the objects which you have exported as .mdd files in the previous step as single .obj files. Scale factor for .obj export should be set to 100.
4. now import your obj file(s) into blender and make sure that the option “morph target” is set. Otherwise Blender will mess with the order of the vertices of the imported objects and this will lead to funny results in the animation.
5.Select one of the inported objects within Blender and then import the .mdd file with File->Import->Load MDD… This should write the animation data into the selected object. Repeat this for every object which has an according .mdd file.
Now you can setup your fluid simulation in Blender. All imported animated objects are set to obstacles, the Boundary type must be “NoSlip” and the option “Animated Mesh:Export” must be activated.
And here’s a simple example of a Bouncing Ball in a pool of water: