Search Unity

Possible pitchipoy rigify blender to unity problem?

Discussion in 'Asset Importing & Exporting' started by Tom_Veg, Mar 9, 2017.

  1. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    Hello. I don't know is this blender or Unity problem. I made this model of knight. Rigged and animated in blender with pitchipoy rigify. All animations work perfectly when rig is set to generic. See video of animations taken from unity:


    Before this i used Maya for rigging and all models worked perfectly with humanoid mecanim. But when i convert this rig made in blender from pitchipoy rigify to humanoid, this happens:

    hospitaller problem.jpg inspector.jpg nešto.jpg
    Anyone have any idea where is the problem?
     
  2. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    I had several problems with the PitchiPoy rig in "Humanoid" mode.

    - Up until very recently, I had to set the rotation of the root bone to 180° because Unity imported my Armature rotated
    - I export the rigs to FBX manually with "Only Selected Objects" and "Only Deformation Bones" or it will be too large and have all the Widget meshes in it
    - I need to manually assign most bones to their slots (it's often picking the DEF-* instead of the ORG-* bones)
    - The upper_arm.02 bones are not parented to the upper_arm.01 bones, so when the arms are moved, they turn into rubber bands. I fix this by reparenting these bones in Blender to seemingly no negative effect on the rig.

    After that it seemed to be working mostly, but I still had trouble with the muscle system and retargeting animation clips to it in Unity, so I reverted to using Unity's "Generic" rig.
     
    Tom_Veg likes this.
  3. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    Thank you for your reply... Oh boy, looks like very complex issue. I guess it is better if i return to Maya rigging. Such a shame, cause i really love working in blender more. It is more stable, more user friendly. And pitchipoy rig have really useful facial bones.
     
  4. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    Hey there, I decided to re-check since my last test was around Unity 5.3 (or maybe even earlier). Most of the issues I encountered back then appear to be gone :D

    The upper_arm.01/upper_arm.02 thing still happens, but it's fixed by simply parenting upper_arm.02 so the hierarchy looks like this:

    pitchipoy-reorg.jpg

    Then, one manual export later I assigned the bones like this:

    pitchipoy.png

    And it works flawlessly (didn't yet test retargeting, though).

    From the warning messages in your original thread, could it be that you are mixing generic animations with humanoid animations somehow? If I export animations separately, I need to set the animations to humanoid mode, too, and reference the original model's avatar like this:

    animation-library.png
     
    Tom_Veg likes this.
  5. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    Thank you for reply. I will check it out with new version of unity. Mine is 5.5.0f3. I see there is new version now 5.5.2. I will also examine other things you mentioned. Thank you.

    Kind regards
     
  6. Westyfu

    Westyfu

    Joined:
    Mar 30, 2015
    Posts:
    16
    Hmmm, anyone get any further with this? I have a fully working Pichipoy rig done, works fine in generic, but is near impossible to set to Humanoid.

    The pics above from Cygon4 do not seem to be from a standard Pichipoy rig, as it has no Hip bone straight off the bat (Well, at least, not an ORG hips!).

    The rigs Root bone is between the feet, Followed by Torso then spine.

    Arms indeed seem already parented.
    pichipoy.png

    Manual exports as a FBX give a green inspector (As Humanoid), but it's using the wrong bones and no combination lets it see the Neck as a child of the spine... (Pichipoy has 4 spine, 2 neck bones!).

    Due to the face rig, it'll also grab the wrong bone for the Jaw (Unity expects one centered bone at the tongue, Pichipoy "Jaw" bones are dual and follow the jaw line).

    Can work around that, rigging the lower teeth as well to a tongue bone but it gets kinda messy.

    Then... the FBX exporter raises everything 1"unit" off of the ground.

    Setting the exporter to "Selected only", Deform Bones Only, Z Forward and Y up puts any imported objects exactly 1 unit "up" on Z.

    Leaving it default, (-Z Forwards) gives the same, 1m off the floor from 'Origin'.

    This is with the most up to date Blender, and have tried both the current live Unity build, and the 2017 beta.

    Origins set, locations applied, scales applied, doesn't matter, you're 1m off the ground vs the Blender default imports, with a broken "red inspector" but feet flat to the floor.

    Frustrating!
     
  7. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    I did the easy way out, i got back to rigging in Maya :).
     
  8. Westyfu

    Westyfu

    Joined:
    Mar 30, 2015
    Posts:
    16
    Hah! I'm thinking of the second easy way...


    2 Character models, 2 rigs... 1 for Walking, 1 for talking!

    I was tempted to retarget... but Blender simply cannot open an fbx animation file correctly unless it was made with Blender in the first place!.
     
    Tom_Veg likes this.
  9. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    Give the root bone of the whole thing a check. Maybe it's sunken into the ground or got a weird orientation in Blender.

    You're right about the ORG-hips bone. My screenshot was probably from a modified rig.

    I usually take a standard Rigify metarig and paste the head from the PitchiPoy metarig onto it. But the only reason I do that is because I prefer the standard spine setup, pole target limbs and the standard finger controls.
     
    Westyfu likes this.
  10. Westyfu

    Westyfu

    Joined:
    Mar 30, 2015
    Posts:
    16
    Thats a pretty neat idea, I've been using the complete pichipoy, but may be easier to piecemeal it with the standard metarig + face.

    Just a lot harder to weight attachments on the standard hip/leg joints.

    Thanks for the replies!
     
  11. Shaba1

    Shaba1

    Joined:
    Jan 21, 2010
    Posts:
    63
    The same problem exist with the MHX2 rig by Thomas Larrssen. When going from makehuman to blender to fbx to unity.
    Things work great in blender but mapping the armature in unity makes everthing messed up. I have posted a thread on the makehuman forum but have yet to get a reply
     
  12. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    I totally forgot to do this. :eek: ... I did it now, tested with new version of Unity (2017.1.0f3). The problem is only different. Mesh now dont fall down the floor. But, there are some weird streachings going on, which still make it unusable with mecanim.