Tiling an Animated Texture
March 2001

As an addition to my tip about looping a procedural, here's a way to get an animated texture to tile seamlessly, across both U and V. Being a firm believer in Occam's razor, I'm posting this in the hope that someone will point out a better method.

1) Create an animated texture. See this post. Render the texture as a movie file, name it foo.

2) In 3ds Max, make a composite map with 4 slots. Put foo in the 1st slot, and feed it a U offset of .5.

3) In the 2nd slot grab a mask map. Put foo in the map channel, and the following texture in the mask channel:

This mask takes the middle of the animated texture and blends it overtop the left and right sides, to tile on U.

4) Copy the mask map from the 2nd slot to the 3rd & 4th slots.

5) Change foo in the 3rd slot so it has a V Offset of .5, no U offset. Switch the mask map to this texture:

This does the same thing as the other one, on V instead.

6) In the 4th slot, cram a .5 value in foo's U and V Offsets. Change the mask map to this:

This fixes any tiling problems in the corners, although I guess if the other two masks were perfect, you wouldn't need this one. I kept getting little star patterns in the corners where the mask pixels overlap slightly.

7) Go to the composite level in your material, right click to render your tiled movie. Here's an example (131KB QT) animated tile, and here's a render test (275KB QT) with a reflection map applied.

This trick works best with uniformly-colored textures with a fairly small pattern. The edges tend to fall apart if you have large areas of color in your map, since they won't tile too well to begin with. Also you have to feed it a rendered texture, not a raw procedural, since the procedural's middle doesn't get wrapped around when it's offset.

If you've made it this far, chime in. Is there an easier way?


Oh yeah, it HAS to be named foo.