1
$\begingroup$

I was wondering what would be the most straightforward way to create a procedural repeating cross/plus symbol material that is mapped to "generated" (and not UV).

They should also be separated.

I've searched as much as I could for such an example but found nothing.

Example:

enter image description here

$\endgroup$
1
  • $\begingroup$ Hello. Can you add a little more specificity? The method would differ if these should be continuous or separated, for example. Please edit your post, reference images help a lot. $\endgroup$ Sep 1, 2021 at 15:39

1 Answer 1

5
$\begingroup$

The problem is, with Generated (or Object) coordinates, such repeating patterns will always be stretched in one axis. If the texture repeats in the XY plane, the Z axis will be stretched. If the pattern repeats in all 3 axis, it doesn't map onto surfaces the way you want it, at all, because at that point, you'd be trying to sample a volumetric material onto a surface.

I will show how to do it with UV coords, and show why it doesn't work with Generated or Object coordinates.

First, this is the final result: You can use this black and white mask as a factor for any material.

enter image description here

And the node tree:

enter image description here

It looks complicated, but it's rather simple. But explaining all of it would turn this answer to a wall of text, so I suggest Ctrl+Shift+Left Clicking on each of the nodes using the Node Wrangler addon to see how each node contributes to create the final pattern. There are 3 controls: The number of crosses you want, the size of the crosses, and the thickness of the crosses. Size and thickness values go from 0 - 0.5 by default in the node tree with the value sliders.

And using UV coords, it works on all kind of meshes:

enter image description here

Now, why doesn't it work with Generated coords? To explain, I'll connect the shader to the Volume input instead of the Surface:

enter image description here

As you can see, it's just a bunch of cross shaped pillars. If you were to apply this to a surface, you'd get this:

enter image description here

Stretching on the Z axis. If you were to make the crosses repeat on the Z axis, as well, like so:

enter image description here

And map it onto a surface, you'd get this:

enter image description here

Doesn't really look like crosses, does it? Here's the .blend, regardless:

$\endgroup$
1
  • 2
    $\begingroup$ Oh, very nice! :) $\endgroup$ Sep 1, 2021 at 18:29

You must log in to answer this question.

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