Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:04,160 --> 00:00:08,360
When we looked at path tracing, we skipped
over one major step in the creation of the
2
00:00:08,360 --> 00:00:09,730
final render.
3
00:00:09,730 --> 00:00:13,790
We covered how rays bounce around the scene,
and how each ray will contribute some amount
4
00:00:13,790 --> 00:00:15,769
of light to a certain pixel.
5
00:00:15,769 --> 00:00:20,250
By the end of this process, we know how much
light reached each pixel, but this isn't actually
6
00:00:20,250 --> 00:00:22,600
enough to give us a usable image.
7
00:00:22,600 --> 00:00:26,720
The issue is that the amount of light that
reached each pixel can be anywhere between
8
00:00:26,720 --> 00:00:31,150
zero, meaning no light at all, up to an unlimited
amount of light.
9
00:00:31,150 --> 00:00:35,350
Meanwhile, a screen can only emit light within
a certain range.
10
00:00:35,350 --> 00:00:39,829
So we need some way to map the unbounded amount
of light for each pixel to a bounded image
11
00:00:39,829 --> 00:00:42,360
color that can be displayed on a screen.
12
00:00:42,360 --> 00:00:47,059
Perhaps the simplest way is to set a limit,
and just clamp all the light above that limit.
13
00:00:47,059 --> 00:00:51,270
This way, all the values within the range
of the screen correspond exactly to an equivalent
14
00:00:51,270 --> 00:00:53,280
light intensity.
15
00:00:53,280 --> 00:00:56,820
If we plot the clipped values, it looks something
like this.
16
00:00:56,820 --> 00:00:59,550
As we'll see, this is a pretty terrible approach.
17
00:00:59,550 --> 00:01:01,860
Let's first take a look at this black and
white scene.
18
00:01:01,860 --> 00:01:05,519
Here we can see that the sky reflected on
the sphere is all clipped, and we can't see
19
00:01:05,519 --> 00:01:06,860
any detail there.
20
00:01:06,860 --> 00:01:11,080
We also see the reflection of the sun on the
plane, which has a harsh edge where it starts
21
00:01:11,080 --> 00:01:12,080
clipping.
22
00:01:12,080 --> 00:01:16,390
This is not how our eyes perceive bright spots
in a scene, there is no clearly defined boundary
23
00:01:16,390 --> 00:01:21,080
where our eyes start clipping, in reality
there is a much softer transition.
24
00:01:21,080 --> 00:01:25,220
If we increase the brightness of the picture
a bit, all the issues get even worse, now
25
00:01:25,220 --> 00:01:29,470
we also have this harsh edge around the ambient
occlusion under the sphere, where the plane
26
00:01:29,470 --> 00:01:30,580
started clipping.
27
00:01:30,580 --> 00:01:34,970
If we increase the brightness a bit more,
the cone also gets a hard clipped edge.
28
00:01:34,970 --> 00:01:38,950
And if we keep increasing the brightness,
these clipped zones keep growing until most
29
00:01:38,950 --> 00:01:40,320
of the picture is white.
30
00:01:40,320 --> 00:01:44,040
Note that with each increase in brightness,
the picture didn't really look like it was
31
00:01:44,040 --> 00:01:48,810
getting brighter in a natural way, rather,
it just looks like the clamped areas are growing
32
00:01:48,810 --> 00:01:51,000
and flooding the image.
33
00:01:51,000 --> 00:01:53,840
If we introduce color, the issues are even
worse.
34
00:01:53,840 --> 00:01:57,450
We still have the clamped sky and the sun
reflection on the plane, but now there is
35
00:01:57,450 --> 00:01:59,750
already a hard edge on the cone.
36
00:01:59,750 --> 00:02:03,850
If we look at just the Red channel, we see
that it's because it reflects so much red,
37
00:02:03,850 --> 00:02:09,840
that the Red channel already clipped, meanwhile,
the green and blue channels are still in range.
38
00:02:09,840 --> 00:02:13,230
Here on the Blue channel it's also notable
that the ground is already clipped, and the
39
00:02:13,230 --> 00:02:16,290
cone doesn't reflect any blue light at all.
40
00:02:16,290 --> 00:02:20,390
Now if we increase the brightness a bit, we
see that the plane starts shifting to cyan,
41
00:02:20,390 --> 00:02:24,600
because the Blue channel couldn't increase
in brightness anymore as it was already clipped,
42
00:02:24,600 --> 00:02:28,790
meanwhile, the Green channel kept getting
brighter, so it changed the color ratios,
43
00:02:28,790 --> 00:02:30,100
and shifted the hue.
44
00:02:30,100 --> 00:02:33,870
The cone, and the leaves in the background
also started shifting to yellow for the same
45
00:02:33,870 --> 00:02:35,130
reason.
46
00:02:35,130 --> 00:02:38,860
If we increase the brightness again, we see
that the cone and the leaves clipped completely
47
00:02:38,860 --> 00:02:39,860
to yellow.
48
00:02:39,860 --> 00:02:43,690
At this point, the ground has clipped on all
channels, but there is still this strange
49
00:02:43,690 --> 00:02:47,250
harsh sliver of blue at the dark parts under
the sphere.
50
00:02:47,250 --> 00:02:51,400
And if we really bump up the brightness, almost
everything goes to white, except the cone,
51
00:02:51,400 --> 00:02:52,600
and the leaves in the back.
52
00:02:52,600 --> 00:02:56,990
That's because they don't contain any blue,
which means that with the red and green channels
53
00:02:56,990 --> 00:03:01,420
clipped, we get this harsh yellow, as the
Blue channel remains on zero, no matter how
54
00:03:01,420 --> 00:03:03,440
much we increase the brightness.
55
00:03:03,440 --> 00:03:07,160
The problem is that this is not at all how
our eyes perceive brightness.
56
00:03:07,160 --> 00:03:11,410
When we see something very bright, even if
it's saturated at some specific hue, it starts
57
00:03:11,410 --> 00:03:12,930
looking white.
58
00:03:12,930 --> 00:03:17,510
Note that I'm showing these very extreme examples,
just to illustrate the issue, but this problem
59
00:03:17,510 --> 00:03:22,411
is still present even with much less bright
images, and images can often also have a wide
60
00:03:22,411 --> 00:03:26,819
dynamic range, with some parts being very
bright and others very dark.
61
00:03:26,819 --> 00:03:31,100
So it's important to properly convert the
light intensity values from the render into
62
00:03:31,100 --> 00:03:34,540
colors, in a way that's closer to how our
eyes perceive the world.
63
00:03:34,540 --> 00:03:38,910
To deal with the hard clipping issue, we can
come up with a function where the output starts
64
00:03:38,910 --> 00:03:43,530
off following roughly along the input values,
but which slows the output down, as the inputs
65
00:03:43,530 --> 00:03:44,790
get higher.
66
00:03:44,790 --> 00:03:49,820
The idea is not necessarily to avoid clipping
altogether, but rather to slowly ease into
67
00:03:49,820 --> 00:03:50,820
it.
68
00:03:50,820 --> 00:03:54,600
If we plot this function, we see that it has
a softer high end.
69
00:03:54,600 --> 00:03:59,360
But this function is only part of the solution,
we'll also need to desaturate colors, as the
70
00:03:59,360 --> 00:04:04,790
light intensity goes up, so that it clips
to white, and not some harsh yellow or cyan.
71
00:04:04,790 --> 00:04:08,220
If we run our brightness values through this
function, and look at the black and white
72
00:04:08,220 --> 00:04:13,030
example, the first thing we notice is how
we have a wider usable dynamic range, and
73
00:04:13,030 --> 00:04:15,020
we can even see details in the sky.
74
00:04:15,020 --> 00:04:19,199
The reflection of the sun on the plane also
has a much softer falloff.
75
00:04:19,199 --> 00:04:23,340
Now if we bump up the brightness, it just
looks like a brighter version of the image,
76
00:04:23,340 --> 00:04:26,280
no hard edges, or noticeable flooding of clipped
areas.
77
00:04:26,280 --> 00:04:30,380
And we can keep increasing the brightness,
and it still looks reasonable.
78
00:04:30,380 --> 00:04:34,120
There can still be clipping, be we don't see
the clipped boundaries, as we're softly rolling
79
00:04:34,120 --> 00:04:35,380
into it.
80
00:04:35,380 --> 00:04:38,910
Now looking at the color version, the cone
doesn't have that hard red edge.
81
00:04:38,910 --> 00:04:43,160
And if we increase the brightness, the plane
starts getting desaturated, just like our
82
00:04:43,160 --> 00:04:47,070
eyes would do, rather than shifting completely
into cyan.
83
00:04:47,070 --> 00:04:51,330
If we increase the brightness again, the cone
starts losing saturation as well, and we still
84
00:04:51,330 --> 00:04:53,740
don't see any hard clipped edges.
85
00:04:53,740 --> 00:04:57,550
And if we really push the brightness, we see
that we shift everything into white, even
86
00:04:57,550 --> 00:05:00,190
the cone, which didn't contain any blue.
87
00:05:00,190 --> 00:05:04,360
This looked much better, but there is a lot
of maths and color science involved.
88
00:05:04,360 --> 00:05:08,770
But luckily, we don't have to implement this
stuff ourselves, Blender has this color transformation
89
00:05:08,770 --> 00:05:10,840
that we looked at built-in.
90
00:05:10,840 --> 00:05:15,100
It's applied by selecting Filmic in the color
management options, but you don't even need
91
00:05:15,100 --> 00:05:17,840
to do that, as it's already the default.
92
00:05:17,840 --> 00:05:20,120
It's just important to be aware of this.
93
00:05:20,120 --> 00:05:24,300
When you output a color, for instance, with
an emission shader it'll look a bit different
94
00:05:24,300 --> 00:05:27,199
in the render due to the color transformation.
95
00:05:27,199 --> 00:05:31,400
When doing any sort of 3D rendering, you almost
always want to have a color transformation
96
00:05:31,400 --> 00:05:34,140
like Filmic being applied to your output.
97
00:05:34,140 --> 00:05:37,810
The only case I can think of where you wouldn't
want such a transformation, is when doing
98
00:05:37,810 --> 00:05:41,840
flat rendering for something like motion graphics,
where all the shaders in the scene are flat
99
00:05:41,840 --> 00:05:46,070
emission shaders, and you want to control
the output colors directly, in which case
100
00:05:46,070 --> 00:05:50,250
you'd select the Standard output transform,
which just clamps the values.
101
00:05:50,250 --> 00:05:53,880
But as soon as you are applying any sort of
lighting to your scene, you'll want to have
102
00:05:53,880 --> 00:05:56,650
a proper color transformation applied.
103
00:05:56,650 --> 00:06:00,460
This was an overview of color transformations,
and how we get a proper color from a light
104
00:06:00,460 --> 00:06:02,070
intensity value.
105
00:06:02,070 --> 00:06:05,610
But we are barely scratching the surface of
the color science required to actually make
106
00:06:05,610 --> 00:06:06,790
an image.
107
00:06:06,790 --> 00:06:10,220
If you want to have more understanding of
the whole color pipeline, and how colors get
108
00:06:10,220 --> 00:06:14,530
from a source all the way to the displayed
output, I can highly recommend The Hitchhiker's
109
00:06:14,530 --> 00:06:19,470
Guide to Digital Colour, which incidentally
is written by Troy Sobotka, who is also the
110
00:06:19,470 --> 00:06:21,050
author of the Filmic color transformation.
11564
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.