# How to get mirrored tiling in Cycles?

I'm trying to make a texture tiling mirrored as you can do in Internal. It seems that it's not so easy in Cycles. I want this:

Note that besides the A1 square you can see the same square mirrored, as well as in the G8 one and any other square in the texture's limit.

Is there any way to achieve this in Cycles?

Blender 2.82 added a new Pingpong mode to the Math node, which simplifies maddin45's answer. Make sure to set the scale on the Pingpong nodes to 1.0.

• Is there a way to make this apply to the UVs after they've been affected by a UV Warp modifier? Dec 11, 2020 at 3:00
• @ArrowCase The UVs coming out of the UV Map node already have the UV Wrap modifier, so this does apply after the UV Wrap. Dec 12, 2020 at 14:37

You can achieve this usign math nodes:
Click for full size

Edit: I have just seen you can even leave out the modulo operation. I thought it would make the coordinates repeat between 0 and 1 but it just does nothing.

Here is the .blend file for you.

What this node setup does is basically flip the UV coordinates when the image border is reached.

Result (with multiple flips):

• Thanks! It works perfectly, even better than Internal! :D Just a little more question, how you can even made that node setup from scratch? It's crazy :P Jan 20, 2015 at 12:59
• Well, I just thought about what happens to the texture coordinates and translated that to math nodes ;) And I had to solve similar problems for an image processing lecture, so I already had a rough structure for the calculations in my head. Jan 20, 2015 at 13:05
• @AntonioBuch recommend you watch: cgcookie.com/blender/cgc-courses/… to understand all the math :) Jan 20, 2015 at 15:20
• I'd also recommend watching this talk from the blender conference: youtu.be/kAUmLcXhUj0
– gandalf3
Jan 20, 2015 at 22:22
• That's awesome, but took me a while to notice that the second input of the power node is used instead of the first. Also your .blend file is no longer available. Try the blender stack exchange dedicated server. Dec 6, 2016 at 17:12

I would propose a simpler set-up, pay attention to the highlighted values:

It basically uses two Mapping nodes and one Vector Math node. Note that the first mapping node is optional, just for pre-transformation:

• Nice, that looks even cleaner and avoids splitting the coordinates. Jan 20, 2015 at 13:06
• does this work for more than just 4 repeats? Jan 20, 2015 at 15:21
• @GregZaal Right, I admit the current result is not exactly the same one as BI does. I think maddin45 got better point. Btw, do you think it is still possible by following my idea? Jan 20, 2015 at 16:48
• @LeonCheung It doesn't work for me when I'm tiling either by increasing the mapping scale or the UV projection scale :-/ Jan 21, 2015 at 11:34
• @AntonioBuch, Yes, like I said to GregZaal, it is not perfect. I'll try to figure it out. Jan 21, 2015 at 15:40

Update December 2022

In Blender 3.5, the Image Texture node has a new mirror extension type (see here). So you can finally just set the Texture node to "Mirror".