[cinema 4d] multiple roots problem

Hi @all

just have a - more or less – little problem with an animation export from c4d into ue4. I would like to import a „pistol reload“ animation for a first person shooter into ue4. I rigged, animated and exported the animation in cinema 4 d as a fbx. As soon as I want to import the animation into ue4 I receive the following error message: Multiple roots are found in the bone hierarchy… In my animation the arms are not constructed in multiple roots, it is one single constructed chain. Only the pistol in the right hand and the clip in the left hand are assigned to the single hierarchies from the correspondending bones (I hope you know what I mean :)).

When I remove pistol and clip from the animation, there is no problem with importing the animation file into ue4. I have already tried several possibilities but nothing has worked so far.

Has anyone a tip for me?

Thanks in advance!

I know nothing of C4D but you get the same error in maya when your root bone is under a group. A screenshot of your bone hierarchy would probably help.

Thank you very much for responding. The bone hierarchy looks like this…

In fact i can spot 3 roots in your hierarchy.

First is the Master Controller, second the mesh and third the root bone.
All of them are at the root level of the hierarchy.

You should add a Null Object and place all of them inside it.
Also the character controllers are good for animating purpose, but should be deleted (after baking the animation to keyframes) and before exporting to fbx.

Never do your animating with the original file, create a copy, name it according to the animation (e.g. filename_pistol_reload_ani) and work with that.
Also save your file right before keyframe baking and keep it in that state for future editing.

The keyframe baked file i’d only save as fbx, because if you need to edit the file, you’d have to use the one animatable with controllers anyway and bake the result again.

Hi kraid,

thanks for your reply.

I thought that the multiple-bones thing only refers to the skeleton – as everything works well whitout error message when I remove pistol and clip (with master controller and mesh etc.)

So, I just tried it as you described it – unfortunatelly without success.

I also thought about an other option: it should be possible to import the skeleton without the mesh, than importing arm, pistol and clip mesh seperately in ue4 and assign the parts in the engine.
However, in this case it is not possible to import only the skeleton (import buttons are disabled and I can’t choose the popup in the skeleton) – and yes, it is a fbx-file :slight_smile:

sorry for this stupid questions – but could it be that I have overseen some fundamental basics by importing?

Here’s one of my file setups:

The Master Controller and it’s child objects do not export because they are parametric objects that are C4D specific.
So fbx doesn’t know them and would export them either converted to splines, simply as null objects or not at all.
UE4 on the other hand only exports stuff it knows from the fbx as well.

You said that removing the Pistol and Magazin from the hierarchy makes the issue disapear.
Not sure what you’ve got hidden inside these Nulls, but if it’s a mesh and a whole additional Bone hierarchy, it would explain the issue.

If you need several meshes just put them in the root Null and weight them to the same skeleton as the other meshes.

When you’re still unsure how to set up the export hierarchy, find a similar model in UE4, export it to fbx and open inside C4D.

Hey, I can´t find a similar model in ue4 – I am not very familiar with the engine (this is somebody elses job ;)) but I think your tip is the solution :smiley:
If I put the pistol and clip mesh (without a null-objekt) direktly -in this case- onto the hand bones hierachy it works. In fact my animation is destroyed but technically it works.

Thank you very much :wink:

Just have one last question: let’s say I will hide an objekt after a while and it should appear again after some time. Of course easy to animate but doesn’t work in fbx export – so is it better to do this in the engine or is there another simple trick to export it from c4d?

You would have to do that in unreal, it isn’t very hard either, you can use Notifies in the animation editor that can be used in blueprints to do what ever you want at that point in your animation.

Hiding/unhiding an Object (needs to be a seperate mesh though) isn’t exactly hard to do by code, so i’d prefer to do it that way.
There may be other solutions as well, but they’re not as clean and good as hiding by code.

As for where to put the meshes, i’d prefer to have them directly under the root Null instead of nested in the bone hierarchy.
But if you keep them there, make sure to check “Import Meshes in Bone Hierarchy”.

One thing that annoys me too, is that there’s an issue for skeletal meshes caused by differences in righthanded and Lefthanded coordinate system between C4D and UE4.
All of my imported playermodels were ending up either on their back or front when applying an animation.

I kinda fixed that (well i hope so) by using a Null that is facing z down, x right, y back.
Then a root bone which is facing z up, x right and y front.

I’m having the same problem with C4D here:

Any thoughts?

-TT

&stc=1&d=1429575372

You got a lot of Null objects there and i bet under some of these you have joint chains, too.
If i remember correctly UE requires all joints to be part of the same chain without Nulls beeing part of that chain.

One more reason to keep control rig and skeleton seperated in hierarchy.

Ok, I will try to hide things by code…

This is surley a clean and clear way, but in this example the pistol
should follow the moves of the hand and i don´t know other ways do to this
instead of subordinate it to the hand bone.

Have a look to this other animations hirachay – ok, it´s a very simple
one – but I exported the fbx exactly in like this (with master
controller, no „main null“ etc) and it works fine.

There´s no error massage (except smoothing group) and no twisted axis.

In c4d r16 you can check bake key´s in the export window but as you
said: there are many other ways – thats just what i figured out :wink:

58de5df10f68cbf9de8dc2c0b4c4f29cfd741e98.jpeg

In that case just create a child bone in that place on the hand and rig the pistol to it.

The Root Null is for preventing the axis issue.

Ah, yes, this is correct. The control rig is part of the hierarchy.
Ah ok, so Unreal doesn’t support this… whereas Unity does. Same for multiple materials and meshes.

I’m learning that Unreal’s renderer is very forgiving compared to Unity, but its FBX importer is not.

Ok ok, enough whining, I’ll try and find out how to get this character’s hierarchy restructured.
Thanks for the answer!

-TT

You can have multiple materials and meshes. Ofc. these materials have to exist in C4D too and have their own name.

On different meshes it’s not a problem at all, just assign one Material to one mesh and the other one to the other mesh.

On the same mesh, you’ll have to work with polygon selections.

Create a polygon selection by selecting all polygons (polygon mode) that should have a certain material assigned,
then use Selection>freeze selection to create a polygon selection tag.

Preferably name it accordingly to the material (e.g. sel_wood if the material is named wood)
In the material tag, drag the selection onto the Selection field, or type in the name of the selection manually.

Repeat that for the other materials.

On fbx export you need to check “export textures and materials”.