Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Animator animating material?

Discussion in 'Animation' started by LightStriker, May 12, 2014.

  1. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    I know the pipeline support animating Sprite Renderer for 2D...

    What I need here, is to animate a spritesheet applied to a 3D mesh.
    We have a mesh for the eyes and eye lids of a character. We want to animate that facial expression using a spritesheet. However, after a few research, I have the feeling the Animator support 3D OR 2D, but not 2D on 3D Mesh...

    Is there any solution here?
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    You can animate the tiling offset of the material on the renderer; would that do the trick?
     
  3. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    That would be rather painful to redo everytime your spritesheet changes...
     
  4. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    There is no distinction for the animator between 2d and 3d, at then end the animator evaluate animation curve and blend them togheter.

    For 2d the animation curve is a PPtr curve with allow us to animate any reference.

    That been said there is no built-in component that can do that in Unity

    But you could write your own component(MonoBehavior) that has Sprite property
    animate that property
    then the component script needs to do stuff to get that sprite onto that mesh manually
    Sprite comes with uv information so it can be done.

    Best regards,
    Sonny