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

Using Blend Shapes in 4.3

Discussion in 'Animation' started by anubisdeath666, Nov 12, 2013.

  1. anubisdeath666

    anubisdeath666

    Joined:
    Nov 12, 2013
    Posts:
    5
    I was very excited to see that blend shapes are now supported in 4.3, however, I can't seem to get it to work. I created a simple cube with two blend shape deformers on it in Maya and imported it as a .mb asset. After playing around for a few hours, I still haven't found out how to use my control curves to drive the blend shape deformers...am I missing something? What is the correct process for setting it up in/for Unity.

    Thanks!
     
    duotemplar likes this.
  2. Deleted User

    Deleted User

    Guest

    I did a quick test, and imported a model we had created in MAX using morphs. I found a field to edit the value of the morph on the Skinned Mesh Renderer component on the objects that had them. Seems to be working correctly for me.

    Under Skinned Mesh Renderer one of the first fields was "BlendShapes" which when expanded would show any imported from the model.

    Edit: The model was exported from MAX in an FBX format. Not sure if that would make any difference on the Unity end for importing.
     
  3. anubisdeath666

    anubisdeath666

    Joined:
    Nov 12, 2013
    Posts:
    5
    Thanks, I was able to replicate your results using the skinned mesh renderer setting, however that looks like it's only to test the blend shapes. I can't get it to work when creating animations within the animation editor.

    I'm beginning to wonder whether it would be a better workflow to do all facial animation along with character animation in maya and just import the animations into unity for in game cinematics now that it supports blend shapes.
     
  4. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Yup ditto here. I know I seem to complain about this every single time, but we need some form of documentation on these new features.

    Anyway I've done my own searches and tests and I can't seem to extract the Morpher animation from 3DSMax to Unity.

    Same setup as you fellas, with a cube and three morph targets, and a 100 frame animation test.

    I've tried every FBX option I could think of (i.e. Bake, Curve Filters) and nothing is exported.

    In Unity however yes I see my Blendshapes in the SkinMeshRenderer...sweet...and I can scrub the values and get the morphing to indeed work.
    • Quick Note: you only need to export the primary object, not the morph targets themselves. Makes for a nice clean import.

    In the interim, you can create a new animation clip in the Animation editor, and set keys to create your own motion, but beyond that I don't know. I'll keep trying.

    -Steven
     
  5. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    (My fear is that they only considered supporting Maya 'Blendshape' animation curves)
     
  6. anubisdeath666

    anubisdeath666

    Joined:
    Nov 12, 2013
    Posts:
    5
    I'm using Maya and am still having the se problem as you using Max.
     
  7. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Oh fair enough, you did say Maya...hmmmm.

    Some help Unity Dev's?

    -Steve
     
  8. cerebrate

    cerebrate

    Joined:
    Jan 8, 2010
    Posts:
    261
    Other than steveb's suggestion to duplicate/create a new animation and set the values that way, you can use driver bones. Basically, create a bone for each shape key, named the same, parented to a root bone. Move the driver bones along an axis, and then attach script that will set the blend shape values depending on the driver bone positions relative to the root bone.

    As a bonus, you can also set up a very similar driver in your editor of choice (you can in blender, I'm pretty sure you can in max and maya), to allow you to animate with just a rig, instead of having to mess with wherever your blend shape animation controls are hidden.

    Have a script
    (Note: there are other ways to find the drivers/computing offset, including just assuming that the driver bones are starting at their zero position, and store those positions on awake to compute offsets later)


    Code (csharp):
    1.  
    2. using UnityEngine;
    3.  
    4. public class BlendShapeDriver : MonoBehaviour
    5. {
    6.     private const string DefaultRootBoneName = "BlendShapes";
    7.     [SerializeField]
    8.     SkinnedMeshRenderer _renderer;
    9.     //parent bone to all the child bones.
    10.     [SerializeField]
    11.     Transform _rootControlBone;
    12.     //scaling to apply to the bone's offset
    13.     [SerializeField]
    14.     Vector3 _scale = new Vector3(0, 100, 0);
    15.  
    16.     Transform[] _controlBones;
    17.  
    18.     void Awake()
    19.     {
    20.         //first, make sure everything is set up to prevent errors
    21.         if (!_renderer)
    22.         {
    23.             _renderer = GetComponentInChildren<SkinnedMeshRenderer>();
    24.             if (!_renderer)
    25.             {
    26.                 Debug.LogError("A SkinnedMeshRenderer is required to operate", this);
    27.                 enabled = false;
    28.                 return;
    29.             }
    30.         }
    31.         if (!_rootControlBone)
    32.         {
    33.             //look for a bone. Not ideal.
    34.             _rootControlBone = RecurseSearch(transform, DefaultRootBoneName);
    35.             //still couldn't find one? just use the root, as the object might be optimized with the driver bones exposed
    36.             if (!_rootControlBone) _rootControlBone = transform;
    37.         }
    38.  
    39.    
    40.         _controlBones = new Transform[_renderer.sharedMesh.blendShapeCount];
    41.         foreach(Transform child in _rootControlBone)
    42.         {
    43.             var ind = _renderer.sharedMesh.GetBlendShapeIndex(child.name);
    44.             //I'm guessing here. GetBlendShapeIndex has no documentation. Based on FindIndex's operation
    45.             if (ind == -1) continue;
    46.  
    47.             //found a matching blend shape to this bone. Use it.
    48.             _controlBones[ind] = child;
    49.         }
    50.     }
    51.  
    52.     Transform RecurseSearch(Transform parent, string searchName)
    53.     {
    54.         if (parent.name == searchName) return parent;
    55.         if (parent.childCount == 0) return null;
    56.  
    57.         Transform didFind;
    58.         foreach (Transform trans in parent)
    59.         {
    60.             didFind = RecurseSearch(trans, searchName);
    61.             if (didFind) return didFind;
    62.         }
    63.         return null;
    64.     }
    65.  
    66.     void Update()
    67.     {
    68.         for(int i = 0; i < _controlBones.Length; i++)
    69.         {
    70.             if (!_controlBones[i])continue;
    71.  
    72.             //dot will multiply by scale, and then sum the axis.
    73.             _renderer.SetBlendShapeWeight(i, Vector3.Dot(_controlBones[i].localPosition, _scale));
    74.         }
    75.     }
    76. }
    77.  
    in action:
     
    Last edited: Nov 14, 2013
    Mr-Wandermayer likes this.
  9. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    First off very creative idea cerebrate, wonderful! This is useful regardless as you can have bone orientation driven morphing to simulate musculature and such. Awesome!!

    Now if I may...

    ...I figured this out!

    I double checked the process and it most definitely works. The operative element was Mecanim, as I was curious why this was mentioned in the Features yet not mentioned anywhere else (hence why documentation would be ideal, but maybe that's just me...)

    How to Achieve Blendshape Animation in Unity from Animation Suite of Choice(Directions are for 3DSMax):

    1. Create your object or character, create morph targets and animate away. I'm going to assume here you know how to do this, if not, tons of tutorials around. Optional - Add a Skin modifier AFTER the Morpher and rig/skin as you would for a character. The order in the modifier stack is crucial(from bottom to top)...EditMesh/Poly->Morpher->Skin
    2. FBX Export as you as you always have been, just make certain that under Deformations, you have 'Morphs' checked. No need to check anything else at all (i.e. no need for Bake)
    3. Import of course, and in the Project Panel, take a look at your newly imported asset in the Inspector. Other than the obvious checkbox 'Import BlendShapes' the only other thing I checked is 'Loop Time' in the Animations tab, but you should already know this if you have experience importing animated characters. Also note you have an animation, probably named Take 001...this is where you morph animation is believe it or not!
    4. Here is the important part...The Animator Controller! This step is different depending on if you exported a BlendShape object with or without Skin, and therefore bone animation. If you imported a skinned character, there should automatically be an Animator Controller with the same name as your asset. If you animated a BlendShape asset without any skin, you will need to Create/Animator Controller, and name it something logical.
    5. You have your Animator Controller; drag your newly imported asset into your scene, and with it selected, make certain you have you Animator Controller in the Controller slot of the Animator Component. BlendShape-only assets will state 'None (Runtime Animator Controller' ) in this slot if you don't add a controller, and effectively nothing will happen.
    6. Open the Animator tab, and add a State and add the animation from the imported asset...Take 001 if you haven't already renamed it.
    7. Now with your asset selected in the Hierarchy panel, if you go back to the Animation tab (not Animator tab! :D )...tada!!...you should see the name of the animation (Take 001 (Read-Only)) and the list of controllers including your morphs!!! Scrub it on the timeline or hit Play and see it in action!!

    I think I wrote that correctly, but if not feel free to yell at me!

    Huge relief guys and now I can actually sleep sound knowing this actually does work.

    Cheers!!

    -Steven
     
    Last edited: Nov 14, 2013
  10. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
  11. khan-amil

    khan-amil

    Joined:
    Mar 29, 2012
    Posts:
    206
    Thanks a lot, we were struggling with this also.

    +1 on the need of documentation/tutorials/whatever to help us use new features when they come out.
     
  12. chkalyan

    chkalyan

    Joined:
    Sep 7, 2013
    Posts:
    9
    Can Anyone let me know the procedure for MAYA. Please stuck for 2days.I am not able to get the blend shapes animation to unity. in unity I am getting the blend shapes but not the Animation clip (take001).Help.
     
  13. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Thanks Graham, that'll be helpful too.

    The issue in this thread is that there is absolutely no documentation for this feature other than how to export/import the fbx, let alone what I outline above. I can't fathom how features can be announced and applauded but then not a single word of instruction is offered.

    Sure in hindsight it appears simple enough; you could argue if you forged ahead as you normally would importing animations and setting up Mecanim one would stumble across this solution, but is that how this should work??

    This is happening far too frequently with Unity. The documentation needs a complete once-over, adding missing things, adding tutorials for the more esoteric features/functions and a general 'refresh' for the current state of the program.

    Cheers guys

    -Steven
     
  14. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    If you're not seeing an animation clip, then you're not exporting it from Maya. Double-check your settings in the FBX panel.

    Otherwise the only unique instructions above for Max is the modifier stack. If you know how to skin/rig/blendshape in Maya then the rest of my directions apply to Unity.

    Cheers
     
  15. chkalyan

    chkalyan

    Joined:
    Sep 7, 2013
    Posts:
    9
    Hi SteveB,


    Thanks for the reply.I have double checked it.With out exporting the same from maya how I would get the FBX?

    Here I am attaching the FBX screenshot have a look

    $FBX_export.jpg
     

    Attached Files:

  16. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Hmmm that looks correct.

    Just to go step by step (and because I have to think about this), can you at least export skeletal animation? I want to know if ANY anim clips are exported before figuring out if its the BlendShapes causing the problem.

    If you're only trying to export blendshapes and not skeletal motion, then yea I'm going to have to do some research.

    Cheers

    -Steven
     
  17. chkalyan

    chkalyan

    Joined:
    Sep 7, 2013
    Posts:
    9
    Oh yah. i am getting all other animations which are applied to the skeletal mesh . The only problem is with the blend shapes.Not able to get the BS ( blend shapes) animation.If I am exporting only with the BS animation, then I am not able to see the clip in unity.
     
  18. Snowblack

    Snowblack

    Joined:
    Feb 22, 2013
    Posts:
    13
    May I just ask - I got "read only" sign on Animation timeline, over morphs. Even morph (bland shape) animation work, we could be able to adjust curves and keyframes, couldn't we? Is there something I don't see?
     
  19. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    So just to be clear:

    • Export BS WITH Skeleton - You get an animation clip (e.g. Take 001), but no Morph anim
    • Export BS WITHOUT Skeleton - No animation clip, so no anything

    I have to ask the stupid questions now, as next time you test all this, I encourage you to be thorough and test a variety of scenarios so we can expedite fixing your problem:
    • Did you follow my instructions and set up your Animator Controller, your Mecanim State and include the clip to play?
    • Is it set to Loop in case you missed it the first playthrough?
    • In Maya, are you simply storing BlendShapes or are you also animating them in the timeline?
    • Do you see animation curves for the BlendShapes in the Graph Editor?
    • Did you try setting keys on the object itself, not just BlendShape keys? It's possible Maya FBX export is not grabbing the BlendShape keys on export because it thinks the object itself isn't being animated?

    Again I know these are seemingly silly questions, but I have to ask to help narrow it down. I'm going to try to do an export from Maya myself right now and see what I get.

    -Steven
     
  20. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Good question. I found no way to edit the curves myself either (Read-Only).
     
  21. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Okay not to frustrate you further chkalyan, but I was able to duplicate the exact steps I used for 3DSMax in Maya and the animation clip exported with just a BlendShape object, without the need of a skeleton. I'm able to see my BlendShape animation and the curves in the Animation tab in Unity and scrub the animation.

    What I did, using Maya 2011 x64 and FBX 2011.1:
    1. Created a 10x10x10 Cube (pCube1)
    2. Duplicated it twice and named each Sculpt and Lattice (this obviously doesn't matter :D )
    3. On the 'Sculpt' cube I added a sculpt deformer (sculpt1) and tweaked the surface a bit
    4. On the 'Lattice' cube I added a lattice deformer (ffd1) and tweaked the lattice verts
    5. On my original pCube1 I added the BlendShape deformer, selected the two targets and then the source and then went to Edit Deformer/BlendShape/Add...
    6. Turned on Autokey and scrubbing the timeline, adjusted the BlendShape values to animate them.
    7. Double checked my curves in the Graph Editor
    8. Selected the original cube again (pCube1) and hit Export Selected (I didn't want the other objects as you dont need them)
    9. The only thing I changed in the FBX export options was checking Use Scene Name so I avoided having the generic Take 001 for the clip...in my case I ended up with an anim clip named BlendShapetoUnityTest
    10. From this point on I followed the instructions I outlined above - Created an Animator Controller, drag the asset into the scene, added the new controller to the Controller slot in the Animator component, went to Animator tab with that controller selected and created a new State, and inserted the BlendShapetoUnityTest anim clip and then went to the Animation tab and voila, there was the anim clip and the BlendShape animations.

    So the good news it will most definitely work for you, so the only thing you need to figure out for yourself is at what point in these steps you're missing information.

    Let me know how it goes. :)

    -Steven
     
  22. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    SteveB: Did you try with a skinned mesh? Ive been trying for 2 hours now and it doesnt work from Maya. I can get it to work easily without the skinned mesh but as soon as I add one, I get no blend shape animation in Unity.
     
  23. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Hmmm yea I've been trying too for the past hour and I can't even get a basic skin/bone animation out of Maya. I see the joints in Unity but that's about it. I've tried every combination of selections, FBX settings, Import settings, etc...nothing works!

    How do people normally get animation work out of Maya then?

    <runs back to 3DSMax>

    :D

    -Steven
     
  24. stephaned

    stephaned

    Joined:
    Nov 14, 2013
    Posts:
    5
    Hi,
    Same problem here. Here are my settings for FBX exportation in MAYA
    $FBXSetting.JPG
     
  25. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    592
    For those using Blender, Unity will read them from the Shape Keys in the Object Data panel if you import your .blend as normal.
     
  26. chkalyan

    chkalyan

    Joined:
    Sep 7, 2013
    Posts:
    9
    HI Steve,

    I animated the blend shapes in the timeline and I can see the curves in the GraphEditor also, But not the clip for the blendshapes.

    Export BS WITH Skeleton - You get an animation clip (e.g. Take 001), but no Morph anim (yes)
    Export BS WITHOUT Skeleton - No animation clip, so no anything (yes)
    Here i am attaching the hierarchy of the BS mesh

    $bs.jpg
     
  27. chkalyan

    chkalyan

    Joined:
    Sep 7, 2013
    Posts:
    9
    Yippe...

    Figured It out. Tried with the different FBX versions. Version 2011 with maya 2012 64bit is working fine.but with little problems,Donno crashing frequently.
     
  28. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    That's all you did was change the FBX version? See I tried 2011.1 and 2013.x and neither made a lick of difference.

    Perhaps you should outline your workflow like I did above for the rest of us, in case you did in fact do something different.

    Thanks man

    -Steve
     
  29. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    Not working either here with any of the versions. A reply from Unity team would be good :(
     
  30. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I've just tried blendshapes and they work as expected to me except one little thing and that is the naming of the blendshapes which seems to be named "_ncl1_1", "_ncl1_2" etc.

    I am using Softimage|XSI.

    The blendshapes were imported correctly and the animation keys for the blendshapes were also imported correctly.
    I was also excited to find out that I can mix blendshapes with bones no problem, meaning a mesh to be able to deform both by bones and shapes.
    Great stuff, at least on the Softimage front, but I guess it's the same thing. Will try out Maya later at some point as well.

    If anyone interested I can explain what I did, although I did prety standard stuff
     
    Last edited: Nov 15, 2013
  31. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    So looks like the problem occur only in Maya... or we're doing something wrong that chkalyan did right.
     
  32. chkalyan

    chkalyan

    Joined:
    Sep 7, 2013
    Posts:
    9
    HI All,
    Here are the steps I followed.

    1. Take two spheres, apply some blend shapes.
    2. After Applying BS I added a smooth skin.
    3.Exported as FBX with 2011 (i am using maya 2012 64bit).2011 Fbx version beacause tried with all other versions 2012 ,2013 none of them worked for me.

    Note : even in 2011 FBX exporter some complex BS are not working it caused the maya to crash.

    Thanks guys.Hope this helps for you.

    All the time the problem with maya donno why this happens.
     
  33. Jing07

    Jing07

    Joined:
    Nov 16, 2013
    Posts:
    1
    I have been trying to get Blend Shapes into Unity for quite some time now with very little success.

    I do not have any animations keyed to the objects that I need to import. Just Blend Shapes.

    Here was my process in maya:
    - created a basic polygon sphere
    - duplicated it twice and moved some vertices around on the duplicated objects
    - Selected the morph targets and went to Create Deformer > Blend Shapes
    - I now select the one object with the Blend Shapes and Export Selection > FBX Export
    - Under the options I have everything checked off under "Deformed Models"
    - In Unity I import the asset and add it to the scene.
    - Under the Skinned Mesh Renderer tab the BlendShapes are there, but nothing happens when I scrub through it.

    I read through this whole topic and just tried exporting with an older version of FBX exporter, and nothing changed. The Blend Shapes are still not working.

    If anyone can help me out I would greatly appreciate it.


    [1]: http://forum.unity3d.com/threads/210412-Using-Blend-Shapes-in-4-3
     
  34. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    Doesnt work. We just tried here. Still no blend shape animated with the skin.

    Anyone tried exporting in DEA_FBX? From the document it says it export only blendshapes but when we try, Maya crashes.
     
  35. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Just double checking with you guys, but if you're just doing BlendShapes (no skin) then it works if you follow the steps I outlined.

    The mystery is still getting skinned meshes from Maya regardless of BlendShapes...it seems this functionality is either missing or requires an extra step outside the realm of common sense that I've yet to find.
     
  36. artstream

    artstream

    Joined:
    Jun 12, 2013
    Posts:
    1
    Hi Steven,

    Just wanted to chime in a bit. This did indeed work, but I noticed a small thing on my end that might help other users. Using 3DS Max here.

    1. In Step 4, in regards to the animation controller auto creating, this did not happen on my end. My mesh was skinned, and had a simple animation applied, but there was no AnimController auto-created. I was still able to access the morph targets and switch through them even without a controller though.
     
  37. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Curious. When I had but just Moprher on the model (no rig no skin), I had to place the Controller manually, as without it Mecanim wouldn't fire.

    With a rigged/skinned mesh and Morpher exported from Max, Unity auto-assigned the controller for me...hmmm.

    Well regardless thank you, and yea the takeaway from my outline and your follow-up for the rest of you guys is look for these particular things if you're having problems.

    Cheers
     
  38. 3DCWCURTO

    3DCWCURTO

    Joined:
    Dec 30, 2012
    Posts:
    19
    Has any1 tried using blender shape key animations?
    exporting with fbx and can I see the shapekeys/blendshapes in the mesh renderer inside unity. Also I can create my own animation in the animator panel which is fine but it would be nice to just create the animation inside blender and export that if its even possible?
     
    Last edited: Nov 19, 2013
  39. cerebrate

    cerebrate

    Joined:
    Jan 8, 2010
    Posts:
    261
  40. 3DCWCURTO

    3DCWCURTO

    Joined:
    Dec 30, 2012
    Posts:
    19
    $shapeKeyboneDriven2.jpg

    Was just making sure I was'nt missing anything and the conclusion was they don't export yet. I just dont take much stock in documentation since things are always changing.

    Got your script working with bones that drive shape keys and blender so I can export the bones as an action. Thanks for the script. I did read your post before I posted btw.
    It seems that moving the bones based on a unit of one in the negative x (inside blender) gives the same results.
    From what I understood of the script naming the blendshape and bones that drive the shapes the same in blender is important.
    I was very happy to just copy and paste and not really need to fully understand the script so thanks for that.
     
  41. mbcauley

    mbcauley

    Joined:
    Jun 1, 2013
    Posts:
    36
    This technique worked for me with a skinned object and animated blendshapes in Maya. Both the blendshape keyed animation as well as the joint animation came through in the Unity clip when I exported using FBX 2011. But when I tried to use this process on my skinned character with a much more complex skeleton as well as 3 different meshes (body 2 eyes) all bound to the skeleton and blendshapes on the body mesh, the animation did not come through in the Unity clip. Of note is that the blendshapes do import, I can access them using the Skinned Mesh Renderer component, the keys, however, do not.

    Is this a bug or are we doing something wrong? I assume it's a bug if the 2011 trick provides a partial fix...

    EDIT: I detached the 2 eyes from the skeleton so only the body was bound to it. After doing this and exporting a 2011 FBX everything imported correctly into Unity and I was able to include the blendshape animation in the animation clip along with the joint animation. For now this seems to be a workable solution (thanks for finding it chkalyan!)
     
    Last edited: Nov 25, 2013
  42. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741
    Is there a buzzer we can press to 'goose' someone at Unity to chime in on this?
    I'll walk around with my collar up for a week.
     
  43. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Unity is still using FBX 2011.
    Not only blendshapes, many things won’t work for Unity if you export using newer FBX.
     
  44. trasher258

    trasher258

    Joined:
    Apr 2, 2013
    Posts:
    21
    FBX 2011? I wonder why that is...

    I'm also wondering why part of the blend shape name is getting excluded upon import... which is a royal pain when trying to get Mixamo's FacePlus to work having "Facial_Blends." getting cut off while the .fbx still has the correct name.

    At least I can get manual blend shape animations exported from 3ds Max to Unity with no issues.
     
  45. Adam-Mechtley

    Adam-Mechtley

    Administrator

    Joined:
    Feb 5, 2007
    Posts:
    290
    This problem is actually the result of a bug in Autodesk's FBX SDK for versions newer than 2011. As noted, you can manually select FBX version 2011 in your export settings to resolve just about any problems that people have encountered. If you are interested in using native Maya files, however (as opposed to exporting as FBX), you can make some simple changes to Unity's export script. I wrote a post on my blog for those interested: http://adammechtley.com/2014/01/help-my-blendshapes-arent-working
     
    sstadelman likes this.
  46. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    I have been able to import succesfully with FBX 2011 when my skinnedmesh has 1 blend shape. However, as soon as I add more than one blendshape, Maya crashes on export.

    I am on 2012. Just tried on 2014 and it doesnt crash.... damn :/
     
    Last edited: Jan 23, 2014
  47. hs91

    hs91

    Joined:
    Feb 3, 2013
    Posts:
    1
    Adam Mechtley, your post saved my life.

    I had the same issue with Maya 2014, because I could export everything but blendshapes had no keys in Unity. If I exported the head only (the head is blendshaped, the body is not) they worked like a charm, but my character was doomed to be a floating head.

    While, at the end, using a .mb file worked perfectly and everything is animated, still using the animator trick SteveB wrote.

    Thanks a lot to the both of you! :D
     
  48. ava3

    ava3

    Joined:
    Aug 11, 2013
    Posts:
    5
    To export/import blendshape animation through fbx, every blendshape name must be in digit, no alphabet like "eyebrow raise" or "jaw open". The first blandshape on the list must be name "0", then 1, 2, or 3, depend on how many blendshapes you have on there.

    To avoid other errors mention on here, keep your file clean by export all blandshapes as .obj and delete histories , then import them back in and reapply it to your model. Software like Maya build a lot of unwanted input and output as you edit them and they do cause trouble in Unity, so delete them before import it to Unity.
     
    Last edited: Feb 10, 2014
  49. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    For which, 3DSMax or Maya?

    For Max this isn't the case...you can have any name you like.

    @hs91 - You're welcome! :D


    -Steven
     
  50. ava3

    ava3

    Joined:
    Aug 11, 2013
    Posts:
    5
    so imported blendshape animation curve, not blandshape, work in 3DsMax without changing the names?