2
$\begingroup$

I'm new to Blender. I need a texture with offset 'bricks', so I found the brick texture node to be exactly what I needed, the only problem is that it works by blending two colors/textures, whereas I'd like to keep the inputs 'pure' (not mixed).

This is because my brick color inputs are two textures of the same tile, with the only difference being their x-offset in a mapping node (one of two is offset by 50%).

Almost like a checker texture with brick-like offsets. I need this to make a flooring material starting from a 1-tile sample.

Starting tile texture:

enter image description here

Desired result:

enter image description here

I've tried a few solutions but I'm ultimately unable to solve this. I'd like to make it without any additional hand-made textures to keep the result procedural.

$\endgroup$

1 Answer 1

3
$\begingroup$

You need to understand how UV coordinates work for this. Every vertex has such a pair of two numbers that get interpolated across the mesh. Suppose you have a square made out of four vertices with the shown UV coordinates:

enter image description here

The bottom left of your image will always get mapped to (0.0, 0.0) and the upper right to (1.0, 1.0). If the UV coordinates exceed these bounds, the image will get tiled, which means copies will get mapped to (1.0, 1.0) -> (2.0, 2.0) etc. This means, you can simply multiply (scale) the the UV coordinates by using a mapping node and your texture will get projected onto the mesh multiple times:

enter image description here.

The only thing missing is the shift. For this, you want to copy your mapping node and input some value in the location x field. Then, create a MixRGB node which will choose when to use which mapping depending on some parameter. To create this parameter, you want to devide the scaled V coordinate by 2, take the fraction of it (which bastically is the rest when devided by 1) and see at which points it is greater than 0.5:

enter image description here

All that is left to do is to plug this output parameter into the MixRGB node, connect the two mapping nodes to it, if you haven't done so already and change the location x input of the second mapping node to your liking.

$\endgroup$
3
  • $\begingroup$ There is "understand UV coordinates" and then there's this :). Great answer, learned a lot here :). $\endgroup$ Commented Jul 11, 2020 at 19:10
  • $\begingroup$ And since you're here, this question could really benefit from your experience :). $\endgroup$ Commented Jul 11, 2020 at 19:23
  • $\begingroup$ This is a fantastic answer!! Thank you so much $\endgroup$ Commented Jul 12, 2020 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .