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

2D character animations in Unity?

Discussion in 'Editor & General Support' started by Rainville, Oct 25, 2009.

  1. Rainville

    Rainville

    Joined:
    Aug 18, 2009
    Posts:
    45
    Hi!

    I found the 2D platformer tutorial very useful and intesting, but I was wondering if I could take the whole 2D thing a step further by having 2D characters.

    So my question is twofold.

    1. Assuming I've never done any 2D animation, what program would allow me to grab a bunch of images (ie: frames) and put them together so that Unity will read them as animations, making them no different from a regular 3D animation (except flat). I figure something like photoshop would be ideal since it would be able to read anything from pixelated characters to photographic images (to make stop-motion animations!) but I'm not sure if PS has an option of transforming the bulk of the photos into an animation rig to play in Unity.

    2. Once I've recorded these animations and brought them into Unity, how would I make that model the controllable character?
    Would I import the animations, give them some type of mesh collider, then attach some 2D walker script so that (for example) pressing right on the keyboard would make the gameobject move to the right while playing the consecutive frames/animations of the character walking to the right?

    This is what I want to do, I'm just not sure how to make different frames from an image play in an animation-like order in Unity. Which is why I'm asking if I would be doing that in an external program.

    Thanks a lot. Please let me know if I'm being cryptic and more clarifications are in order!
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Since a few days, my recommendation for 2D animation with Unity is definitely Sprite Manager 2! It will combine distinct images onto texture atlases and even save you space as you can use non power of 2 image sizes.

    You can find its thread at http://forum.unity3d.com/viewtopic.php?p=215970
     
  3. Rainville

    Rainville

    Joined:
    Aug 18, 2009
    Posts:
    45

    hmm that looks really interesting thanks! Any limit to the picture quality of the sprites? Reason I ask is because, well, what if they weren't sprites at all and actually (semi) hi-res photographs (to make a stop motion character)?

    Man... that's looking really interesting, thanks :)
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    You are restricted to what the hardware offers basically.
    High res can be too high res to be used as texture, depending on what you mean by high res.
     
  5. Rainville

    Rainville

    Joined:
    Aug 18, 2009
    Posts:
    45
    Well by high-res I guess I just mean anything beyond Super Mario World :p

    I'm interested in doing some claymation. If I was to do that, then import it into Unity (with Sprite Manager 2), would it be high enough quality to look like claymation?

    for example:



    Would that sort of picture quality be doable?
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    easy.

    With SpriteManager 2 its a checkbox and images will be shown in 1:1 pixel ratio and as such look the way you created them.