Search Unity

Shader Graph Tiling a Flipbook

Discussion in 'Shaders' started by apiotuch, Jan 27, 2019.

  1. apiotuch

    apiotuch

    Joined:
    Oct 8, 2009
    Posts:
    42
    So I managed to get a flip book to animate in the HDRP shader graph. My issue is though, when I want to have the texture repeat, it won't animate in the correct sequence. I have tried feeding the flipbook output into a tiling node, I also tried feeding a tiling node output into the UV input of the flipbook. Neither strategy works.

    Does unity know of this issue, or is there a roundabout way to get a flip book to repeat. I was trying to follow an amplify tutorial, but that graph has its own issues when attempting the same effect. I'm thinking of just scripting it if there is no solution.



    This is the issue. the top left digit animates correctly but the rest do not count in sequence. Ideally I would want them to be staggered as long as they count in the correct sequence. But it is okay if they all are in phase with eachother.

     
    Last edited: Jan 27, 2019
  2. apiotuch

    apiotuch

    Joined:
    Oct 8, 2009
    Posts:
    42
    This is my PBR shader graph. This partially works. I have a 16 tiles in an image that successfully counts from 1 to 16 and repeats as long as the UV is set to fill the entire space. I set Tile count to 16 to achieve this. My sprite width is set to 4 (for a 1024 x 1024 texture).

    upload_2019-1-27_10-2-35.png

    This is my sprite sheet which I use as my albedo:

    test flipbook.png
     
    Last edited: Jan 28, 2019
  3. PolyToots

    PolyToots

    Joined:
    Mar 15, 2014
    Posts:
    14
    Hey, I realise this is a bit of an old thread, but for the tiling just throw in a Fraction node. Also not sure how you're handling the time/cycles but you only need to introduce a Round node. I've done a tutorial on exactly this, tiling a raindrop ripple flipbook texture sheet, hope it's okay to post:

     
unityunity