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

Modifier Animation from Blender to Unity - A Bit Stuck.

Discussion in 'Asset Importing & Exporting' started by Digitalos, Aug 24, 2009.

  1. Digitalos

    Digitalos

    Joined:
    Jun 1, 2009
    Posts:
    112
    Hi all,

    I have a basic mesh in blender, it's a flat plane, and it's going to be used as a flag in Unity if I can get this working.

    I have applied two Wave modifiers to it, via the Editing (F9) button, under Modifiers->Add Modifier. This makes it ripple as I like. Now I've been hunting high and low on ways to get this animation to appear in Unity but have thus far not found anything. I've played around with keys, the ipo curve, NLA editor, time-line and pretty much anything and everything I could find. I've done some experiements and it seems that animations only show up in Blender if you export to FBX. If you save as a .blend file, it only gets the model data.

    Does anyone know how I can get this modifier animation to work in Unity?

    Thanks.
     
  2. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    Wave modifier builds a vertex animation, which is not suported in Unity. You need to use Armature (bones) animations for Unity to understand them.
     
  3. Digitalos

    Digitalos

    Joined:
    Jun 1, 2009
    Posts:
    112
    Alrighty, is there any way I can convert this animation into one using armatures? It seems overkill for a flag, but I guess I have to work with what is available.

    I am thinking that animating something like this by hand will be quite the task using bones. :/
     
  4. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    I don´t know of any.

    Not so much, you only need to animate a cicle. But it all depends on the level of detail yoou need, of course.
     
  5. Digitalos

    Digitalos

    Joined:
    Jun 1, 2009
    Posts:
    112
    Ok well thanks for the headsup, I will hit the tutorials and see what I can find. :)
     
  6. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    In Maya I use a wave deformer on the flag which also produces vertex animation, then convert some of the vertices (enough to drive the bones) to clusters and have the clusters drive a simple single skeletal hierarchy. I have another skinned (mesh to joints) version of the flag for use in Unity or another engine. This is common practice for converting all types of mesh animation into simple skeletal data.

    Not sure about Blender though. Can you have a vertex control something or convert the vertex to something that can? I've also used the wave deformer as a reference for hand keyframing -- this will work in any package.

    A simple flag only takes 4 joints to produce a nice looping ripple
     
  7. Digitalos

    Digitalos

    Joined:
    Jun 1, 2009
    Posts:
    112
    Hey jbuck, thanks for the idea - that sounds pretty cool and I actually just stumbled upon someone else suggesting the same thing calling it 'sampling'. I will investigate this with Blender, I've got the flag mesh with four bones atm but have failed to make any real headway. If I find a good solution I will upload it here too just in case someone else comes across this issue.

    I'm quite new to Blender too, but lets see where we get to. :)
     
  8. Digitalos

    Digitalos

    Joined:
    Jun 1, 2009
    Posts:
    112
    The hardest thing about finding this stuff is if you don't know the terms, you have to search on very vague keywords. Does anyone know what this is called in Blender?

    Also another thing, I can very easily get the armatures to link to and deform the mesh as I move/pose them, but not the other way around. How do I make the mesh drive the bones?
     
  9. Digitalos

    Digitalos

    Joined:
    Jun 1, 2009
    Posts:
    112
    So with some help from meNace__ and his friend florianfelix, I found a way to animate the bones from another mesh and got www.squeakycow.com/tpg/flag_test.html

    Which I'm quite happy with, it's 16 polys, 2 drawcalls. :)

    I will be putting up the flag rig on the wiki, so if anyone wants to know how to do it/runs into a similar Blender issue, just search for "Blender" and "Flag".

    Cheers!