Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,960 --> 00:00:03,920
To create more variation let's
add some rows of headers.
2
00:00:04,560 --> 00:00:09,440
Normally the headers would be spaced regularly,
but as we are building a poorly constructed wall,
3
00:00:09,440 --> 00:00:12,000
let's suppose that the header
bonds were just laid randomly.
4
00:00:12,880 --> 00:00:16,800
We could change the size of the bricks by
adjusting the scaling in the Bricks group,
5
00:00:16,800 --> 00:00:21,520
but in the Offset group we already have a White
Noise to get our randomness from, so let's set it
6
00:00:21,520 --> 00:00:30,240
up there instead. Just like in the Bricks group,
we can add a multiplier here to change the size.
7
00:00:30,240 --> 00:00:34,720
Now we again add a Combine XYZ, but we
don't want to take the same value from
8
00:00:34,720 --> 00:00:38,000
the White Noise, as that would couple
the offset and brick size together.
9
00:00:40,560 --> 00:00:44,800
Instead, we use a Separate RGB, to get
another channel from the White Noise.
10
00:00:46,960 --> 00:00:50,240
The Red channel is always
the same as the Value output,
11
00:00:50,240 --> 00:00:52,640
but we have two extra
channels with different seeds.
12
00:00:53,440 --> 00:00:58,720
So we can, for example, take the Green output. But
we don't want to just plug this into our scaling,
13
00:00:58,720 --> 00:01:03,760
as we don't want the bricks to be randomly
sized, instead, we just want two different sizes.
14
00:01:03,760 --> 00:01:07,520
So we need a binary operation that
will give us some rows of one size,
15
00:01:07,520 --> 00:01:11,520
and some rows of another. For this, we
can again use a Less Than operation.
16
00:01:11,520 --> 00:01:15,520
This let's us conveniently specify how
many of the rows should have each size.
17
00:01:16,320 --> 00:01:21,200
The values output from the White Noise, follow
a uniform distribution between zero and one,
18
00:01:21,200 --> 00:01:25,760
this means that any value between zero
and one is equally likely to be output.
19
00:01:25,760 --> 00:01:30,880
With that in mind, we can see that, on average,
half of the computed values will be below 0.5,
20
00:01:30,880 --> 00:01:35,840
and half above. Likewise, if we
choose another threshold, say 0.3,
21
00:01:35,840 --> 00:01:42,000
30% of the values will be below the threshold, and
70% will be above. So the threshold effectively
22
00:01:42,000 --> 00:01:47,280
becomes a factor to control how often something
happens, in this case, the small brick rows.
23
00:01:47,280 --> 00:01:52,000
But this is still not what we plug into the
scaling. This just tells us which rows are small,
24
00:01:52,000 --> 00:01:56,480
but we still need to set the scaling factor
for them. So now we can use a Map Range
25
00:01:56,480 --> 00:02:01,840
node to map this mask to the actual scaling
factors. Our input range is already correct,
26
00:02:01,840 --> 00:02:07,600
as the mask is either zero or one. We know that
our total laid brick size has a ratio of 6:3:2,
27
00:02:08,800 --> 00:02:12,640
which makes the math really easy, as the
depth of the brick is half the length.
28
00:02:13,200 --> 00:02:17,360
Now for the output range, if we consider
the zero valued rows to be full rows,
29
00:02:17,360 --> 00:02:21,440
and the one valued rows to be half rows,
we need to map the Min output to one,
30
00:02:21,440 --> 00:02:25,680
to keep the same size, and map the Max to
two, so that they will be split in half.
31
00:02:26,800 --> 00:02:29,840
Note that even though we are looking
at values of one and two now,
32
00:02:29,840 --> 00:02:33,680
we can still see the difference between the
rows. That's because our color management
33
00:02:33,680 --> 00:02:39,120
is compressing our scene space into our display
space, allowing us to visualize values above one.
34
00:02:40,240 --> 00:02:44,560
Let's also set the X and Y channels of
the Combine XYZ node to one for now,
35
00:02:44,560 --> 00:02:49,680
so that the multiplication doesn't change anything
yet, and the values don't get collapsed to zero.
36
00:02:49,680 --> 00:02:53,680
Now if we just Tab out and look at the
Fraction output, we can Tab back in,
37
00:02:53,680 --> 00:02:56,880
and connect the scaling factor to
the X input, to scale the width.
38
00:02:57,440 --> 00:03:02,080
Now we have these half rows, but if we look at
the final output, we see that the mortar also
39
00:03:02,080 --> 00:03:08,240
gets scaled down. This is because unlike with
the vertical scaling that we compensated for,
40
00:03:08,240 --> 00:03:11,520
we have not included the horizontal
scaling in our scale correction.
41
00:03:12,800 --> 00:03:17,840
In Chapter 2 We already exposed the brick
size as a vector, so all we have to do now,
42
00:03:17,840 --> 00:03:23,120
is plug in our new X value. We need to expose
our scaling factor from the Offset group,
43
00:03:23,120 --> 00:03:26,480
but remember that ultimately we
want to output the inverse scale,
44
00:03:27,040 --> 00:03:31,920
so let's first invert the value,
by calculating one divided by it.
45
00:03:31,920 --> 00:03:34,880
For more info on this setup,
you can check out Chapter 2,
46
00:03:34,880 --> 00:03:37,760
about the distance field, where
we cover this in more detail.
47
00:03:39,120 --> 00:03:41,680
And now we can connect it
and name it appropriately.
48
00:03:44,640 --> 00:03:48,080
Then we can Tab out, and finally,
it's a matter of plugging the width
49
00:03:48,080 --> 00:03:54,880
into the X channel of the Size output. And
we see that it immediately gets corrected,
50
00:03:54,880 --> 00:03:57,760
as the rest of the correction
is already set up downstream.
51
00:03:58,960 --> 00:04:03,680
Lastly, it would be nice to be able to control the
frequency of the headers from outside the group.
52
00:04:03,680 --> 00:04:06,480
So let's Tab back in, and
expose this Threshold as well.
53
00:04:08,560 --> 00:04:12,000
It controls the factor of small
bricks, so let's name it like that.
54
00:04:13,520 --> 00:04:18,160
Then we can Tab out, and once again, connect it
to the Group Input, to control it from the root
55
00:04:18,160 --> 00:04:23,360
of the tree. And tabbing out one last time,
we have our completed random rows of headers,
56
00:04:23,360 --> 00:04:27,840
and we can easily change how many we
want by changing the factor at any time.
6912
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.