# How to use Image Mapping to repeat cut-in-half textures with X and Y in Cycles?

thank you for your time, the method works but not for every model

• I think you have edited your question and replaced it with a comment, losing the original question. If the previously accepted answer works for your original situation but not for new ones then you should create a new question for the new situation, linking to this original question. – Rich Sedman Aug 1 '18 at 6:35

To mirror the texture you can split the UV Coordinates using a Separate XYZ node and then manipulate them using Maths nodes.

The UV and Image Texture range is from 0.0 to 1.0 and so you can mirror one side by Subtracting 0.5 (so it's from -0.5 to 0.5), applying Absolute (so negatives become positive) and Adding the 0.5 back in (so the range ends at 1.0) as follows :

To mirror the opposite side you can simply add another Subtract node to subtract the result from 1.0 to reverse the range :

EDIT The above solution assumes that the UV map is covering the entire 'face' of your model - ie, with the 'mirror' at 0.5 of the UV map. If this is not the case (eg, if the centre line is actually at 1.0) then you can simply use Mapping nodes to shift/scale the range before the mirroring and shift/scale back again afterwards.

For example, consider the following UV map for Suzanne :

Note how the 'centre-line' is at U = 1.0, rather than 0.5. For this we can use the following nodes to achieve the mirroring :

Note how the first mapping nodes scales by 0.5 in the X direction (note that it's in 'Point' mode - if using 'Texture' node, invert the scale to 1/0.5 = 2.0 instead). The final mapping node reverses the scale.

This produces the following result :

• I think I’ve spotted the problem - you’ve connected to the second input of the Absolute maths node - it should be connected to the top one. Hopefully this will fix your problem. Note that in my example I’d hidden the unconnected sockets with Ctrl-H which make it difficult to see that it should be the top one that's connected. – Rich Sedman Feb 12 '18 at 22:30
• How is it UV unwrapped - I’ve assumed the whole face is unwrapped as one withing UV space and with yhe centre-line at 0.5. Could you share your Blend or at least details of your UV map? – Rich Sedman Feb 12 '18 at 22:41
• Ah, here it is unwrapped, by the way. (Image: i.imgur.com/puBoqQV.png ) The reason it's UV's are strange is because Nintendo tends to use mirroring in their textures to save space for the games files. – user48578 Feb 12 '18 at 23:47
• I see - in which case you can work around it by using the Mapping node to rescale before and after the mirror operation. See the edit. Essentially, the first solution assumed the mirror line was at 0.5 but actually the mirror is at 1.0. The Mapping node scales the range so it's mirrored in the middle of the UV 0.0 to 1.0 range. The final mapping node scales it back again. – Rich Sedman Feb 12 '18 at 23:56
• It works like a charm! The texture is now mirrored. There's just... one more smaller problem though. There's a big line smack in the middle. (Image: i.imgur.com/RKz8eI9.png ) How can I fix that? – user48578 Feb 13 '18 at 0:10

If you don't want to do a complicated node setup to mirror the texture, you can also simply mirror the geometry. For example, if you model just the left half like this (sorry, this is a super rough approximation of your model):

Add a Mirror modifier, and make sure the UV checkboxes are unchecked:

UV it and voila:

So, in your case you can probably just delete the right half of the geometry and add the Mirror modifier.