1. We've introduced thread tags, search within a thread and similar thread search. Read more here.
    Dismiss Notice
  2. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice
  3. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  4. We've released our first Timeline Experimental Preview, our new tool for creating cutscenes and more! To check it out click here.
    Dismiss Notice
  5. Unity 5.5 is now released.
    Dismiss Notice
  6. Check out all the fixes for 5.5 in patch releases 1 & 2.
    Dismiss Notice
  7. Unity 5.6 beta is now available for download.
    Dismiss Notice

Blendshapes support in Unity

Discussion in 'General Discussion' started by rea, Apr 10, 2013.

  1. rea

    rea

    Joined:
    Oct 10, 2009
    Posts:
    1,743
    Maybe most or some of you already know this, but i never check the online docs and when i do i find something interesting
    It's in http://docs.unity3d.com/Documentation/Components/class-Mesh.html


    Blendshapes
    Unity has support for BlendShapes (also called morph-targets or vertex level animation). Unity can import BlendShapes from .FBX (BlendShapes and controlling aninimation) and .dae (only BlendShapes) exported 3D files. Unity BlendShapes support vertex level animation on vertices, normals and tangents. Mesh can be affected by skin and BlendShapes at the same time. All meshes imported with BlendShapes will use SkinnedMeshRenderer (no mater if it does have skin or not). BlendShape animation is imported as part of regular animation - it simply animates BlendShape weigts on SkinnedMeshRenderer.


    Seriously guys, this is like major feature and this is not even mentioned in release notes....???
    this is real right, is there any of you that already tried this?
     
  2. kaiyum

    kaiyum

    Joined:
    Nov 25, 2012
    Posts:
    575
    weird! This feature exits in unity?
     
  3. MarigoldFleur

    MarigoldFleur

    Joined:
    May 12, 2012
    Posts:
    1,353
    There's a few asset store packages that use blendshapes for animation, iirc. I don't think it's a new feature.
     
  4. wasstraat65

    wasstraat65

    Joined:
    Jan 12, 2012
    Posts:
    776
    Strange, I knew it was a planned feature but I was never told it is already implemented. Have to try this out sometime soon
     
  5. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    768
    This has been brought up before and a Unity developer has said that it is an error in the docs, it was a feature they hoped to add but dropped, he said it may appear sometime but dont hold your breath. Until then you will need one of the systems on the asset store if you need blend shape support.
     
  6. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,423
    Well,
    If I remember correctly, the butterfly demo used blend shapes. And it was mentioned that this technology will come to unity at some point. Someone who works at unity could perhaps clarify if this works or not.
     
  7. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,669
  8. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,535
    Blend shapes should have been included from the start! No one really want to use bone driven morphs, when they can just model the expressions they want at any time...
     
  9. rea

    rea

    Joined:
    Oct 10, 2009
    Posts:
    1,743
  10. Joe-Robins

    Joe-Robins

    Unity Technologies

    Joined:
    Apr 21, 2008
    Posts:
    429
    Blendshape support has been added to Unity as of 4.3
     
  11. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,535
    Exactly what I needed :)
     
  12. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    502
    Will Belndshapes from Blender work in Unity 4.3?
     
  13. lastprogrammer

    lastprogrammer

    Joined:
    Apr 30, 2011
    Posts:
    153
    Try it. I will today too!
     
  14. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,669
    Yes.
     
  15. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    502
    Thanks! I will try today with Blender Blendshapes.
     
  16. brian.amberg

    brian.amberg

    Joined:
    Nov 12, 2013
    Posts:
    7
  17. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    1,905
    I can even easily animate these without shelling out $800/year :)
     
    Last edited: Nov 13, 2013
  18. vidi

    vidi

    Joined:
    Oct 14, 2012
    Posts:
    153
  19. chkalyan

    chkalyan

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


    Today I tried to do the blendshapes to unity from Maya with a regular procedure as FBX with blendshapes on in fbx exporter and I animated those blendshapes in maya.When I import the fbx to Unity,I can see the animations playing but the blendshape animations are not.Could yoou pls help me with the procedure.

     
  20. vidi

    vidi

    Joined:
    Oct 14, 2012
    Posts:
    153
    I don't use Maya. I do all my animation task with the iClone Pipeline Bundle That backed all animation keys and clips in a special motion plus file .

    Maybe in Maya is a Morph Option that must be select for the export, or another backed function ?

    I don't know
     
    Last edited: Nov 13, 2013
  21. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,389
  22. dsada

    dsada

    Joined:
    Apr 27, 2013
    Posts:
    1
    Last edited: Nov 20, 2013
  23. vidi

    vidi

    Joined:
    Oct 14, 2012
    Posts:
    153
    Sorry I have not seen this thread earlier

    What exactly is your problem with the iClone Pipeline ?
    For more help, maybe you should start a tread in the Realusion Forum ?
     
  24. meat5000

    meat5000

    Joined:
    Mar 5, 2013
    Posts:
    75
    For completeness... In Blender they call em ShapeKeys. If these are supported it opens a new world of animation that I previously had to abandon!
     
  25. DannyB

    DannyB

    Joined:
    Jun 20, 2012
    Posts:
    214
    Hi,

    Is there anything special I need to do in order for blend shape animations to work?
    I have a simple cube model in blender, with animation clip that animates both a simple skeleton and shape keys.

    When importing to Unity (either as FBX or the source .blend file), I can see the skeleton animation, and I can see the BlendShapes properties in the inspector, but the shape keys are not animated.

    Here is the blend file if anyone is in a generous helping mood.
    https://dl.dropboxusercontent.com/u/5253945/unity-forum/cube1.blend
     
  26. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
    Lol sorry I was answering for some previous posts until I saw they were mostly old.

    You animate your shapekeys inside of Unity using the animations window of the Unity editor. You can't export shapekey animations directly from Blender.
     
  27. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,013
    It should be noted that if you're using the new Blender 2.71 that the Shape Keys aren't exported with the FBX exporter in Binary mode... they rewrote the exporter and support will be included in 2.72. Otherwise you can use the Legacy ASCII exporter.
     
    SememeS likes this.
  28. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    I've a .blend with 250 blendshape keys. Any way to get that animation into Unity? I only see empty blendshape keys in Unity.
    Thanks
     
  29. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    162
    I'm trying also to find how to use this. So far I have found some videos about using Maya.

    Is there anything showing how to get a model from Blender into Unity with blendshapes ?

    Presumably the blendshapes must be done in the modelling program ?

    Or if I already have the separate morph targets can I load them into Unity one by one or something ?

    Thanks :)
     
  30. BrainMelter

    BrainMelter

    Joined:
    Aug 26, 2014
    Posts:
    233
    I heard in Blender's next release (2.72) they will make it easier to export blend shapes. The process right now is pretty clunky / difficult, but maybe I was just doing it wrong ..
     
  31. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    162
    I found a video showing how to do it :



    Haven't tried it yet, but that looks pretty simple. He just exports the .blend file and then imports that into Unity.

    I've already made my morph targets as separate models, so I don't know yet how I can do that method.
     
  32. BrainMelter

    BrainMelter

    Joined:
    Aug 26, 2014
    Posts:
    233
    As I seem to remember, the export process is pretty easy, until you want to also export an armature on your model. Then things get messy.
     
  33. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    162
    I got this method working fine. I did everything he said in the video and barring a problem with the import it works.

    So the problem was that something somewhere broke the importer. But I found this topic that replaces the old python34.dll with a new one.

    http://forum.unity3d.com/threads/blender-2-71-blend-to-unity-broken.254632/#post-1700044

    After I applied that fix, everything worked as expected and I could morph my cube in Unity :cool:

    Now I just need to work out how to get my already made morph targets into Blender.
     
    Last edited: Sep 15, 2014
    Dustin-Horne likes this.
  34. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,013
    Correct. The main issue is that they're using a new FBX exporter that was rewritten from the ground up. The exporter in 2.71 does not support exporting blendshapes and they've said this is on the roadmap for 2.72.
     
  35. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
  36. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,013
    Yes, export it to FBX from Blender 2.68 would be the easiest... or use the .blend file directly without FBX export. Just make sure you've saved in Object mode (not edit mode) before importing into Unity.
     
  37. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    Yea that's what I do for ~2 weeks. Put the blend (object mode saved) into assets, then set animation to legacy. I see
    all 250 shape keyframes but not animated.- I see also a default take animation but it doesn't move a bit...
    Do I need Blender 2.68? I've tried with 2.61 and 2.71. Thanks for help
     
  38. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    Last edited: Sep 16, 2014
  39. Mike4

    Mike4

    Joined:
    Oct 24, 2013
    Posts:
    92
    A huge thanks to the Blender devs as I just got my animation working perfectly after fbx exporting from Blender 2.72beta. :)
     
    Freddy888 likes this.
  40. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Ahhh yeah! Been using blendshapes fine from both Daz Studio and Max for a while now

    One big feature request which arises from my use of the excellent Krabl mesh tools is exposing the blendshape data, which apparently isnt exposed, so krabl can decimate it properly along with everything else

    This would be an absolutely great move for systems borne from makehuman or daz which do use quite complex base meshes but would look great at all number of LODS and yeah, would pretty much set a skinned mesh very nicely for multiplatform consideration (I'm genuinely thinking of a span between mid level mobile to dx11 of incredibly expressive models)

    If this has been fixed, tell Krabl!
     
  41. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    162
    Thanks for the heads up Mike4 - my blendshapes are now working with FBX :cool: