1
$\begingroup$

How can I animate the blender file here: Blender File to be used in the Unity game engine? People recommend using the Action Editor. Furthermore, would I need to merge all the planes into one object for use? Hope to hear from you soon <3

$\endgroup$

1 Answer 1

1
$\begingroup$

Is it your plan to just rotate arms and legs as if It where 2D pixel art?

Use the timeline (the meter with the frame numbers and the green line indicating current position, at the bottom) to go to say frame 25. Now rotate the legs to pose the character as if it were walking, press key "i" to insert a new keyframe, in the menu that just appeared click on "LocRotScale", now drag the green line in the time line from 25 to 0 and from 0 to 25 again, watch how your character walks. Apply this to do more complex movements.

The good thing is that you only need to pose the character in the initial position, then advance x number of frames (depending on how fast you want the movement to be) and pose it in the final position and insert keyframe there. The frames in between will be extrapolated by Blender. You only need to insert more keyframes in the middle of a movement to do more complex movements.

Also, you probably want linear extrapolation of keyframes: How do I make animations a steady speed?

Yes, you can use the Action Editor to save each animation as actions but... I would not trouble myself into do so, I would just save all animations as a continuous very long time line. If you will export as a 2D spritesheet that is precisely the more practical to do. If you will use it as 3D assets maybe you need the actions in order to trigger them by action name from the game engine code.

I don't sure about the state of .blend files support in Unity, I don't know If It will import the actions at all.

No, you don't need to merge all planes into one object. Actually, by having them as separated objects, you can insert keyframes for each plane individually and move them independently. If you join everything into a single object, you will have to use an armature to animate legs and arms (because I think that changes done in Edit Mode to the mesh are globally applied across all keyframes making it impossible to create keyframes by rotating things in Edit Mode. While poses done with armature can be keyframed).

$\endgroup$
6
  • $\begingroup$ Thank you for such a detailed answer Hatoru; so your conclusion is to use key frames on the timeline and sequence one animation after another in the timeline. To help make things easier on say the finished result; how would I import something like this into Unity: twitter.com/seanyoungsg/status/689418972995817473 Would I import as a 2D or 3D asset? $\endgroup$
    – Ulivax
    Commented Feb 21, 2016 at 0:31
  • $\begingroup$ That animation using planes inspired me! OK, returning to the subject. Are you using the Unity Sprite Manager class? I mean, will your game load 2D assets (png, etc) or will your game load 3D data (meshes)? If the answer is Nro 1 then render each frame one after another in a very long png image file. If you do not want to do so manually you can write a python script that do it for you (I wrote one some time ago, and I can upload It as example), I mean, render each frame (not only keys) and put them all together in a very long png file. For 3D meshes... $\endgroup$ Commented Feb 21, 2016 at 1:44
  • $\begingroup$ For 3D meshes, as I said, I don't sure of the .blend file support in Unity. Most engines I have used do not accept .blend directly (I can only name 2 that do). But you can use one of the built-in exporters or install a plugin. I will have to check Unity docs before recommend a format. As last resort, use obj (exporter is already in blender and code your own obj loader directly in the game is trivial as obj is text based and human readable, specs in Wikipedia). $\endgroup$ Commented Feb 21, 2016 at 1:48
  • $\begingroup$ It seems Unity supports .blend files directly: docs.unity3d.com/Manual/HOWTO-ImportObjectBlender.html $\endgroup$ Commented Feb 21, 2016 at 2:10
  • 1
    $\begingroup$ @aganm While transforms can be copy pasted between objects, I think that's not what you have in mind. Armatures seems the way to go for you. It's the most practical way to share animations. $\endgroup$ Commented Oct 10, 2020 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .