Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[SOLVED] How to import C4D Animations Into Unity?

Discussion in 'Animation' started by Brokep, Jul 7, 2015.

  1. Brokep

    Brokep

    Joined:
    Jul 24, 2014
    Posts:
    15
    C4D Ver: r16
    Unity Ver: 5+

    Is anyone familiar with any possible ways to import a c4d animation with emitter/metaball or basically anything besides rigged bones into Unity? Recently tried to import a flame-looking animation based on EJ Hassenfratz's tutorial http://www.eyedesyn.com/2015/05/07/creating-2d-cartoon-fire-effects-in-cinema-4d/ . I used NitroBake to bake my animation to keyframes and then exported as .fbx, however when I imported it into Unity no animation would show. I was told there are ways to overcome such problems using some Unity extensions but the person was really busy so I thought I should ask here on Unity forums.

    Edit: I should mention that I have imported bone animations before or even simple rotation/position/scale keyframed animations. Also if anyone wants to test how to import I could share the c4d project.
     
    Last edited: Jul 7, 2015
  2. Brokep

    Brokep

    Joined:
    Jul 24, 2014
    Posts:
    15
    B.U.M.P
     
  3. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    For that kind of mesh animation you have a couple of choices, if it is a general mesh animation where vertices are moving then you can use a Point Cache modifier such as the one in MegaFiers, if though you mesh topology changes over time, which it seems to in the example, then you can export it to a series of OBJ files and use something like MegaCache from the same author to play that back. Example videos of both systems below.

     
  4. Brokep

    Brokep

    Joined:
    Jul 24, 2014
    Posts:
    15
    I might go fuc*ing crazy trying to import an animation but I'm positive that I'm gonna at least manage to do it. Felt the need to update this thread in case someone else is searching around. C4d doesn't support .pc2 or .mdd file formats. There's an mdd writer and mdd reader over at animationsnippets.com. Sadly it's not compatible with C4d r16. Sometime tomorrow I'll have r13 installed on my pc and test if the mdd writer works there. Assuming it's working I'm gonna give MegaFiers - MegaCache a go to see if it works.

    If someone else is importing his animations differently please reply to this topic.
     
  5. Brokep

    Brokep

    Joined:
    Jul 24, 2014
    Posts:
    15
    Update: Installed r13, still mddwriter doesnt show up. Seriously why does MegaFiers mention (in a youtube video) "We added .mdd file format to support c4d" when there's no freaking native export of that file format and no god damn plugin works. For real no word can describe my rage right now. It's been 5-6 years since people started complaining about PLA animations and Unity hasn't done a single update on that area and I doubt they will since there's just one annoying person demanding this. Pfff hopefully someone will know something more. Don't bother mentioning that I could create a custom script on c4d or unity, if I had that kind of knowledge I wouldn't be whining here.

    Update: Found another C4D plugin which is updated quite often: Riptide Pro, you can use mdd exporter and .obj exporter quite easy. Turns out I'll might try MegaFiers.

    Final Update: Got this to work! Finally! The Object Cache did the trick. MegaFiers FTW. (Exported .OBJ with the Riptide Pro Plugin from C4D)
     
    Last edited: Jul 9, 2015
  6. BioeJD

    BioeJD

    Joined:
    Mar 11, 2016
    Posts:
    6
    Is MegaFiers really the only way to get mdd vertex animation support in Unity? Unreal did this long ago, and Unity received feedback on this feature for 6 years. Perhaps, I'll whip up some code of my own when I have time. Any other (cheaper) plugins out there that I haven't managed to find?
     
  7. BioeJD

    BioeJD

    Joined:
    Mar 11, 2016
    Posts:
    6
    It seems like my animation imported fine as BlendShapes after modifying the mesh with the point cache (mdd) in Blender and then importing into Unity.
     
  8. clomotion

    clomotion

    Joined:
    Apr 18, 2017
    Posts:
    1
    The workflow is:
    1. Model/Animate in Cinema 4D.
    2. Bake animation with Nitrobake in Cinema 4D.
    3. Export animation from Cinema 4D as an obj sequence using Riptide Pro.
    4. Bring obj mesh animation into Unity using MegaCache.
     
    SirGulliver likes this.
  9. Brokep

    Brokep

    Joined:
    Jul 24, 2014
    Posts:
    15
    Yeah that's my workflow as well. It's been like 2 years since then and haven't looked around if there's something faster or that requires less plugins/work. But that still works fine and isn't that hard. Only complaint would be organizing and working with lots of .obj files.
     
  10. mateaf

    mateaf

    Joined:
    Jun 1, 2017
    Posts:
    1

    Thanks so much for posting your solutions. Would you minding explaining the MegaCache part of this workflow? I baked nitro bake and and made an OBJ sequence using riptide, but I am a little stuck on the next step?

    Any help is appreciated.
     
  11. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
  12. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Hello and thanks for a straight method but one question can we use megafiers instead of megacache for the last step?
     
  13. SirGulliver

    SirGulliver

    Joined:
    Aug 6, 2019
    Posts:
    3
    Thats exactly what i would need! Sadly the Riptide Pro is not supported on Cinema 4D R20... Does anyone know a workflow with the r20 version? Maybe there is a new hidden feature allowing the export to a compatible .obj sequence for megacache?
     
  14. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297


    There is an link to r20 .obj sequence exporter in video description .
     
    SirGulliver likes this.
  15. SirGulliver

    SirGulliver

    Joined:
    Aug 6, 2019
    Posts:
    3
    Have to check it out ;) Thanks for now!!
     
  16. SirGulliver

    SirGulliver

    Joined:
    Aug 6, 2019
    Posts:
    3
    Hey PolyFlow! i tryed this workflow... but actually the import to unity with the vertexanimation tool its not working correctly, when im importing the seq, it shows up "vertex count missmatch"
    I have a simple Particle Animation with some spheres as mesh, i used the xpresso explained in this tut:

    to bake the animation from there i got a single keyframed object. cause the nitrobake also dosnt work with my kind of animation... Am i doing something wrong in the creation of the animation?
    Could it be a problem that my mesh is disapearing, it should be a lowpoly ball hit (like dust), so the animation ends with no mesh, nothing complicated...
    A solid way to export this kind of animation would be an amazing impact on the creation possibilities for unity...
    But since I started with unity, i was always stucked on that point...
    Would it be really the best solution start using 3dsmax or even blender for this kinda stuff?

    Bests!
     
  17. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    You must use the Mesh Sequence Player to import particles, because this sequence does not have a constant number of vertices.
     
  18. SallyAnn

    SallyAnn

    Joined:
    Jun 5, 2019
    Posts:
    7
    I'm a new comer to C4D and Unity and in the middle of a project, could anyone write again the simple steps for exporting C4D R20 animation using deformers or effectors into Unity 2019.2.9f1. I'm a bit lost!
     
  19. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Get the .mdd exporter for C4D found on this page
    Export your animation to an .mdd file.
    Get MegaFiers and install it for Unity
    Import your base fbx model into Unity.
    Add it to the scene.
    Add the MegaFiers point cache modifier to the model.
    Import the .mdd file from the Point Cache modifier inspector.
     
  20. SallyAnn

    SallyAnn

    Joined:
    Jun 5, 2019
    Posts:
    7
    Thank you so much @MikeUpchat do you use this in your work flow? My only problem is I'm a masters student (actually a graphic designer originally which is why it's all new to me) and Megafiers is a bit expensive at $150. Is there a cheaper alternative in the $50 range? Does MegaCache work?

    What do you think of the workflows suggested by @polyflow3d using Vertex Animation Tools at $50 which if I understood correctly was:
    Videolink:

    1. Model/Animate in Cinema 4D.
    2. Bake animation with alembic in Cinema 4D.
    3. Select Baked object in C4D
    4. Execute this script: http://polyflow.studio/Downloads/C4d_ObjSequenceExporter_r20.py to export animation from Cinema 4D as an obj sequence. (The script worked I got this far yesterday but paused before purchasing Vertex Animation Tools as I'd like to be sure I'm getting the best plug in before purchasing)
    5) Select output sequence name and use Vertex Animation Tool: https://assetstore.unity.com/packages/tools/animation/vertex-animation-tools-128190
    6) Done

    Last questions are:

    Can I import multiple objects at the same time which animate in a group (it's a 3D animation), or do I have to import each individual object separately using this method and put it all together again in Unity ( I hope not!)

    Do both tools increase the Unity file size similarly?

    Thanks again
     
  21. SallyAnn

    SallyAnn

    Joined:
    Jun 5, 2019
    Posts:
    7
    @MikeUpchat @polyflow3d Here's a shot of the kind of simple elements I will use in the animation, the bee will start a small animation sequence, pollinate some flowers, which will grow into fruits, all very geometric with music, SFX etc but I'd like to add deformers etc in C4D to bring the bee to life, squashes, jiggles etc. I then need to take this into my Unity Scene which is a futuristic museum exhibit about children's toys, attached.
     

    Attached Files:

    Last edited: Nov 2, 2019
  22. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    MegaCache will work as well. For PointCache objects you will need to do each object in turn importing wise. For MegaCache and I suppose also Point Cache you could combine the meshes, MegaCache has no upper vertex limit now. MegaCache will increase the project size more than MegaFiers as you have a copy the entire mesh for every frame, ie uvs, faces, color whereas with PointCache you just have vertex data per frame. I have both systems.
     
    SallyAnn likes this.