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

Blendshapes support in Unity

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

  1. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    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:
    686
    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. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    938
    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:
    1,056
    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,521
    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,667
  8. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    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. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
  10. Joe-Robins

    Joe-Robins

    Unity Technologies

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

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Exactly what I needed :)
     
  12. Venged

    Venged

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

    lastprogrammer

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

    Dantus

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

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    500
    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:
    2,008
    I can even easily animate these without shelling out $800/year :)
     
    Last edited: Nov 13, 2013
  18. vidi

    vidi

    Joined:
    Oct 14, 2012
    Posts:
    175
  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:
    175
    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,451
  22. dsada

    dsada

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

    vidi

    Joined:
    Oct 14, 2012
    Posts:
    175
    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:
    118
    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,568
    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:
    165
    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. MrBrainMelter

    MrBrainMelter

    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:
    165
    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. MrBrainMelter

    MrBrainMelter

    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:
    165
    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,568
    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,568
    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:
    165
    Thanks for the heads up Mike4 - my blendshapes are now working with FBX :cool: