This "Ninja Character to Unity" is my experimental studies with Unity and Blender workflow. I also want to make some low poly modeling after a long time. I forgot how nice it's to make low poly "art" 🙂

This ninja character based one of my simple game idea for the mobilephones. Maybe I'll made this game someday after I have learned Unity scripting enough. I think Unity is very user friendly program and I've always wanted to learn it. Now I have found some spare time in weekend to look at basics from Unity. I tested Unity 4 beta version and it's awesome!

Main parts and order of the process in this work:

  1. Sketching character (Illustrator)
  2. Modeling (Blender)
  3. Unwrapping (Blender)
  4. Texture painting (Photoshop)
  5. Rigging (Blender)
  6. Animating (Blender)
  7. Testing character in game engine (Unity)

Ninja Low Poly Character

I ended up to Ninja character because it's almost full covered with black fabric material and it's easy to customizate with some assets. Most of all, I like ninja mythology! 😉 This is just experimental character at this phase, maybe I'll consentrate more to character design and look in further.

There is over 1700 triangles in that model. It's not optimized yet, but good enough for this purpose.

There is only diffuse map on it.

Ninja Moves (Animation)

I wanted to test out how animations work with Unity and how my ninja model works with blender "Rigify" tool. I really suprised how good and fast rig "Rigify" produce. I usually like to made my own rigs because then I know how they work and it's easier to customize them when you have done them by yourself. But in this session I decided to gave a change to "Rigify" addon. It's good enough for posing and simple animations, but there could be problems with customizing and if you have character that isn't basic human. I need to test it more before I can say more about it, but I use it in this character and animations and it works great!

So I made couple example animations for the testing animations in the Unity. I made trigger buttons in Unity for these animations, like in many games where I can choose next move from buttons. There is three different loop animations: walk, flying roundhouse kick and preparing to fight pose. You can see them in video at the beginning of this post. These are only for test purpose, so I do not spent much time with curve editor or cleaning keyframes process...

And here is that little script for those "trigger" buttons in Unity. Just paste it to your character new "Component Script" and you're done.

function OnGUI () {
    GUI.Box (Rect (10,10,160,120), "Select Ninja Move:")
        if (GUI.Button (Rect (20,40,140,20), "Flying Roundhouse")) {
            animation.CrossFade("KickFlyingRoundhouse");
            animation.CrossFadeQueued("StandFight");
        }
        if (GUI.Button (Rect (20,70,140,20), "Walk")) {
            animation.CrossFade("MoveWalk");
        }
        if (GUI.Button (Rect (20,100,140,20), "Prepare Fight")) {
            if (animation != "StandFight") {
            animation.CrossFade("StandFight");
        }
    }
}

Blender to Unity

Importing .blend files to Unity is quite simple process and almost fully automated.

If you want to use blender "Rigify" there is good script called "Rigify to Unity". It's cleans up your rig before importing it to Unity, because there is much stuff that doesn't needed in Unity. I tested out Rigify in Blender 2.64 and imported it to Unity 4 Beta. Everything works just fine and I really suprised how easy process this was.

You can install that Unity script easily from store. Just click Window > Asset Store (ot just press CTRL + 9) in Unity and search with "blender" search term. After you have downloaded script just import it in to your Project. That's it!

Now you need to import FBX file that include word "Rigify" on its name. This script will clean up rig for you. Like this:

If you imported your character in FBX format it includes all animation that you've made. If you change or make more animations to the same file Unity watch that file and update that for you. Unity rocks! 🙂

Overview

So this was only a little learning process from this weekend and I'm really glad that I made it.

I guess my next move is to learn more scripting in Unity and how all things works in there. There is so much good learning materials in web about Unity. It's one of the most popular 3D game engine at the moment. Here is some good links where you can start of your learning. I found these useful:

Good links for Unity learning:

http://www.burgzergarcade.com/
http://cgcookie.com/unity/
http://walkerboystudio.com/html/unity_training___free__.html
http://www.unity3dstudent.com/
http://catlikecoding.com/unity/tutorials/
http://www.unityjumpstart.com/ProofOfConcept_1/
http://video.unity3d.com/
http://unity3d.com/support/documentation/video/
http://answers.unity3d.com/index.html
http://docs.unity3d.com/Documentation/Components/gui-Basics.html

If you find this post useful drop a comment below...