Flipbook flickering over the v axes

I am currently working on a ocean shader which uses a flipbook for its displacement en normal. Since i haven’t seen anyone else on the forums or answerhub with this problem i’ll first go into detail of my material before i explain my problem.

I have a flipbook with 8x8 rows and columns input and a TexCoord node input. I output this flipbook into the uv’s of a spritescheet which i use for the world displacement. I also output the flipbook into the cordinates of the NormalFromHeightmap.node wich also uses the same spritesheet but as a T2d node, this function is the outputted into the normal map.

Now for the problem.
When i use this material i made on a large plane it seems to work fine until i give it a tiling by editing the TexCoord node on the flipbook function, what happens is that everything tiled over the V axes starts to flicker.

The things i have noticed so far:

  • the more it tiles over the V axes the more it starts to flicker (until it gets so much that it actually returns to normal (like a car wheel that seems to be still while it rotates very fast))
  • when i look closely it seems to use random frames from the flipbook over the original flipbook animation.
  • also the flip seems to overlap over 1 axes but only on the flickering overlay thingy.

I hope someone can help me, any help is appreciated.

1 Like

I have the same problem. Have you resolved it somehow?

Hi Blinkeye -

My first thoughts is that it could be a repeated tile on your Spritesheet. Check the first and last image of your flipbook and make sure that they are not identical. If they are make sure that you have set the Flipbook to use the 0 to .99 space instead of 0 to 1.

Also if you could post a short clip of the flickering that you encounter and a screenshot of your setup that would be helpful in pinpointing the exact problem.

Thank You

Eric Ketchum

Try doing a frac on your tiled TextureCoordinates before passing them to the flipbook function. The reason here is that the flipbook node only passes an animation offset for 1 frame, which means if you have tiling all frames except 1 are going to be recieving the wrong offset which means they jump rows at the wrong time and all sorts of badness. basically they just play randomly. Doing frac makes all the tiled frames at the same frame point so they play in sync.

If you need them out of sync, basically you need to build a mosaic grid of offset times and add that to time (animation phase) as well.

You may have some mipmap type seams when doing this depending on how close to the edge of each cell your texture information uses. If so its fixable using ComputeMipLevel but lets cross that bridge only if we have to.

1 Like

a minor comment, but the function “normal from heightmap” is a bit slow and not that high quality so you may get faster/nicer results by pre-baking your heightmap flipbook to a normalmap and then sampling the normal map as a flipbook texture as well.

Yup, its working :slight_smile: Frac on uvs is the answer. Thank you!