how can I convert a c4d file to fbx format



  • using sdk or cineware.
    or use python, but how cat I get python sdk .



  • S22 has an FBX export (judging from the documentation). You can use FORMAT_FBX_EXPORT in the SaveDocument function. If you want to do it in Python, the function is here:
    https://developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d.documents/index.html?highlight=savedocument#c4d.documents.SaveDocument

    (that's also the API documentation; you do not need any separate development tools for simple Python dev tasks but I'm sure there is some thread here to explain how to use a separate Python IDE and connect it to C4D)



  • Hi @liushu thanks for reaching out us and sorry for the late answer.

    As pointed out by @Cairyn exporting a c4d scene from Cinema 4D to FBX format is indeed straightforward (see abc exporter example) on the contrary, Cineware SDK (which in any case doesn't come in a Python flavor) was not designed with this in mind and it's actually not possible without re-creating completely the whole FBX exporter.

    Best, R



  • thanks for answer.
    there are 2 quesions.

    1 . if i use python sdk. where can I download it.
    In https://developers.maxon.net/?page_id=1118
    there is not free python sdk.
    I notice that: "c4dpy does work only with commercial licenses"

    2 . I can download c++ sdk. I am c++ programmer.
    I do it according to https://medium.com/@antoinefortin_64750/how-to-setup-cinema4d-and-melange-c-sdk-924110725c01

    env:
    vs2019
    22.004_RBCinewaresdk22.0_317036

    but i encounter compile problems.

    I add include lines as below

    #include "c4d_file.h"
    #include "default_alien_overloads.h"

    then, there ars many errors likes that:

    C2065 'objectToDelete': undeclared identifier use_r22 ...\includes\private_ge_mtools.h 633
    see reference to class template instantiation 'cineware::GeTempDynArray<TYPE>' being compiled use_r22 ...\includes\private_ge_mtools.h 687
    C3861 'objectToDelete': identifier not found use_r22 C:\Users\boluo\3D Objects\cineware\r22\includes\private_ge_mtools.h 633

    I have add include directives and libs config

    step1.jpg

    compile.jpg

    many_errs.jpg

    I think i missed something or , there is confiure error.
    I tried different version vs and different version c4d lib, and I tried c++ 14. But these errors still exist.



  • @liushu
    The Python SDK is automatically installed with C4D, so you don't need any further installation of a separate SDK. However, it is possible that your C4D version is not supporting Python at all. I remember that C4D Lite didn't support it, anyway (but that is information from years ago).

    As you are working with the cineware interface, I need to leave the answer to the Maxon specialists; I do not work with Adobe software and do not have cineware installed (and whatever flavor of C4D currently comes with that).



  • @liushu said in how can I convert a c4d file to fbx format:

    2 . I can download c++ sdk. I am c++ programmer.
    I do it according to https://medium.com/@antoinefortin_64750/how-to-setup-cinema4d-and-melange-c-sdk-924110725c01

    This is NOT the C++ SDK. The C++ SDK is included in your installation of Cinema 4D; you find the C++ documentation online.

    What you are looking at is some random online source talking about the Cineware SDK (formerly known as Melange), which is something else. See Cineware.



  • As said by @PluginStudent and @r_gigante
    Python SDK = Can only be used within Cinema 4D or c4dpy.
    C++ SDK = Only have the ability to register a plugin to be loaded in Cinema 4D.
    Cineware (previously Melange) = Use Cinema 4D file saved for Cineware without the need to have Cinema 4D installed.

    Python SDK and C++ SDK have the ability to export a C4D scene to an FBX.
    Cineware/Melange doesn't have the ability to export a C4D Scene to an FBX file.

    So if your goal is to export a C4D file to FBX you will need Cinema 4D to be installed and probably use C4D or a Cinema 4D dedicated Plugin that parse Command Line Argument to export a given file to an FBX.

    Cheers,
    Maxime.



  • @m_adam
    so what you mean is I can't convert a c4d file to fbx without a Cinema 4D sofware installed ?

    c++ SDK or python SDK just work with running Cinema 4D, sdk do not work alone.

    I haven't Cinema 4D, and I want convert some c4d files to fbx. There ary some other ways?



  • You could write a standalone C++ application that uses the Cineware SDK and the FBX SDK.

    However: The C4D file format knows mathematical, procedural objects, e.g. procedural cubes, spheres, or other shapes. And you cannot assume that there are perfect counterparts in the FBX format.

    So what do you want to do with such C4D specific object types?

    The only proper way of handling this is when a user exports a C4D scene optimized for Cineware, so that polygon and animation caches are build.



  • @PluginStudent said in how can I convert a c4d file to fbx format:

    You could write a standalone C++ application that uses the Cineware SDK and the FBX SDK.

    you said "You could write a standalone C++ application that uses the Cineware SDK and the FBX SDK."

    this is I want to do.
    but is there a free and legal way to get fbx sdk.
    only cineware sdk cannot complete the task.

    I have not c4d software.
    https://developers.maxon.net/docs/Cinema4DCPPSDK/html/index.html
    where_sdk.jpg



  • The Cinema 4D C++ SDK is not the same as the Cineware SDK.

    The Cinema 4D C++ SDK is included in every distribution of Cinema 4D.

    The Maxon Cineware SDK can be downloaded from the developers' blog, as you already did, according to your previous posts.


Log in to reply