Search Unity

WIP: Rig and skin in C4D 10 for Unity

Discussion in 'Formats & External Tools' started by bigkahuna, Dec 11, 2006.

  1. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I'm brand new to Cinema 4D, so I'm trying to figure out the easiest and best way of rigging/skinning a model in C4D 10 for use in Unity. Here's a workflow that seems to work. Please add or change, I'm sure there are many better ways than this!

    Step 1: Create a cylinder with default values. Change "height segments" to 12 and "rot segments" to 8.

    Step 2: Functions => Make Editable.
     

    Attached Files:

  2. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Step 3: Character => Joint Tool
    Then "CTRL" - left click with your mouse to create 4 joints.

    Step 4: "CTRL" - left click on Cylinder and 4 joints.
    Then Character => Bind
    Select "Auto Weight" in the attributes window
    This screen shot shows me testing the rig by rotating joint number 3.
     

    Attached Files:

  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Step 5: "CTRL" - click on Joints
    Character => Conversion => Convert to Bones

    Step 6: Rename new bones to "Bone.x".
     

    Attached Files:

  4. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Step 7: Delete all joints.

    Step 8: "CTRL" - left click on Cylinder and all Bones.
    Character => Bind
    Select "Auto Weight"
    This screen shot shows me testing the converted rig by rotating bone number 3.
     

    Attached Files:

  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Step 9: Export the file as an .FBX

    Step 10: Import the .FBX into Unity and you're done. The Cinema 4D version 10 file is attached.
    This screenshot shows me testing the rig in Unity, again I'm rotating good, ol' bone number 3!
     

    Attached Files:

  6. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Thanks bigK.

    This is must-know for all you out there with R10. The new joints and skin do not work with other 3D packages, including Unity.
     
  7. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I'm sorry to say that although this tutorial works, I'm still having problems with the C4D 10 FBX exporter. It randomly changes my skin weights and sometimes crashes. Although it works when I create simple models and rigs, when I create a more complex model it doesn't work. Looks like I'll have to go back to 9.6 and give that a try.. :cry:
     
  8. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Does it work with the "Old" example I posted in the other thread?

    I haven't had problems with it. I wonder: are you running on Intel or PPC? If Maxon's FBX exporter is somehow being Rosettified, it might explain something.

    It's just a wild guess, though.
     
  9. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Yes, your "old" woman model worked perfectly.

    Intel, argh... I've been working on this for 3 days and I still haven't been able to get a rigged/skinned model out of C4D and into Unity... :(
     
  10. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    If you have the chance, post one of the models you're having trouble with and let's see what happens on this end.
     
  11. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Huh, weird. I just tried it again, following my tut exactly as I posted here, and this time it worked. Maybe I missed something along the way. I'm going to continue on rigging my entire model to see how it goes... wish me luck!

    BTW, I tried rigging in 9.6, unless I'm missing something, boy, rigging in 9.6 just plain sucks! Too bad there isn't a Mac version of 3DS Max, I think Max is much easier to rig with (but the UI is kinda funky).
     
  12. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Ha. Yes, keep us posted.

    And we all wish Discreet/Autodesk was friendlier to the Mac. :roll:
     
  13. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Ok, I'm taking it one step at a time and already ran into a problem. I created the rig for the left size of my model's body, saved it as a .FBX and everything worked fine. Then I mirrored the bones to the right size of the body and fixed the weighting. It works fine in C4D, but the exported .FBX has weighting issues in Unity. Here's a shot from Unity and the C4D 10 file.

    Other engines I've worked with had issues with mirrored bones, is this the case with Unity also?

    BTW, excuse my ugly skinning job, I just wanted to test things before investing too much time on it.
     

    Attached Files:

  14. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Did you do the mirroring and fix the weighting after converting to bones? It could be a problem if you did. Remember that the new weight brush paints to R10's skin, not Claude Bonet. Skin doesn't get exported to FBX, so maybe you're still working with garbled Claude Bonet maps from the mirror.

    The conversion should be done only at the very end prior to export, and then probably undoed in case you need to make changes.

    Just a guess. That's a pretty weird looking deformation.

    Nice model, though!
     
  15. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    That might be it. I just gave it another try and mirrored the joints then converted to bones and it seemed to work. I'm still just experimenting. I want to have a better understanding of this before I do the final skinning.

    Yours too!
     
  16. tbelgrave

    tbelgrave

    Joined:
    Jul 29, 2006
    Posts:
    321
    To my knowledge you don't need step 8 and for step 7 delete the 'skin' object also. When you convert the joints to bones all you have to do is place the bones under the mesh or group that you want deformed. C4D is smart enough to copy the weighting from the joints into weight maps for the bones. You can even use the Claude Bonet tool to paint the bone weights if you wanted to.

    Unfortunately I had to do this step for a character I needed rig in Motion Builder for a client. It's also unfortunate joints aren't supported yet. But I'm sure the OTEE crew is all over that :p

    Also only convert to bones as a final step like Marble mentioned.

    Cheers!
     
  17. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Thanks Lildragon,

    I tried this and it didn't work. I don't know why...

    For some reason, this does not work either. If I move the bones in the hierarchy to below the mesh, the mesh moves in the 3D view (?). I tried this numerous times and I always get the same result. See screen shot below.

    The only way I've successfully gotten it to work was the workflow I've shown here. Could one of the more experienced C4D users give this tut a walk through and perhaps confirm what I may be doing wrong? I'm sure there are more efficient/better ways of doing this, but this is the only workflow that has worked so far.

    The only additional thing I do is to clean up the bone weights with the "weight tool" after converting joints => bones.

    Personally, I found painting weights with "Claude Bonet" to be extremely clumbsy and awkward to work with. It seemed very difficult to smooth bone weights, but I'm sure there are tools/techniques I haven't learned yet that make this easier/better to work with.
     

    Attached Files:

  18. tbelgrave

    tbelgrave

    Joined:
    Jul 29, 2006
    Posts:
    321
    Did you hit "fix bones"? That should snap the mesh back in place, and yes I agree that the Claude Bonet tool is very slow and cumbersome ;) you don't have to use it, just thought I'd mention it

    Good luck

    Cheers
     
  19. Evilduck

    Evilduck

    Joined:
    May 14, 2010
    Posts:
    32
    what you can do is export your model into blender (free, blender.org) and then export into unity