Import several objects from Cinema4D

Hi,

I’m nooby on Unreal 4, and i want to import several objects to Unreal from Cinema4D.
I have a big scene, with more 500 objects and i can’t import him one per one.

After, i want to apply differents textures on my differents objects and create collisions.

Thank’s, Neps

I have a very similar situation. I apply the materials within cinema 4d. Than export the project into FBX to later import the FBX within UE4. The advantage of this workflow is that you can than just edit the materials within UE4. However the engine gives a warning that having more than a specific amount of materials to a single “object” could result into unwanted results. However I did not had any issues with this workflow yet…

I’ve been working with that pipeline for a while now, and I know exactly what you need. We’ll go over it one by one, though I’ll keep it snappy.

You can import any number of objects from a single FBX file - that’s what you’ll use to bridge the jump from C4D to UE. It does depend on which version of C4D you have, though. You’ll need to at least use FBX 7.3, which AFAIK wasn’t added to C4D before R14.
If you have that covered we can continue, otherwise I’m not sure if anything of the following actually works, given how Epic advises to use that FBX version. I’ll just assume you can export to that version.

A few things of note, then:

  • If you don’t change the settings on FBX export and import in the engine, any object will be named filename_objectname, so if you got a chair in Cinema named “Leather_Chair_1” and export the FBX file as “Furniture”, it’ll be imported into UE as “Furniture_Leather_Chair_1”.

  • You’ll have to layout the UVs properly. No overlaps, and ideally you’d keep them as free of distortion as possible. You don’t actually have to create 2 sets of UV coords, if your first one has no overlap, it can be used for the lightmaps within UE just fine.

  • You can assign many UV coords if you want, in UE you can use this to specifically address a certain UV when creating materials, say a bit like this:

UV_1>Texture_1>
UV_2>Texture_2> |-> Diffuse channel
UV_3>Texture_3> /

in this way, you can have a single material to apply to an object which has a variety of different textures. Name each UV differently, otherwise you might get errors or mismatching. This has the advantage of reducing the required material count of an object with many different
surfaces - wood, chrome, glas, organic surfaces, whatever - to just one, but also means you can’t really reuse that material for any other object in the scene.

  • Alternatively, you can assign materials within C4D and the exported FBX file will have them saved, upon import into the engine that object will have as many material selections as you created, allowing for easy drag&drop of materials as you like.
    This requires you to select the polys in Cinema and then apply your material. You have to make sure every material has a poly selection tag - simply dragging it from the material browser into the object browser onto a model won’t work, it has to go with a selection.
    On top of that, you must change the materials at least a little - the exact same material on 3 different selections would come out as one selection in-engine, because it differentiates based on both selection and material. It’s absolutely sufficient to
    just use flat colours in C4D, create a bunch of white, green, red, etc. materials to assign as you see fit. To get this exported from C4D properly, you’ll have to select from the export settings window that materials are exported too, though I wouldn’t
    recommend activating textures.

  • On the subject of UVs again, if you have clean UV coords but still get overlapping / wrapping UVs when building lighting in-engine, this happens due to N-Gons in Cinema. The engine has no problem rendering them, but the lightmaps spazz out. Simply select all
    Polys and run a N-Gon cleanup prior to exporting.

  • UE will automatically null axis rotation, so you won’t have to do that in C4D. However, the object axis will always reset to world zero, so if your object isn’t at world zero when you export it, you’ll have issues in-engine - the object axis will be off. If you absolutely
    have to keep a certain arrangement of objects, leave them all where they are, but null their axes. They’ll all stay in absolute position to each other, and from there you can move them as a group in-engine without worrying about misalignment.

  • Collision can be created automatically upon import, just tick the necessary box. Otherwise you can assign collision when editing the object properties from the manager in-engine. For most stuff, a simple box / sphere collision will suffice, you can however also
    let the engine create ones which follow the object shape more closely. If you want really accurate collisions, you’ll be better off preparing a suitable collision object beforehand and assigning that to the object in-engine.

  • Don’t forget to assign phong tags before exporting. On import, you’ll always get the error that no smoothing groups were found, but disregard that - phong angles still get imported properly. If you set any phong edge breaks in Cinema, those will come across
    too.

I hope this covered everything you need to get your stuff exported properly - I certainly didn’t know it starting out either :smiley: . Another year, another pipeline.