Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:04,190 --> 00:00:09,460
The Map Range node allows us to change the
range of the input values.
2
00:00:09,460 --> 00:00:13,730
Say we have some values in a range from zero
to one, but we need those values to be in
3
00:00:13,730 --> 00:00:18,900
a range from two to five, the Map Range node
is the perfect way to achieve that.
4
00:00:18,900 --> 00:00:23,251
We just need to feed the values into the Value
input, set the From Min and Max fields to
5
00:00:23,251 --> 00:00:28,320
our input range, and set the To Min and Max
fields to the the desired output range.
6
00:00:28,320 --> 00:00:33,230
Then the Map Range node does all the math
to place our values into the new range.
7
00:00:33,230 --> 00:00:37,370
With Clamp enabled, any input value outside
the defined input range gets clamped to the
8
00:00:37,370 --> 00:00:39,519
output range boundaries.
9
00:00:39,519 --> 00:00:45,629
But if we disable clamp, the range is extrapolated,
and the values get mapped to the output proportionally.
10
00:00:45,629 --> 00:00:50,019
Note that the min parameters don't have to
be lower than the max parameters, so we can
11
00:00:50,019 --> 00:00:56,000
even invert the range, by flipping the order
of either the From or To range.
12
00:00:56,000 --> 00:01:00,300
If we plot the result of the Map Range, with
the input along the X axis, and the output
13
00:01:00,300 --> 00:01:04,680
along Y, we can visualize the Map Range function
in a different way.
14
00:01:04,680 --> 00:01:12,570
See how the changing From range shifts which
part of the input is in range, and changing
15
00:01:12,570 --> 00:01:21,030
the To range, changes what values actually
get output.
16
00:01:21,030 --> 00:01:26,400
The Map Range also has a smooth version, which
eases the range in and out.
17
00:01:26,400 --> 00:01:31,120
Finally, there is also a stepped mode, which
snaps values to a certain amount of evenly
18
00:01:31,120 --> 00:01:36,770
spaced levels, which is determined by the
Steps parameter.
19
00:01:36,770 --> 00:01:41,090
So far, we've only looked at cases with a
constant value for both the input and output
20
00:01:41,090 --> 00:01:44,940
ranges, but we can also plug varying values
in there.
21
00:01:44,940 --> 00:01:49,520
One interesting use case that is useful to
note, is that we can use it for mixing values,
22
00:01:49,520 --> 00:01:53,340
just like we use a Mix RGB node to mix between
colors.
23
00:01:53,340 --> 00:01:57,280
To do this, given the two things we want to
mix, we just need to keep the input range
24
00:01:57,280 --> 00:02:02,150
from zero to one, and plug the two values
we want to mix into the output range.
25
00:02:02,150 --> 00:02:06,300
Now, the Value input works like a mixing factor.
26
00:02:06,300 --> 00:02:10,640
This works because when the input Value is
equal to From Min, then whatever is in To
27
00:02:10,640 --> 00:02:15,620
Min gets output, and whenever the input Value
is equal to From Max, then whatever is in
28
00:02:15,620 --> 00:02:20,080
To Max gets output, and anything in between
is a mix of the two.
29
00:02:20,080 --> 00:02:24,050
With this setup, we can even feed another
texture to the Value, which will then act
30
00:02:24,050 --> 00:02:24,950
as the factor.
3397
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.