Search Unity

Timeline animate the shape of a sprite (similar to Flash's Shape Tween)

Discussion in 'Animation' started by oneuppedgames, Oct 15, 2014.

  1. oneuppedgames

    oneuppedgames

    Joined:
    Jul 30, 2013
    Posts:
    15
    Hi guys,

    I've been looking into this issue for some time now, and still haven't found a proper solution.
    What I'm trying to do is basically the following: (slightly) change the shape of a sprite by use of timeline animation (so no use of code or other solutions). For your (ex) Flash-developers. The thing I want to do is comparable with the Flash Shape Tween animation principle.

    I've looked into the current (2d) animation tools within Unity, and this seems to be impossible. Sprites have no direct shape property and when using a mesh with a texture (instead of a Sprite) I still seem to find no way to edit the mesh shape.

    Looking further into this issue, I've stumbled upon the 'Jelly Sprites' (http://jellysprites.blogspot.nl) which seems to be able to change the Sprite shape based on the collision of the Jellies (well actually based on the anchor points attached to the Sprite). As this specific animation (blob / jelly based animation) is exactly what I am trying to animate, I've downloaded the package. A quick review shows that they make use of a custom mesh which is then deformed using a script.

    The result is what I need (demo here: https://dl.dropboxusercontent.com/u/93519273/Jelly Sprites/Webplayer.html) , but the way to do this is not (I really want to animate myself instead of using a script, as the Sprite I will be using doesn't collide and are part of an animation).

    I've also looked into Spine, but this software also seems to ignore (not support) this feature.

    My question to you guys: can you help me find a solution? Is this even possible at all or do I really need to do this frame-by-frame? Are there any search words I am missing?

    Thank you in advance!
     
  2. oneuppedgames

    oneuppedgames

    Joined:
    Jul 30, 2013
    Posts:
    15
    A small kick. Anyone has any idea if this is possible?
     
  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Sorry oneup - It's kind of hard to understand what you want your end result to be because you start off mentioning flash but then reference a 'physically' based tool that allows for sprites to have dynamic skin, and you say your sprite won't collide but jelly sprites are directly linked to colliders in the scene - to give that soft fleshy look/feel, and is set up for real-time dynamics but you say you only want the solution to be for an animation.

    Why don't you just use flash - if you are comfortable with that software's workflow? Animate as you want and export the frames then create a sprite sheet for the final animation. Or since this is only for an animation - might as well just stay in flash.

    Maybe some clarification would help if using flash isn't the answer to your dilemma.
     
  4. oneuppedgames

    oneuppedgames

    Joined:
    Jul 30, 2013
    Posts:
    15
    @theANMATOR2b thanks for your reply, sorry for not responding earlier (it's been a while now). I've decided not to animate my sprites in the way I wanted, and used a different animation look-and-feel for my (past) project. As the project is done by now, this issue is no longer relevant. However, it would be awesome to know if this type of (timeline) animation is possible within Unity.

    What I am looking for is a shape tween (that what is was called in Flash). The idea is basically this:


    So the rectangle becomes a circle. This is an extreme example, but it shows a sprite being manipulated into another shape (something that JellySprites does as well!) I hope it's less confusing now :)
     
  5. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    As far as I know - no this is not possible. But I might be wrong. :)
    There are vector import tools on the asset store, and there are some spline tools on there as well, but as far as I know shape tweening is not something that Unity does.
    This can still be accomplished with the process I described above, but the technique is essentially creating animations of the shape changing into another shape in flash or another animation package.
    There might be a tool to help out on the store though - just not something I have looked into - because this can be accomplished in other packages or in Unity with an animated sprite sheet.
     
  6. Windresta

    Windresta

    Joined:
    Jan 22, 2014
    Posts:
    2
    I do think the shape tween is an algorithm on vector transform... It may be easily implemented for rectangle to circle, it is all about segmentation of edges/shapes, but shape tween in flash is more, if you start to use it like a number of shapes tween into one shape to make a fantastic mask effect.

    Unity do have custom implementation on vertices drawing. I have been implementing a series of codes for drawing primitives like the flash does.

    pS. I always argue that it is a feature of flash that have not been replaced until now.