Search Unity

How to use animation curve in Flipbook player? Curve is ignored all the time

Discussion in 'Visual Effect Graph' started by sergiusz308, Feb 10, 2020.

  1. sergiusz308

    sergiusz308

    Joined:
    Aug 23, 2016
    Posts:
    235
    Hi there, so I have flipbook blend for output node and flipbook player for update node.

    If flipbook player set to constant frame rate - it works.

    If I pick a curve though - it always shows first frame, no matter what curve I create it always shows first frame.

    upload_2020-2-11_0-35-47.png

    In this example curve is descending, but it makes no difference

    upload_2020-2-11_0-37-20.png

    Whatever I put there - always first frame is displayed until particle dies.

    Thanks,
    S.
     
  2. ThomasVFX

    ThomasVFX

    Joined:
    Jan 14, 2016
    Posts:
    45
    This seems pretty suspicious indeed. I haven't been able to reproduce your issue in the latest 7.2.0 package. If you can, could you file a bug to us using the bug reporter so we can investigate on your file?

    Thank you
     
  3. sergiusz308

    sergiusz308

    Joined:
    Aug 23, 2016
    Posts:
    235
    @ThomasVFX I'll try to reproduce it with 7.2.0 and will update here - thanks for replying!
     
  4. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hi @sergiusz308 ,
    Is the curve set to a range of 0 to 1? If so, based on your screenshot, the flipbook size is 2x2, so the curve should probably go from 0 to 4 to get all the frames.

     

    Attached Files:

  5. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    I can confirm that! My 6x6 sheet I had to set the last point to (1, 36).
    Although there is an issue, when I for example change the first point to (0,24) It will still start with frame 1 but starts to loop at the end. So t = 1 will not be Frame 36, but 23 potentially, while t=0 it uses frame 0.

    Also when you set (0,36) and (1,0) you get ta rather better result than when using (0,0) and (1,36). I don't get how this functions...
     
    Last edited: Mar 20, 2020
  6. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    The curve in the flipbook player does not specify the frame index but the frame rate at a given time.

    If you want to specify the frame index from particle life time you need to use a Set TexIndex From Curve block instead. Basically manipulating texIndex attribute directly which specifies the current frames to use
     
    FlightOfOne likes this.