WEBVTT

1
00:00:00.010 --> 00:00:03.240
Let's talk about procedural textures.

2
00:00:03.240 --> 00:00:06.360
You've probably heard the term procedural before,

3
00:00:06.360 --> 00:00:10.320
as well as the term generated in the context of CG.

4
00:00:10.320 --> 00:00:12.840
These terms are practically synonymous.

5
00:00:12.840 --> 00:00:14.960
You can often use them interchangeably.

6
00:00:14.960 --> 00:00:19.760
However, the full term is actually procedurally generated textures.

7
00:00:19.760 --> 00:00:22.440
Procedurally generated is basically where you create

8
00:00:22.440 --> 00:00:26.400
a texture using a mathematical formula instead of pixels.

9
00:00:26.640 --> 00:00:31.840
Practically, these generated textures can scale infinitely without loss of resolution,

10
00:00:31.840 --> 00:00:35.360
and often have a ton of settings you can tweak to get the look you want.

11
00:00:35.360 --> 00:00:39.520
It's also much more efficient when it comes to data and file size.

12
00:00:39.520 --> 00:00:43.040
There are several kinds of procedural textures to choose from.

13
00:00:43.040 --> 00:00:47.360
Let's go ahead and take a look at them by going to our Shader Editor's Add menu

14
00:00:47.360 --> 00:00:49.760
and looking through the Textures category.

15
00:00:49.760 --> 00:00:53.360
Excluding the Image, Environment, and IES textures,

16
00:00:53.360 --> 00:00:57.280
every other texture you see here is a procedurally generated texture.

17
00:00:57.280 --> 00:01:01.440
Each of these procedurally generated textures produces a particular pattern,

18
00:01:01.440 --> 00:01:04.640
such as wave, gradient, or noise.

19
00:01:04.640 --> 00:01:07.520
Feel free to try any of these out, but for this introduction,

20
00:01:07.520 --> 00:01:09.840
I'm going to use Voronoi.

21
00:01:09.840 --> 00:01:12.480
This is a fracture-like texture that we can go ahead

22
00:01:12.480 --> 00:01:15.520
and connect to our base color input of our shader.

23
00:01:15.520 --> 00:01:18.320
As you can see, this texture looks a bit like that

24
00:01:18.320 --> 00:01:21.760
underwater reflective pattern you get, caustics.

25
00:01:21.760 --> 00:01:24.880
There's a few settings for us to play around with in the node we just made,

26
00:01:24.880 --> 00:01:26.800
so let's do that.

27
00:01:26.800 --> 00:01:29.040
We can change intensity to cells,

28
00:01:29.040 --> 00:01:32.720
and that gives us a cool stained glass version of the texture.

29
00:01:32.720 --> 00:01:36.640
We can also switch around exactly what kind of distance formula it uses,

30
00:01:36.640 --> 00:01:39.120
but feel free to experiment with that.

31
00:01:39.120 --> 00:01:42.960
Most importantly, you can change the scale of the texture infinitely,

32
00:01:42.960 --> 00:01:44.400
practically speaking.

33
00:01:44.400 --> 00:01:48.560
As you can see, no matter how much I zoom in on the texture by scaling it down,

34
00:01:48.640 --> 00:01:52.320
there are still no pixels or resolution problems.

35
00:01:52.320 --> 00:01:55.040
Now let's say you don't want the color of the texture,

36
00:01:55.040 --> 00:01:56.880
but you like the shapes.

37
00:01:56.880 --> 00:02:01.520
Luckily, the factor output is a black and white version of the color output.

38
00:02:01.520 --> 00:02:04.480
Let's plug that in instead to double check.

39
00:02:04.480 --> 00:02:08.720
As you can see, it is a nice grayscale version of our texture.

40
00:02:08.720 --> 00:02:12.960
So is there a situation why we would prefer grayscale over color?

41
00:02:12.960 --> 00:02:18.400
Well, grayscale, or factor, is typically great for a number of different kinds of maps,

42
00:02:18.400 --> 00:02:21.040
including roughness maps and transparency maps.

43
00:02:21.600 --> 00:02:24.560
Let's go ahead and try to plug this into the roughness value.

44
00:02:25.360 --> 00:02:30.480
As you can see, the cube becomes shiny during some parts and rough during other parts.

45
00:02:30.480 --> 00:02:35.760
This allows the texture to drive exactly how the roughness is distributed across the mesh.

46
00:02:36.720 --> 00:02:42.400
It's important to note that sometimes the factor is not just a grayscale version of the color output.

47
00:02:42.400 --> 00:02:45.440
Instead, it could be, for example, the alpha map,

48
00:02:45.440 --> 00:02:49.600
or in the case of the brick texture, it outlines the mortar of the brick.

49
00:02:50.720 --> 00:02:54.720
Procedural textures can be very powerful, especially when mixed together.

50
00:02:55.280 --> 00:02:59.680
So feel free to play around with how each one looks to better understand their algorithms.

