Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Riggin a robot in max for Unity

Discussion in 'Animation' started by FOS4Kurt, Oct 15, 2018.

  1. FOS4Kurt

    FOS4Kurt

    Joined:
    May 6, 2014
    Posts:
    21
    Hey folks,

    I have built this basic robot i want to use in Unity but i fail to rig it properly.
    I have been trying for days and i seem to make thing worse along the way :eek:

    The bot can be seen (unanimated) here:


    I created decent bones for it but when i import fbx or dae Unity doesn't like it at all.
    Needless to say i am stuck.
    Knipsel.JPG

    All i want is to have my rig control the bot without deforming the parts or his hull.
    Drop animations on him and play with that.

    All help is welcomed.
    Cheers all.
     
  2. Wendo90

    Wendo90

    Joined:
    Mar 12, 2018
    Posts:
    14
  3. FOS4Kurt

    FOS4Kurt

    Joined:
    May 6, 2014
    Posts:
    21
    Hi Wendo,
    Tried mixamo but it uses skinning which deforms the mesh.
    As it is a robot i need the hull not to deform.
    Also, when i download the rigged mixamo model i only get the bones.
    Is that normal ?
     
  4. Wendo90

    Wendo90

    Joined:
    Mar 12, 2018
    Posts:
    14
    I don't have much experience with mixamo. Sure for the rig you have to do skinning and set the weights properly to have the extent of deforms on the skin you like when the robots joints are bend.

    You could also export all the single body parts, import them in Unity and make them child of the bones and position it in relation to the bone. But this could be a lot of work and maybe the result doesn't tlook good. The cleaner way would be a good skinning.
     
  5. FOS4Kurt

    FOS4Kurt

    Joined:
    May 6, 2014
    Posts:
    21
    Yeah, i think i'll try skinning it and create 100% weights zo the limbs don't bend.
    Thanks wendo.

    I wonder though, if i manually bone and skin it if it will still accept mocap from said mixamo ?
     
    Last edited: Oct 17, 2018
  6. Wendo90

    Wendo90

    Joined:
    Mar 12, 2018
    Posts:
    14
    The mocap data tells the bone where to move, the bone tells the skin where to move ;)

    If you use a standard biped it should work..
     
  7. FOS4Kurt

    FOS4Kurt

    Joined:
    May 6, 2014
    Posts:
    21
    Knipsel.JPG Not using biped, i want to be able to create my own rigs like this one.
    Hardskinned him after using mixamo, painfull process but works.
    Wonder if i can drop other animations on him now which is the whole point of this exercise :)
    As always 3D demands you put in the extra hours to get things working.
     
  8. Goatogrammetry

    Goatogrammetry

    Joined:
    Apr 27, 2017
    Posts:
    197
    Are you using the skin modifier? Your mesh looks like its in many individual pieces rather than a single unit.
     
  9. FOS4Kurt

    FOS4Kurt

    Joined:
    May 6, 2014
    Posts:
    21
    Yes, skinned and many pieces
     
  10. FOS4Kurt

    FOS4Kurt

    Joined:
    May 6, 2014
    Posts:
    21
    Would be great to know how to create a rig that will be recognized by unity so i can drop mocaps on it.
     
  11. Goatogrammetry

    Goatogrammetry

    Joined:
    Apr 27, 2017
    Posts:
    197
    I hate to be a downer, but thats a terrible mesh for a game engine. Too many polygons. And I don't know that you'll ever be able to just drop some motion-capture data on it and have it look good. He's all squat and oddly proportioned. It'd take an expert to make that thing work. And frankly saying that "unity doesn't like" your rig doesnt help people figure out what the problems are. Gotta be more specific both in what you're doing in max, and what problems you're seeing in Unity when you try to do...what again?
     
  12. FOS4Kurt

    FOS4Kurt

    Joined:
    May 6, 2014
    Posts:
    21
    Hi Automoda,
    It is one thing to model an easy humanoid, rig it and animate it like everyone else...
    Showing off might be fun but kicking yourself and learning a thing or two might be more valuable in the long run.

    As a beginner with unity and unreal i chose a model that will demand me to tackle a few 'uncommon' problems.
    This character does this quite nicely as i encounter 'all' the problems.

    In the meanwhile he is dancing the samba in unity quite brilliantly whilst looking good, he'll also accept all mocap ill throw at him. Not being an expert i'd say i learnt a few things so far.
    44106483_10218028380683136_4418265941528281088_n.jpg

    You're right about the poly count, this model was made as a visual concept. With over 80k poly's, no rig and no joint engineering he's a bit off target. Like i said, you need obstacles to learn.
    The reason i posted here was to find someone who could share his workflow from max to unity so i could steer myself in the right direction.

    I'm working on a game-ready lowpoly version now.
    Don't be down, this is working out better than i thought ;)
     
  13. FOS4Kurt

    FOS4Kurt

    Joined:
    May 6, 2014
    Posts:
    21
    So, i redid the whole thing.
    Low poly, game ready, 8k polys and less objects.
    Rerigged and skinnend using biped.
    He now accepts all the mocap i throw at him (funny!) but Unity doesn't like the rig... it seems to port nicely but his legs remain stiff while he is waving his arms like crazy.
    Progress none the less.
    GameBot001-COLLAGE.jpg
     
  14. Goatogrammetry

    Goatogrammetry

    Joined:
    Apr 27, 2017
    Posts:
    197
    Big improvement in the mesh. Nice work.

    Here's the key things about exporting:

    You need to export the SKELETON ONLY-- Not the helpers and IK goals and IK controllers and whatever. Make a selection set of the skeleton and do an 'export selected' when you send an animation to Unity. Be sure to go into the FBX exporter and set it to bake the bones. No other adjustments are needed.

    Be sure that your skeleton is indeed a continuous heirarchy.

    In unity, be sure the animations' import settings under the RIG tab have the mesh's avatar selected.

    I'm not sure if you need to export the bones with the skinned mesh. I do. Be sure the different pieces are exported in the same FBX file. Its a pain to make pants follow legs if they're from different fbx files-- That requires a script that copies bone angles one-by-one and its one of Unity's quirks that I dislike.

    If you do all of this, you SHOULD have a functional animated character. But please do delete old files and set it up fresh. When I was first learning how to do all of this, I had a 'poisoned' file that wouldnt work no matter what until I deleted it entirely and started over.
     
  15. FOS4Kurt

    FOS4Kurt

    Joined:
    May 6, 2014
    Posts:
    21
    Hi Automoda, thanks for the indepth explanation.
    I will give this a go this week and see what happens.
    I'm sure i overlook some little obvious things causing trouble.
    I will let you know, thanks again.
     
    robocognito likes this.