Source code for the latest version on GitHub

Download the latest version here
(ZIP file; 34,443 bytes)

Download the original version here
(ZIP file; 52,861 bytes)

Cinema 4D Automated FBX Export source code (GitHub)

Download Automated FBX Export here
(ZIP file; 15,540 bytes)

Utility plug-in which helps when exporting meshes from Cinema 4D for use in Unity

The Unity export tag properties panel

Originally this was created a few years ago when I first started to discover that there were some issues with getting meshes out of Cinema 4D and into Unity.

Although Unity was designed to import native Cinema 4D files (by opening them up in the background and importing them as FBX) part of the problem was that it would bring the whole document in as one monolithic item. In addition, some parametric/procedural objects, and some other items like subdivision surfaces, would not import correctly (or at all).

I discovered that this did not sit very well with my own style of working, which tends to involve lots of experiments with different ideas, lots of intermediate stages, and so on. So although I would have lots of stuff in my Cinema 4D documents, I wouldn’t want all of that going into Unity. But the things that I did want going in I wanted to go completely and properly. For a while this used to involve a process of creating new documents, saving all the wanted stuff into there, saving that, etc ... Okay if you only have to do it once in a while, but I’m the kind of person who likes to try lots of little changes, see how they look immediately in the game engine, go back, tweak, try again, and so on. Therefore it did not take long to get heartily sick of the way Cinema 4D and Unity were forcing me to work, and the first version of this Python plug-in was born.

As it was my first attempt to do anything more complicated than a few lines of scripting with Python, and my first attempt at using the Cinema Python SDK, it was a bit of a bodge job in the way that it worked, but it was good enough.

Over the years, with the passing of many Cinema 4D versions, some of the issues have mercifully disappeared: symmetry objects now come in correctly, subdivision surfaces (the old HyperNURBS objects) do what they are supposed to, and parametric generator objects don’t have to all be converted to polygons. It’s even possible to split geometry in Unity, and to get rid of the bits that you don’t want, and yet to still have the remaining items update if the original file is overwritten. But I still seem to sometimes find myself in a situation where it’s useful to have a few extra options regarding how an export is carried out, and thus the plug-in never really went away. Even today it’s useful, as with the latest version of Cinema 4D (release 18, as of the time of writing) there seems to be something broken with Unity’s import of native Cinema 4D files, meaning that they have to be exported as FBX files, which is still a painfully manual task.

(Scrub that comment about FBX import being broken with release 18: with the first version it was, but I notice that with a more recent update they have fixed it. I really should set my update settings to “automatic”. Boy, how dumb do I look/feel right now?)

The two new entries that are added to the Cinema 4D tags menu

Eventually I even got around to re-writing the whole thing as a “proper” Cinema 4D plug-in: tags which are attached to the objects you wish to export, and then a command which when run carries out all those exports, using the settings specified on each individual tag. (Originally it was a null object with a bunch of pre-copied-and-pasted data fields on it which you had to paste into your document and then configure via drag and drop.)

The Unity menu added to the main Cinema 4D menu bar

Setting up this plug-in as a shortcut makes a lot of this general aggravation go away. And if you set it up with the standard save command keyboard shortcut, and then enable the “Do Cinema 4D Save command” option in the main menu, now whenever you hit command-S you get a save of your original Cinema 4D file and then the exports are carried out, thus smoothing out your workflow even more.

There’s lots more specific information on the postings from the original Unity forums, and the full source code and support files are hosted on GitHub.

This is the original Unity 3D forums post where I uploaded the original plug-in and then the more recent update.

The Python code, resource/description files and stringtables are all available for viewing and download on GitHub.

Even when not using the above plug-in’s ability to output split up files I have still sometimes found myself using it just to have the Cinema 4D save/then export FBX process available on the single keystroke. This led me to create an even simpler version of the plugin, which basically drops all the Unity export tags stuff and just allows the standard save command and then the FBX export to be “daisychained” together.

Cinema 4D Automated FBX Export: source code on GitHub