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

Simple animation tutorial with Blender for Unity?

Discussion in 'Asset Importing & Exporting' started by ej2009, Apr 1, 2009.

  1. ej2009

    ej2009

    Joined:
    Mar 2, 2009
    Posts:
    353
    Hi,

    does anyone has any tips or even better links to Blender tutorials on how to animate simple characters, but suitable for Unity? I know there is certain way you need to do things in Blender to work fine in Unity.

    I'm noob with 3D packages and modeling, but more I play with Blender more I like it! I also purchased Cheetah 3D recently, but I'm using Blender because there is so many tutorials for it.

    Anyway, if anyone has any tips or hints related to topic would be greatly associated, something like building a simple human of few cubes and making it walk in Unity would be tops!
     
  2. ej2009

    ej2009

    Joined:
    Mar 2, 2009
    Posts:
    353
    shameless bump :oops:

    Any Blender gurus out there please? :)
     
  3. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    There is no such a tutorial that I know of, but it is not difficult. Build the model mesh, unwrap it to get a good UV map, then build an Armature for it. Parent the mesh to the armature and setup your groups of vertex to animate properly. Finally animate the Armature in an Action window, adding one new Action for every cicle you need. Unity will read the blend files directly and will understand each action as a separate animation.

    I hope it helps.
     
  4. CogCode

    CogCode

    Joined:
    Mar 8, 2009
    Posts:
    143

    That's a little easier than the way I did it. I didn't realize that Unity would understand Blender's actions, so I animated on the timeline and set the frame ranges by hand in Unity.

    Good to know for next time thought. :cool:
     
  5. ej2009

    ej2009

    Joined:
    Mar 2, 2009
    Posts:
    353
    Thank you! Of course it helps a lot! One question if you don't mind - do I really need to do mesh unwrap to do UV map for animation?

    I thought you could build armature directly inside the mesh? I won't need to apply texture to my model, just some color material.

    Saw this book in local book store, will pick up on weekend, should help a lot I hope.
     
  6. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    If you only need a plain colour, you don´t need to build the UV. And the book will help you a lot for sure, good luck.

    Also remember you can get much more info from the Blender user forums:

    http://blenderartists.org/forum/
     
  7. ej2009

    ej2009

    Joined:
    Mar 2, 2009
    Posts:
    353
    Thanks a lot for your help mate!

    I'm following example from Bender 3D: Noob to Pro and did simple person in few minutes.

    Interesting enough, when adding bone they say to resize it by moving one of bone ends, but don't do scaling as this messes things up. Whatever I do I can't resize bone by moving one of its ends, bizarre.

    Sorry for asking all these questions, I know it's not a Blender forums..

    Edit: never mind, found it, have to be in Edit mode to resize a bone.
     
  8. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    I guess you are trying it with a selected bone. In Blender you can select the whole bone or just one tip. Select just the tip and then move it. The reason for not scaling bones in the Edit pose is because it needs to be totally neutral as the Zero from where later on you will animate any parameter you could need (including scale). But just moving away the tip you are in fact getting the same result, making the bone actually longer or shorter.
     
  9. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    I need a little help understanding what I'm doing wrong. I made an animation but when I put it into Unity, I get this:



    It actually does wiggle once but as you can see, the body is gone and the tail is completely deformed. I imported a .3ds file, unwrapped the UVs for the horn, body, and tail. I ignored the eyes and feet cause they imported last time. I created the bones and grouped them with the Envelope. Then I made my animations in the Pose mode and saved it as a Blender file since it was meantioned that Unity can read Blender files. The body shows up in the preview window of Unity but when I put it into the scene, that happens.
     
  10. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Can you post what it looks like in Blender so we can see what it's supposed to look like?
     
  11. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
  12. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Hmmm... I really can't tell from the screen shots what the problem may be. All I can suggest is that 99% of the time when I run into something like this it's because I didn't rig the armature correctly and there are vertices that either aren't weighted at all or are attached to the wrong bone. GusM is the Blender animation guru here, maybe he can tell what's wrong. If after you've double checked your rig it still looks screwy, maybe post the .blend so we can dig through it and see what's up.
     
  13. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Well it's not like I did a full body bone structure. I just put in a few bones cause I only wanted to see if Blender would work with Unity. Before I was trying to import as a .fbx file but Unity would crash if I pushed the F button. I don't really know what weighting is so that might be my issue. I'll have to look up on it.

    How much weight is something supposed to have? The body and tail have a weight of 1 and the horn, feet, and eyes have no weight at all. 0_o;
     
  14. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    I am not a Guru :(

    Your problem looks like when you have vertexes not asigned (weighted) to any bone at all. Don´t use envelopes to assign your mesh to the armature bones, better use vertex groups. And don´t use Poses for animating, use Actions instead.

    Google for "Blender character animation" and you will find a lot of good learning material. Learn well your tools and you will get a much happier life ;)
     
  15. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Well I was looking at a video about animating and they used posing as their method. ^_^; I'm still struggling with the animation window cause the keyframes don't want to behave like I want them to. >_< Every time I click on the Actions window, I don't see my object any more so I wouldn't know how to animate it, but I will look that up. I don't have bones on the majority of the object, just in the end by the tail and in the tail itself. I figured since I was only animating the tail, I wouldn't need to put in a whole body.

    Thanks for the help. ^_^ I will test them out tomorrow.
     
  16. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    It seems the more I group stuff, the more it disappears. 0_o; I grouped my entire object to the bones making vertex groups. I didn't bother animatng it this time yet since I wanted to see if I can even get the whole object to show up. When I put my object into the scene, there was nothing there and when I pushed the F key, I crashed Unity. (again) I don't know if it's the weight issue or the way I did the bones but I'm following the tutorials and making the bones how they say to. 0_o

    http://img.photobucket.com/albums/v185/suicune2001/experimentFAIL2.jpg
     
  17. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    It is very difficult to know what is going wrong with just your descriptions and the picture you posted. It can be a lot of things. If you want and can, post the blend file and we will be able to take a deeper look at it.
     
  18. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    Ok, I guess I'll attach the file that isn't grouped yet to make it easier to look at. x_x;
     

    Attached Files:

  19. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    The file you posted is ok here, I just open it up in Unity and I can see the full model fine. I guess you are looking at a copy of the old blender file in your scene: try deleting it from the scene and grabbing a fresh copy from the project. Also, the Unity crash when pressing F sounds like a problem with your system or instalation, it works fine here too.

    But in this file you have not attached the meshes to the Armature and you have not used vertex groups at all. Look for some basic tutorials about Blender Modelling, Armatures and character animation, it is worth to learn well the basics of your tools.
     
  20. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    I know it wasn't grouped. I posted the one that wasn't grouped so if someone else grouped it and it shows up in Unity, then there would just be a problem with my grouping, but if someone else grouped it and it disappeared then it's a different problem.

    It only crashes like that when I import something into the scene and nothing shows up. Otherwise the F key works fine.
     
  21. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    You have a problem and you send the file without the problem?
    Sorry, but cannot help too much this way.
     
  22. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    I was just trying to narrow down the problem. >_<; But ok, if you want a file with a vanished body part, then here. This is the file I used for the picture with the missing body.

    EDIT: Right now I'm looking up a tutorial on Skinning just in case that's my issue.
     

    Attached Files:

  23. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    You must asign all the vertex in the mesh to a bone or more, otherwise you get this effect where Unity does not know where the unasigned vertex should be. And yes, the skinning tuto will help you a lot for sure ;)
     
  24. suicune2001

    suicune2001

    Joined:
    Apr 9, 2009
    Posts:
    118
    How do I get it so I can select and move bones in the weightpainting mode? If I right click on a bone, I get taken back to Object mode and if I click the G button, nothing happens. I've been looking at tutorials all day and each one describes skinning a little differently. Some group the object and bones first then assign names while others assign names then group. This video which I thought was the most helpful didn't even group the objects using Ctrl+P and showed how to weightpaint.

    http://www.youtube.com/watch?v=3mFge8E20zU

    But they went REALLY fast in describing how they were able to move the bones in weightpaint mode. Even though I painted some of the tail, none of it showed up in Unity and I'm wondering if it's because I couldn't select a bone.

    EDIT:

    I figured it out! ^_^ I did the weight painting with the seperate bones and it's almost perfect in Unity. :D Thanks for helping me and dealing with my newbieness. XD It only took me 15 days to get one thing to work. XD
     
  25. thecreatrix

    thecreatrix

    Joined:
    Dec 19, 2008
    Posts:
    94
    I'm having a similar issue. Most of my model doesn't appear, although I've got vertex groups assigned to each bone. There are only two bones.

    Secondly, the single animation I created is in the project folder under the correct name, but Unity is renaming it to "idle" in the animation list, and it doesn't play. :cry:

    I have to qualify this by saying I've only just learned how to use bones and animation in Blender today, so I'm sure my noobness has caused major havoc. :oops:

    My brain is jelly after a solid day of searching, reading, watching, and fiddling with settings, so I'm hoping maybe someone can look at this and suggest something. I just want to find out what I've done wrong so I can

    Thanks in advance for any help!
     

    Attached Files:

  26. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    You have a vertex group called "hull", where it should be named exactly as the bone you want to bind it ("hull-bone" in your example). About the animation name, I see it just fine here so I guess you did something wrong, but I don´t know what.
     
  27. thecreatrix

    thecreatrix

    Joined:
    Dec 19, 2008
    Posts:
    94
    Ah, thank you for pointing out my mis-named vertex group, Gustavo. I didn't realize they had to have the exact same name.

    Did the animation name show up as "idle" or as "prop-spin" for you? In the .blend file (actions editor), it's named "prop-spin" but in Unity it comes in as "idle". I'll poke at it some more.

    Thanks for taking the time to look at this. I really appreciate it! :)
     
  28. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    In Unity I also see the animation called "prop-spin", no idle name here. I guess you used the fbx import or other options to change the name and then you forgot...?
     
  29. bugzilla

    bugzilla

    Joined:
    Dec 9, 2008
    Posts:
    196
  30. Matroblend

    Matroblend

    Joined:
    Jan 30, 2009
    Posts:
    134
    bugzilla,

    Just checked out your youtube site, you have some great tutorials. I look forward to some unity tutorials as well.

    Thanks
     
  31. owaris@post.com

    owaris@post.com

    Joined:
    Dec 18, 2012
    Posts:
    4
    Sir I have a 3d max fbx file.But i try animation 3d chracter but is no working in animation plz you are help me.