Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Changes to Cinema4D Support in Unity

Discussion in 'Import Formats & External Tools' started by marc_tanenbaum, Mar 23, 2020.

  1. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    460
    Hi everyone!

    I want to share some good news for anyone who uses Cinema 4D and Unity. We have been working with Maxon to improve integration and want to explain how the change will affect your workflow.

    Our integration with Cinema 4D has always been a little shaky. In essence, what we’ve done with .c4d files is open a background instance of Cinema 4D, use it to convert your files to .fbx, then import the result. Unfortunately, this flow – while it works in the ideal case – breaks down in a whole slew of real-world cases and was never that stable or predictable. With Maxon's help, we’ve fixed this.

    Starting from 2019.3.0b7, Unity no longer supports *.c4d files directly. Instead, Maxon provides a free plugin called Cineware – available here in the Asset Store – that will handle import. You will need to import this plugin into your project for 2019.3 forward.

    This approach has several advantages. First, quite simply, Maxon knows their format better than we do, and can focus on any necessary support. Second, no instance of Cinema 4D will open in the background: the import will run within Unity, which should make imports faster and more predictable. Finally, since the plugin will be in the Assets folder, teams won’t run into problems if different team members are using different versions of Cinema 4D.
     
    salex1 and Eyefisher like this.
  2. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    698
    Why not export in FBX format? I find it easier I suppose. I use Cinema 4D a lot for my projects but I export it in FBX format.
     
  3. PixelArtworks

    PixelArtworks

    Joined:
    Apr 12, 2019
    Posts:
    1
    Having trouble with this new plugin with Unity 2019.3.7f1.

    I am saving the file in R21 for Cineware.

    Imported .c4d files with a pose morph tag have an invisible skinned mesh renderer. The blend shapes seem to import correctly, but the mesh is invisible. It is a simple cube mesh with 1 pose morph state that changes the scale.

    Steps I have tested to try resolve:

    On the skinned mesh renderer...
    - Have set Update When Offscreen ON
    - Have replaced materials
    - Have tried re-linking mesh
    - Have reset skinned mesh renderer bounds to same size and larger than mesh should be in case of occlusion

    In Player Settings...
    - Have toggled Compute Skinning* to no avail
    - Have toggled Graphics Jobs (Experimental) to no avail

    Is there ANYTHING else I can try? Should I be using a different version of Unity?
     
  4. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    460
    Hi @ProjectionArt

    Part of the idea of this plugin is that Maxon is taking ownership of their format. As I mentioned above "Maxon knows their format better than we do, and can focus on any necessary support". So I'd recommend asking on one of their forums (you can find their list here). Best of luck!
     
  5. jennygirlinla

    jennygirlinla

    Joined:
    Dec 22, 2019
    Posts:
    3
    What if I am tied to using 2018 LTS? The importer is totally broken with the most recent version of cinema, it hangs and hangs. I am having to store my c4d files outside of my assets directory.

    Preferably, I could just disable this import feature and use FBX export, but I haven't been able to find anywhere I can disable the c4d import function.

    Or perhaps is there a way to make a dummy "Unity-C4DToFBXConverter.pyp" (which resides in the C4D plugin directory) that merely loads an empty scene instead of trying to parse files?
     
  6. Moe_Baker

    Moe_Baker

    Joined:
    Oct 22, 2017
    Posts:
    29
    Can you please disable the warning that shows when I have a .c4d file in my project?
    I'm not using Cineware, it's not exporting my models correctly, I'm just exporting an FBX directly from Cinema 4D and keeping both the files in the same directory in my unity project.
    The warnings just bloat my log and obscure any real warnings.
     
  7. bastien_humeau

    bastien_humeau

    Unity Technologies

    Joined:
    Jun 14, 2017
    Posts:
    44
    Hi!
    Can you be more precise about this warning? There are several different warnings that can fire up during asset import inside Unity. We know that some are more important than others and it's sometimes hard to figure out which ones are just annoying on certain projects versus really important for everyone.
     
  8. Moe_Baker

    Moe_Baker

    Joined:
    Oct 22, 2017
    Posts:
    29
    Sure, I'm talking about warnings like these:

    Here's an image showing the warnings: https://imgur.com/a/nAPz2yY
    Thank you for the support.
     
  9. GeorgeIngDCC

    GeorgeIngDCC

    Unity Technologies

    Joined:
    Jan 14, 2020
    Posts:
    22
    Hey Moe,

    Thanks for the feedback. I'm just wondering, is there a specific reason you're including the C4D assets as part of your Unity project?
     
  10. Moe_Baker

    Moe_Baker

    Joined:
    Oct 22, 2017
    Posts:
    29
    I find it easier to work with that way, I can open the file right from within Unity and export an FBX right to the same directory.
     
  11. bastien_humeau

    bastien_humeau

    Unity Technologies

    Joined:
    Jun 14, 2017
    Posts:
    44
    @Moe_Baker You could create a ScriptedImporter targeting .c4d files that would just do nothing.
    Because we allow ScriptedImporter to override the ModelImporter for this specific file format, it will be used by default and skip the whole import process that occurs on your c4d files. It will even save you time as you don't wait for model imports that you don't use.
    Here the script you could drop into any Editor folder in your project:
    Code (CSharp):
    1. using UnityEditor.AssetImporters;
    2. using UnityEngine;
    3.  
    4. [ScriptedImporter(1, "c4d")]
    5. public class c4dIgnoreImporter : ScriptedImporter
    6. {
    7.     public override void OnImportAsset(AssetImportContext ctx)
    8.     {
    9.     }
    10. }
    11.  
     
    Moe_Baker likes this.
  12. Moe_Baker

    Moe_Baker

    Joined:
    Oct 22, 2017
    Posts:
    29
    Thank you! This is a great solution.
     
  13. yannminh

    yannminh

    Joined:
    Jul 1, 2007
    Posts:
    42
    Hello,

    by opening my 2019.2.21 project which represents several years of development, in the new version of Unity 2O2O, I had the very unpleasant surprise to notice that all my C4D files are "missing prefabs", or "Missing Mesh".

    and even if I use Cineware from Maxon ... I lost the link with all my meshes ... I just loose 10 years of build...

    as after a lot of research on the net, it seems that no one seems to be complaining about this problem,

    I just tried a prefab export from the 2019 version, and a re-import of the prefab from the 2020 version of unity with Cineware de Maxon, and it's the same ... missing prefab and meshes everywhere ... I am oblige to rebuild all my work...

    Maybe I am just missing something simple to update my Cinema4d files from unity 2019 to Unity 2020?

    if anyone had an idea it would be great ...

    thank you for your help...

    Yann
     
  14. Moe_Baker

    Moe_Baker

    Joined:
    Oct 22, 2017
    Posts:
    29
    Had come across the same issue, didn't really bother to look for an answer, knew Unity would screw me like this one day and it won't be pretty so I just fixed it manually, but that is for just a small project.
    Yet I think I figured out a way tho... the way the old C4D importer worked was by exporting a "temporary" fbx from your c4d files, so you can trick Unity by creating your fbx files explicitly and using them instead of the old "temporary" fbx files, you'd:

    - Rollback your project to its last usable state before upgrading to 2020.
    - DON'T open the project in Unity yet.
    - Open the project folder using the file explorer.
    - Delete the Library, Temp, Obj folders, basically any temporary folder that Unity creates.
    - Select a c4d file and open it in Cinema 4D.
    - Export the .c4d file as an fbx to the same directory as the c4d file.
    - From the file explorer, look for the meta file for the c4d file, should be something like **********.c4d.meta (they are hidden by default so you might need to enable the option to show hidden files on your file explorer).
    - Rename that meta file to **********.fbx.meta

    Now if you open the project, that specific fbx model should be linked correctly wherever the old .c4d was used, tho you may need to correct the scale of the new fbx file, sometimes the default 1 works, sometimes it's 100, I don't know, C4D and Unity are weird like that.
    Now, you'd want to fix all the .c4d files before opening the project in Unity but you can try this out with a couple of .c4d files, make sure it actually works, and then rollback your project again, delete temporary folders and proceed with all the .c4d files.
    The process would be too tedious of course, but you can automate it, you can write a script (outside of Unity of course) that will rename all **********.c4d.meta to **********.fbx.meta, there is probably some freeware out there that can do this too.
    From there you'd only need to batch export all your .c4d files into .fbx, You can probably write a script that will batch export all your .c4d files to .fbx using Cinema 4D's Python scripting or something, or you can hire a freelancer to write it for you, or buy a tool like this Batch Processor Tool for Cinema 4D.
    Good luck with your project.
     
    yannminh likes this.
  15. yannminh

    yannminh

    Joined:
    Jul 1, 2007
    Posts:
    42
    Thanks Very much Moe_Baker... it is great... I try that ... :):):)
     
    Moe_Baker likes this.
  16. Ill-Fish

    Ill-Fish

    Joined:
    Aug 23, 2015
    Posts:
    13
    I haven't used Unity for a while. Now I made a 3D Model in C4D exported it as fbx file. Uploaded it to Mixamo for animation and imported the animated fbx to Unity. But I get the message, that C4D file are not longer supported. That it weird
     
  17. GeorgeIngDCC

    GeorgeIngDCC

    Unity Technologies

    Joined:
    Jan 14, 2020
    Posts:
    22
    That is odd.

    That sounds like a bug. If you could file a report with a sample asset then we'll look at getting that sorted out for you.
     
unityunity