Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:04,880 --> 00:00:07,440
At this stage we have our
bricks in a grid pattern,
2
00:00:07,440 --> 00:00:10,560
but we actually want each row
to be offset, so let's do that!
3
00:00:12,000 --> 00:00:16,320
If we add some value to the X coordinate,
we can offset all the bricks horizontally,
4
00:00:16,320 --> 00:00:20,960
but we actually want to offset each row of bricks
differently. So to change the offset based on the
5
00:00:20,960 --> 00:00:27,680
vertical position, we can use the Y axis to drive
the offset. Let's add a Separate XYZ node, and
6
00:00:27,680 --> 00:00:33,360
connect it with Alt right click. Then we can add
a Combine XYZ node and connect it to the offset.
7
00:00:33,360 --> 00:00:38,320
Lastly, we connect the Y output to the X input,
so that the higher the vertical coordinate,
8
00:00:38,320 --> 00:00:43,840
the more offset the bricks will be. And we can
multiply the value to set the amount of offset.
9
00:00:47,680 --> 00:00:52,240
This looks kinda cool, but it's not exactly
what we want. The thing is that the Y value
10
00:00:52,240 --> 00:00:57,280
is changing within each brick, so the bricks also
get a varying offset. To deal with this, we can
11
00:00:57,280 --> 00:01:01,760
use the Floor operation that we used before, to
hold the values within the height of each row.
12
00:01:03,200 --> 00:01:06,800
We're getting closer, but the offset is
still not matching our brick height, and
13
00:01:06,800 --> 00:01:11,520
that's because this Floor operation is being done
before we scaled the Y coordinate of our bricks.
14
00:01:11,520 --> 00:01:16,000
If we take a look at the output, we can see how
the coordinates are being offset at every unit.
15
00:01:19,840 --> 00:01:23,680
Let's turn this into a group, so that we
can easily add it inside the bricks setup.
16
00:01:24,800 --> 00:01:31,120
Let's not forget to add a Reroute to avoid
duplicate inputs, and then we can Ctrl+G. And
17
00:01:31,120 --> 00:01:38,640
tabbing out, we can name it. We can get rid of
it for now, and then tab into our Bricks group,
18
00:01:38,640 --> 00:01:42,720
and place it after the transformation.
Adding a Reroute can be helpful,
19
00:01:42,720 --> 00:01:48,960
to easily place the new node on both connections
at once. Sometimes it doesn't update right away,
20
00:01:48,960 --> 00:01:52,080
but then you just need to change a
value for the shader to actually update.
21
00:01:53,520 --> 00:01:57,840
Now the offset is working exactly as
expected, and if we set it to 0.5,
22
00:01:57,840 --> 00:02:01,920
it works exactly like a standard brick
pattern, with every other row offset by
23
00:02:01,920 --> 00:02:06,720
half a brick. But when it comes to shaders,
we all know that the less neat something is,
24
00:02:06,720 --> 00:02:10,320
the cooler it looks, so let's actually
mess up this perfect brickwork!
25
00:02:11,520 --> 00:02:16,800
To offset each row by a random amount, we can use
the White Noise node like we used before, but this
26
00:02:16,800 --> 00:02:21,840
time, instead of generating a random value per
brick, we'll generate a random value per row.
27
00:02:22,880 --> 00:02:26,880
As we are inputting just the single Y
value here, we want to set it to 1D.
28
00:02:30,400 --> 00:02:32,720
Now, here we have our random rows.
29
00:02:32,720 --> 00:02:36,960
Let's just Tab out for a bit, and remember to
select a node that is not a group, when tabbing
30
00:02:36,960 --> 00:02:41,840
out, to avoid entering the selected group instead.
Then we can set the viewer to the final output
31
00:02:41,840 --> 00:02:48,560
again, and Tab back into our two groups. Now, once
we plug this in, the bricks have a random offset.
32
00:02:49,360 --> 00:02:53,600
When we change the intensity of the offset,
we see that all bricks move in one direction,
33
00:02:53,600 --> 00:02:57,280
and that's because the random values are
all positive values between zero and one.
34
00:02:58,480 --> 00:03:01,360
This doesn't really matter, but
just for the sake of completeness,
35
00:03:01,360 --> 00:03:05,040
let's subtract 0.5, so that our
average movement stays centered.
36
00:03:09,200 --> 00:03:14,240
Now we can expose this offset intensity as a group
input, so that we can control it from outside.
37
00:03:15,120 --> 00:03:17,840
Let's name it, and tidy up our group.
38
00:03:27,600 --> 00:03:33,760
Tabbing out of the offset group, we can
tidy up in here as well, and let's not
39
00:03:33,760 --> 00:03:38,400
forget to expose the offset once again, so that
we can access it all the way from the outside.
40
00:03:42,800 --> 00:03:55,200
Then we can choose a value that looks
nice, and that is our randomized offset!
5095
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.