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

Blender 2.8 bendy bones to Unity

Discussion in 'General Discussion' started by Viva-La-Baz, Jan 16, 2020.

  1. Viva-La-Baz

    Viva-La-Baz

    Joined:
    Jun 21, 2014
    Posts:
    50
    Is it possible?
    Ive attempted to import my bendy bone model from blender to unity with animations, but inside unity the mesh isnt deforming as it does in blender.
     
    drewjosh likes this.
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    This isn't a support forum, and a sample of what happens in blender and in unity would speed things up.

    I have not tried exporting bendy bones to unity, but after quickly looking through how they work in blender....

    This isn't going to work in unity without heavy voodoo.

    Bendy bones use single weight/vertex group per entirety of the bent bone. At the same time the bone deforms as if it was a spline.
    Unity, on other hand, works with assumption that bones can be represented as a combination of rotation, translation and scale. Meaning bones do not act like splines. Meaning, unity has no support for bendy bones from blender.

    A workaround is possible, but it is not going to be easy.
    Either you, during export, generate proper set of bones and multiple vertex groups for anything affected by bendy bones....
    OR you write your own skinned mesh component that will handle bendy bones properly.

    Both of those possible solutions are high difficulty tasks.
     
    drewjosh and angrypenguin like this.
  3. Viva-La-Baz

    Viva-La-Baz

    Joined:
    Jun 21, 2014
    Posts:
    50
    Thanks for the reply and apologies for making the topic in the wrong section.

    That seems like it would be a task and a half to accomplish. I'll give it a go.
     
  4. steoza3407

    steoza3407

    Joined:
    Apr 18, 2020
    Posts:
    1
    Did you ever figure it out because I'm struggling too
     
    drewjosh likes this.
  5. Aaryan_Makwana

    Aaryan_Makwana

    Joined:
    Jul 16, 2022
    Posts:
    1
    I haven't tried it yet. But I guess it would work if we bake the animation and remove bones while exporting and import the mesh as animation itself?
     
  6. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,612
    You'd probably need to convert the key frames of the animation into Blend Shapes before importing into Unity. THen in Unity you could probably write an animation or script to move from one blendshape to another.

    The only type of animation you can import is bone animation Not bendy bones, though, those don't count. There is no equivalent to bendy bones in Unity, and I think it's unlikely that the fbx file format even supports these.
     
  7. nikefootbag

    nikefootbag

    Joined:
    Jun 13, 2017
    Posts:
    28
    You could definitely generate blendshapes so the mesh deforms per the bendy bones.
    You don’t necessarily even need to control the blendshapes in unity as you can combine the result of the blendshapes and armature animation within blender using the nla editor, and then just import it into unity as animations.
    This video goes over how to combine blendshapes and armature animation in blender:
     
    drewjosh and kdgalla like this.
  8. drewjosh

    drewjosh

    Joined:
    Sep 24, 2019
    Posts:
    28
    kdgalla likes this.