12
$\begingroup$

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:

enter image description here

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?

$\endgroup$
11
$\begingroup$

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

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):

enter image description here

$\endgroup$
  • $\begingroup$ 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 $\endgroup$ – Antonio Buch Jan 20 '15 at 12:59
  • $\begingroup$ 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. $\endgroup$ – maddin45 Jan 20 '15 at 13:05
  • 1
    $\begingroup$ @AntonioBuch recommend you watch: cgcookie.com/blender/cgc-courses/… to understand all the math :) $\endgroup$ – Greg Zaal Jan 20 '15 at 15:20
  • 1
    $\begingroup$ I'd also recommend watching this talk from the blender conference: youtu.be/kAUmLcXhUj0 $\endgroup$ – gandalf3 Jan 20 '15 at 22:22
  • $\begingroup$ 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. $\endgroup$ – ChameleonScales Dec 6 '16 at 17:12
8
$\begingroup$

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

enter image description here

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

$\endgroup$
  • $\begingroup$ Nice, that looks even cleaner and avoids splitting the coordinates. $\endgroup$ – maddin45 Jan 20 '15 at 13:06
  • $\begingroup$ does this work for more than just 4 repeats? $\endgroup$ – Greg Zaal Jan 20 '15 at 15:21
  • $\begingroup$ @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? $\endgroup$ – Leon Cheung Jan 20 '15 at 16:48
  • $\begingroup$ @LeonCheung It doesn't work for me when I'm tiling either by increasing the mapping scale or the UV projection scale :-/ $\endgroup$ – Antonio Buch Jan 21 '15 at 11:34
  • $\begingroup$ @AntonioBuch, Yes, like I said to GregZaal, it is not perfect. I'll try to figure it out. $\endgroup$ – Leon Cheung Jan 21 '15 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.