Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
With our scene set up, let's get started.
First, we need a Texture Coordinate node.
Let's use the Object texture coordinate, as it is aligned with the object transformation,
so whenever we transform our object, the coordinates will be carried along with it.
We've been looking at the texture coordinates as vectors, but we can also think of them as
each individual component of the vector being an infinite gradient along one of the axes.
We can access these components with the Separate XYZ node.
Here we can see each component's gradient. Though there is not much going on with Z,
as the whole mesh has a Z value of zero, being on the XY plane.
To create our bricks, we need a repeating pattern, kinda like an array modifier. For this we can use
the Fraction operation of the Math node, which tells us how far a value is from the first integer
below it. Basically discarding the integer portion of the value, and just keeping the decimal part.
If we do the same thing for the Y axis, and join the resulting coordinates with a Combine XYZ node,
we get repeating coordinates that are effectively UVs of squares with a size of one unit.
This setup was good for understanding what's going on,
but let's get rid of the whole thing, because a much easier way to do this,
is using the Vector Math node, which allows us to do a bunch of vector-specific operations,
but also allows us to apply many scalar operations to all three vector components at once.
This new method created some artifacts. Let's use a Separate XYZ node to inspect this.
Everything is fine with the X and Y channels, but clearly the issue is in the Z channel.
The problem is that, due to precision issues, whenever Eevee samples a point on the surface,
it can come up with a value slightly above or below zero, and because our function
is discontinuous at integers, this makes the output jump between almost zero and almost one.
To fix this problem, in this case we can just multiply the Z coordinate by zero,
as we are dealing with a plane. A useful tip is to regularly orbit around the viewport,
as these kinds of issues don't always show up in certain views,
or at least are more difficult to spot with a static view.
This tiled pattern will allow us to repeat whatever we do across all tiles identically,
but we might also want to uniquely identify each tile, to be able to add variation,
and for that we can use a Floor operation.
This will give us a constant unique value for each tile. In fact, this is the complementary operation
to the Fraction, as it gives us the first integer below a value, discarding the decimal part.
And indeed, adding these together, will give us back the original coordinates.
One more thing we will need is a random value for each tile. We can later use
this to randomize things like shape and color. For this we can apply a White Noise texture to
the tile indices, which generates a completely independent random output for any input value,
meaning that no matter how close two input values are,
unless they are exactly the same, the outputs will be completely different.
Here again we see a precision issue, and it is again a problem with the Z channel. We multiplied
the Z channel by zero, but here we still get a precision issue, because due the way numbers
are handled, a value of zero can be positive, or negative, leading to different results. But
as we don't need the Z channel anyway, we can just switch the Noise from 3D to 2D,
making it ignore the Z channel, which incidentally also makes the computation slightly cheaper.
We can now turn this basic tiling setup into a convenient node group, with Ctrl+G.
If we just group the nodes like this, we get the same input coming into the group twice,
as Blender handles each connection separately. So let's undo that, and first join these connections
with a Reroute, using Shift right click and drag, and with it selected as well,
we can now create the group. Then it is just a matter of connecting the remaining outputs.
The random output creates a Color socket, but I prefer to use a Vector socket,
by first connecting it to another Vector socket.
Doing this is not necessary, but I like to do it as this is a utility value, and this
makes it easier for us not to confuse it with something that we actually want to use for color.
With the sockets sorted, let's just give everything some proper names.
The first socket is our main coordinate, so vector is already a reasonable name, given that it's
pretty much a standard across Blender. The second socket is our floored coordinate, that we'll use
for accessing each brick by index. And lastly, we have the random value from the White Noise node.
Now let's Tab out, and we can name the group itself.
Lastly, it would be nice if our bricks weren't just squares, so tabbing back into the group,
let's add a Vector Multiply node in here, so that we can independently scale each axis.
And to make it more convenient, we can use a Combine XYZ node, fix the X value to one, and
only expose the Y value to the group, allowing us to control the brick's ratio with a single value.
Then we can neaten everything up by holding Ctrl while moving the nodes, to snap to the grid.
Finally we can set our desired brick ratio.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.