Announcement

Collapse
No announcement yet.

Adding variance to Flipbook animation - impossible without glitches?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding variance to Flipbook animation - impossible without glitches?

    Hey, I have a simple (4 frames) flipbook animation of a branch with moving leaves. I've created a setup that plays this back and forth and it works:



    ... But as you can see, it doesn't look natural (all the leaves are moving using the same sine value). So I've thought about adding some variance by using perlin noise like that:

    Click image for larger version

Name:	flipbookProblem.jpg
Views:	1
Size:	195.5 KB
ID:	1217483

    ... And it works really well, but with visible artifacts:



    I've tried many things to make them disappear, but without luck. The only thing that helped is the 'Dither Opacity Mask' checkbox in the material - it minimizes the artifacts, but they're still visible.

    Is there a way to fix this? Or maybe add animation variance in some other way? I've spent almost entire day trying to add variance to this animation and now I feel like my brain just turned into scrambled eggs
    I've also tried masking the perlin noise by the leaf opacity mask - but this way the artifacts still appear on the un-masked part.
    ... And I've also tried adding variance by using world position, but this gives the same effect, just with differently shaped artifacts.

    ... Here is my little test project (2MB) with this material and test plane: https://www.dropbox.com/s/0ms0x1x859...facts.rar?dl=0

    Update: I've just discovered the SubUV Function, maybe it will behave differently, but I'm still figuring out how to use it.
    Update2: ... OK, same artifacts with the SUbUV Function, unfortunately.
    Attached Files
    Last edited by Slavq; 05-01-2017, 05:43 AM. Reason: Additional info

    #2
    You will need to change the function inputs to specify MipLevel. That means changing both the bool and the mip inputs. When different parts of the same surface read different frames of the subUV, the graphics hardware sees a large change in UV tiling and assume there must be a very blurry sample there.

    A better solution would be to change the interior texture samples to user Derivative sampling mode and pass in the DDX,DDY from the UVs.
    Ryan Brucks
    Principal Technical Artist, Epic Games

    Comment


      #3
      Originally posted by RyanB View Post
      You will need to change the function inputs to specify MipLevel. That means changing both the bool and the mip inputs. When different parts of the same surface read different frames of the subUV, the graphics hardware sees a large change in UV tiling and assume there must be a very blurry sample there.

      A better solution would be to change the interior texture samples to user Derivative sampling mode and pass in the DDX,DDY from the UVs.
      Thank you very much, I've changed the texture samples MipValueMode and it fixed the artifacts. By the way, plugging in the DDX and DDY (Derivative mode) resulted in blurry texture and jagged edges, but setting it to 'MipLevel (absolute, 0 is full resolution)' fixed it.

      Comment


        #4
        To plug in DDX and DDY, you would need to make sure to use UVs at the proper scale that the flipbook is sampled at. For example, if the flipbook layout was 8x8 frames you would do UV / (8,8) first.
        Ryan Brucks
        Principal Technical Artist, Epic Games

        Comment


          #5
          Oh, that did the trick - I guess that plugging in the DDX & DDY is better than just selecting the 'MipLevel (absolute, 0 is full resolution)', because its tooltip says that it disables anisotropic filtering Thanks again!

          Comment

          Working...
          X