Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:04,960 --> 00:00:07,040
With our scene set up, let's get started.
2
00:00:07,840 --> 00:00:10,080
First, we need a Texture Coordinate node.
3
00:00:10,080 --> 00:00:14,160
Let's use the Object texture coordinate, as
it is aligned with the object transformation,
4
00:00:14,160 --> 00:00:17,920
so whenever we transform our object, the
coordinates will be carried along with it.
5
00:00:19,040 --> 00:00:22,880
We've been looking at the texture coordinates
as vectors, but we can also think of them as
6
00:00:22,880 --> 00:00:27,360
each individual component of the vector being
an infinite gradient along one of the axes.
7
00:00:28,160 --> 00:00:32,000
We can access these components
with the Separate XYZ node.
8
00:00:32,000 --> 00:00:35,920
Here we can see each component's gradient.
Though there is not much going on with Z,
9
00:00:35,920 --> 00:00:39,840
as the whole mesh has a Z value
of zero, being on the XY plane.
10
00:00:39,840 --> 00:00:44,880
To create our bricks, we need a repeating pattern,
kinda like an array modifier. For this we can use
11
00:00:44,880 --> 00:00:49,840
the Fraction operation of the Math node, which
tells us how far a value is from the first integer
12
00:00:49,840 --> 00:00:55,120
below it. Basically discarding the integer portion
of the value, and just keeping the decimal part.
13
00:00:56,880 --> 00:01:02,080
If we do the same thing for the Y axis, and join
the resulting coordinates with a Combine XYZ node,
14
00:01:02,080 --> 00:01:06,800
we get repeating coordinates that are effectively
UVs of squares with a size of one unit.
15
00:01:07,520 --> 00:01:09,920
This setup was good for
understanding what's going on,
16
00:01:09,920 --> 00:01:13,120
but let's get rid of the whole thing,
because a much easier way to do this,
17
00:01:13,120 --> 00:01:17,520
is using the Vector Math node, which allows us
to do a bunch of vector-specific operations,
18
00:01:17,520 --> 00:01:22,480
but also allows us to apply many scalar
operations to all three vector components at once.
19
00:01:23,440 --> 00:01:28,240
This new method created some artifacts. Let's
use a Separate XYZ node to inspect this.
20
00:01:28,880 --> 00:01:32,880
Everything is fine with the X and Y channels,
but clearly the issue is in the Z channel.
21
00:01:33,440 --> 00:01:38,000
The problem is that, due to precision issues,
whenever Eevee samples a point on the surface,
22
00:01:38,000 --> 00:01:42,480
it can come up with a value slightly above
or below zero, and because our function
23
00:01:42,480 --> 00:01:47,600
is discontinuous at integers, this makes the
output jump between almost zero and almost one.
24
00:01:49,920 --> 00:01:54,080
To fix this problem, in this case we can
just multiply the Z coordinate by zero,
25
00:01:54,080 --> 00:01:58,960
as we are dealing with a plane. A useful tip
is to regularly orbit around the viewport,
26
00:01:58,960 --> 00:02:01,840
as these kinds of issues don't
always show up in certain views,
27
00:02:01,840 --> 00:02:04,400
or at least are more difficult
to spot with a static view.
28
00:02:05,520 --> 00:02:09,840
This tiled pattern will allow us to repeat
whatever we do across all tiles identically,
29
00:02:09,840 --> 00:02:14,240
but we might also want to uniquely identify
each tile, to be able to add variation,
30
00:02:14,240 --> 00:02:16,160
and for that we can use a Floor operation.
31
00:02:18,320 --> 00:02:24,080
This will give us a constant unique value for each
tile. In fact, this is the complementary operation
32
00:02:24,080 --> 00:02:29,200
to the Fraction, as it gives us the first integer
below a value, discarding the decimal part.
33
00:02:29,760 --> 00:02:33,360
And indeed, adding these together, will
give us back the original coordinates.
34
00:02:35,280 --> 00:02:39,360
One more thing we will need is a random
value for each tile. We can later use
35
00:02:39,360 --> 00:02:43,920
this to randomize things like shape and color.
For this we can apply a White Noise texture to
36
00:02:43,920 --> 00:02:49,280
the tile indices, which generates a completely
independent random output for any input value,
37
00:02:49,280 --> 00:02:52,160
meaning that no matter how
close two input values are,
38
00:02:52,160 --> 00:02:55,600
unless they are exactly the same, the
outputs will be completely different.
39
00:02:56,320 --> 00:03:01,760
Here again we see a precision issue, and it is
again a problem with the Z channel. We multiplied
40
00:03:01,760 --> 00:03:06,160
the Z channel by zero, but here we still get
a precision issue, because due the way numbers
41
00:03:06,160 --> 00:03:11,600
are handled, a value of zero can be positive,
or negative, leading to different results. But
42
00:03:11,600 --> 00:03:15,680
as we don't need the Z channel anyway, we
can just switch the Noise from 3D to 2D,
43
00:03:15,680 --> 00:03:20,080
making it ignore the Z channel, which incidentally
also makes the computation slightly cheaper.
44
00:03:20,960 --> 00:03:24,880
We can now turn this basic tiling setup
into a convenient node group, with Ctrl+G.
45
00:03:25,840 --> 00:03:29,920
If we just group the nodes like this, we get
the same input coming into the group twice,
46
00:03:29,920 --> 00:03:35,200
as Blender handles each connection separately. So
let's undo that, and first join these connections
47
00:03:35,200 --> 00:03:39,120
with a Reroute, using Shift right click
and drag, and with it selected as well,
48
00:03:39,120 --> 00:03:44,160
we can now create the group. Then it is just
a matter of connecting the remaining outputs.
49
00:03:44,720 --> 00:03:48,960
The random output creates a Color socket,
but I prefer to use a Vector socket,
50
00:03:48,960 --> 00:03:51,600
by first connecting it to another Vector socket.
51
00:03:51,600 --> 00:03:55,760
Doing this is not necessary, but I like to
do it as this is a utility value, and this
52
00:03:55,760 --> 00:03:59,840
makes it easier for us not to confuse it with
something that we actually want to use for color.
53
00:04:00,640 --> 00:04:04,000
With the sockets sorted, let's just
give everything some proper names.
54
00:04:04,720 --> 00:04:09,200
The first socket is our main coordinate, so vector
is already a reasonable name, given that it's
55
00:04:09,200 --> 00:04:14,240
pretty much a standard across Blender. The second
socket is our floored coordinate, that we'll use
56
00:04:14,240 --> 00:04:20,000
for accessing each brick by index. And lastly, we
have the random value from the White Noise node.
57
00:04:20,000 --> 00:04:22,480
Now let's Tab out, and we
can name the group itself.
58
00:04:23,440 --> 00:04:27,760
Lastly, it would be nice if our bricks weren't
just squares, so tabbing back into the group,
59
00:04:27,760 --> 00:04:32,400
let's add a Vector Multiply node in here, so
that we can independently scale each axis.
60
00:04:35,680 --> 00:04:40,960
And to make it more convenient, we can use a
Combine XYZ node, fix the X value to one, and
61
00:04:40,960 --> 00:04:46,320
only expose the Y value to the group, allowing us
to control the brick's ratio with a single value.
62
00:04:48,960 --> 00:04:55,840
Then we can neaten everything up by holding Ctrl
while moving the nodes, to snap to the grid.
63
00:05:02,160 --> 00:05:09,760
Finally we can set our desired brick ratio.
7956
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.