Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,800 --> 00:00:07,920
Let's take a look at vertex colors now, so i'm
going to go Ctrl Space just to minimize that so
2
00:00:07,920 --> 00:00:13,200
we do have this as an option here, but rather than
taking advantage of the workbench engine i'm going
3
00:00:13,200 --> 00:00:18,800
to switch back over to our more rendered view such
as the material preview and actually let's just
4
00:00:18,800 --> 00:00:23,520
delete those objects there and reselect one of the
objects here to get our material back, i'm going
5
00:00:23,520 --> 00:00:28,560
to switch this back to slot 1 and let's bring
vertex colors into the mix, so let's go Shift A
6
00:00:28,560 --> 00:00:33,760
and go to input and then find vertex color so if
we come over to the properties window and come
7
00:00:33,760 --> 00:00:38,480
down here to the object data properties we can
find here in the vertex color section there aren't
8
00:00:38,480 --> 00:00:44,080
actually any vertex color sets here by default so
we'll not find them in this pull down for example
9
00:00:44,080 --> 00:00:49,840
it's easy to set up though, because all we would
need to do is to take the vertex color output
10
00:00:49,840 --> 00:00:54,400
and plug that into our emission input. now this is
where things are going to get a little bit tricky
11
00:00:54,400 --> 00:00:59,840
but first i just want to highlight the fact that
the advantages of this probably do outweigh the
12
00:00:59,840 --> 00:01:05,600
disadvantages, so with this you really don't need
the use of loads of materials or textures if we
13
00:01:05,600 --> 00:01:10,720
wanted lots of different colors we're going to
need different materials for every shade, however
14
00:01:10,720 --> 00:01:16,880
this way we can just use the single material setup
and the vertex colors we can paint individually or
15
00:01:16,880 --> 00:01:22,160
set per object, the downside is that vertex
painting needs a little love in Blender
16
00:01:22,160 --> 00:01:27,200
simple projects it's easy if you've only got a
few objects, but with hundreds as we have here
17
00:01:27,200 --> 00:01:32,640
it becomes a little bit of a pain, especially if we
can't really join all these objects together, maybe
18
00:01:32,640 --> 00:01:37,680
they have different subdivision surface levels on
them or other particular modifiers that require
19
00:01:37,680 --> 00:01:42,640
them to be kept separate and currently there isn't
really a way to paint on multiple objects at once
20
00:01:42,640 --> 00:01:47,680
but having said that i'm hoping you'll see that
this is super useful and is deserving of love
21
00:01:47,680 --> 00:01:53,200
so for one object it's really easy, we could either
just click the plus icon here to add a vertex
22
00:01:53,200 --> 00:01:57,760
color set which thankfully makes everything white
so it's immediately easy to see that we've got
23
00:01:57,760 --> 00:02:02,560
something there, or if i delete that by clicking on
the little minus we can also come over to change
24
00:02:02,560 --> 00:02:07,760
the mode and switch it to vertex paint and now
we're set to whatever color we want and then we
25
00:02:07,760 --> 00:02:11,920
can just left click and drag and begin to paint,
we're going to switch that back to object mode
26
00:02:11,920 --> 00:02:16,880
though and delete that one more time because
as mentioned that's easy enough for one object
27
00:02:16,880 --> 00:02:21,440
but we've got all of these objects that we
need to put color sets on, and that's not very
28
00:02:21,440 --> 00:02:27,440
convenient, luckily it's not that difficult but
we are going to need to just switch this to a
29
00:02:27,440 --> 00:02:31,520
python console for a moment but don't worry, we're
going to make this very fast, i'm going to try and
30
00:02:31,520 --> 00:02:36,080
explain this in a way which might help you apply
this kind of method to other things, where you find
31
00:02:36,080 --> 00:02:42,160
you need to do a task to multiple objects and not
sure where the object is within Blender to do that,
32
00:02:42,160 --> 00:02:46,480
so for this we're going to start with bpy which
is short for Blender python then we can press
33
00:02:46,480 --> 00:02:51,600
the full stop on the qwerty keyboard once we press
tab we can see a list of all the other things that
34
00:02:51,600 --> 00:02:56,880
can now follow this this is like digging down into
the folders of Blender python so Blender python is
35
00:02:56,880 --> 00:03:01,920
the very very root of everything, let's take a look
at context, so i'll just start typing context and
36
00:03:01,920 --> 00:03:06,720
press tab to finish that for me and then press the
period again and then tab again and i'm going to
37
00:03:06,720 --> 00:03:12,880
scroll the middle mouse wheel to see all of these
options and notice there's this option selected
38
00:03:12,880 --> 00:03:18,080
objects so i'm just going to come down to here
and start typing selected and then press Tab and
39
00:03:18,080 --> 00:03:23,360
it completes it for us and then objects and then
Tab again and then if i press Enter at this point
40
00:03:23,360 --> 00:03:29,280
we can see it gives us the output cylinder.004
which is the very object that we have selected
41
00:03:29,280 --> 00:03:34,720
now what's cool about Python is that we can do a
for loop we can tell Blender to do the same action
42
00:03:34,720 --> 00:03:38,640
to a load of objects that we have selected at the
same time and we know how to get those selected
43
00:03:38,640 --> 00:03:43,840
objects with this line of code, but what is it that
we need to do to each object, if i press the up
44
00:03:43,840 --> 00:03:48,480
arrow we get the last command and the selected
objects if we remember earlier when we were
45
00:03:48,480 --> 00:03:54,880
talking about materials in the solidify modifier
in code we count from zero, so the first object
46
00:03:54,880 --> 00:03:59,680
is going to be zero, so if we do it like this
within square brackets we're going to get the same
47
00:03:59,680 --> 00:04:04,880
information basically and now we can do something
to this, so i'm gonna press the full stop and
48
00:04:04,880 --> 00:04:10,560
press the Tab key again and then what we're doing
now is digging down into the options on this one
49
00:04:10,560 --> 00:04:14,480
object, now i'm not gonna bore you with all those
options there because i know the one that we need
50
00:04:14,480 --> 00:04:18,960
is actually data from there, another full stop
and press Tab again and we can see we actually
51
00:04:18,960 --> 00:04:25,200
get vertex colors right here, so i'm going to start
typing vertex and then Tab and then vertex colors
52
00:04:25,200 --> 00:04:30,320
and then if we press Enter we're getting nothing,
if we try and see if we've got anything if we
53
00:04:30,320 --> 00:04:35,200
give that a zero, we see we're getting a problem
because we don't have any, if i go up a couple of
54
00:04:35,200 --> 00:04:39,920
times and go to the full stop again and press tab
we can see we get all these options and there's
55
00:04:39,920 --> 00:04:44,320
actually this option for new, if i go like this
and just open the brackets, hit tab again we can
56
00:04:44,320 --> 00:04:48,640
actually just go new and then close the brackets
and it'll fill all this in for us automatically
57
00:04:48,640 --> 00:04:53,600
so i'm just going to do that and press enter
and there we go, it's done, it's created this
58
00:04:53,600 --> 00:04:58,320
vertex color set for us with this line of code, i'm
going to delete that again though by hitting the
59
00:04:58,320 --> 00:05:04,000
minus key there, let's just select these two for
example, just to do a very simple test, so instead
60
00:05:04,000 --> 00:05:09,520
of doing all of that i'm just going to do a
for loop, so i'm going to go for now we can
61
00:05:09,520 --> 00:05:15,120
put in a placeholder bit of text it can be any
gibberish really but in fact let's just use that
62
00:05:15,120 --> 00:05:20,960
but basically this is going to be the object um so
object gib just to prove it doesn't have to be a
63
00:05:20,960 --> 00:05:29,680
word that makes any particular sense so for obj
gib in bpy.context.selected objects and then hit
64
00:05:29,680 --> 00:05:34,160
a colon it's going to indent it automatically
for us and it's going to say right for every
65
00:05:34,160 --> 00:05:40,080
object in our selected objects then we want it
to do something, so we're going to go obj jib
66
00:05:40,080 --> 00:05:44,800
and we're going to say take the data of that
object and then take a look at vertex colors
67
00:05:44,800 --> 00:05:50,000
and then do new, once we do that we can hit
enter a couple of times and now we can see
68
00:05:50,000 --> 00:05:55,120
we have vertex colors on both of those objects, so
with that done i'm going to delete both of those
69
00:05:55,120 --> 00:06:01,200
select one, go Shift G select all of type, so now
we have them all selected and now we're going to
70
00:06:01,200 --> 00:06:07,600
use that same code so up a few times, hit
enter and then let's have it add vertex color
71
00:06:07,600 --> 00:06:12,400
sets to every single object and there we go! these
objects down here don't have it because if i'm
72
00:06:12,400 --> 00:06:17,200
not mistaken they are curves, so they're not of the
same type, so we would need to color those slightly
73
00:06:17,200 --> 00:06:22,160
separately, but with this now we can switch that
back to a shader editor and then we can see there
74
00:06:22,160 --> 00:06:27,120
it's giving us a little warning, it doesn't have
mesh data for that particular curve, but if we
75
00:06:27,120 --> 00:06:32,080
select this one, we should be able to just switch
that to col so just change the color for this one
76
00:06:32,080 --> 00:06:38,560
we can go to vertex paint and start painting as
we saw before, oh, also worth noting is it's faded
77
00:06:38,560 --> 00:06:42,800
out the geometry it's darkened the geometry of
everything else that we don't have selected, so
78
00:06:42,800 --> 00:06:49,360
we can actually change that if we want to by just
enabling or disabling this fade inactive geometry
79
00:06:49,360 --> 00:06:53,840
section, i'm just going to keep that enabled by
default though, so we could paint here with this
80
00:06:53,840 --> 00:06:58,880
or we could go to the paint menu and just set
vertex colors or we can use the shortcut Shift K
81
00:06:58,880 --> 00:07:04,320
with that done we can switch over to another
object and switch that over to vertex paint and
82
00:07:04,320 --> 00:07:09,680
set that also and switch back to object mode and
continue to work through the object like that and
83
00:07:09,680 --> 00:07:14,240
clearly if we had several objects that we wanted
to paint a particular color all at the same time
84
00:07:14,240 --> 00:07:18,240
and we were feeling brave enough then maybe
just digging into that python code a little
85
00:07:18,240 --> 00:07:22,960
bit more would be the way to go, now where vertex
colors becomes even more handy is that we can use
86
00:07:22,960 --> 00:07:28,000
additional vertex color sets to use as kind
of masks to tell it say how metallic we want
87
00:07:28,000 --> 00:07:33,840
things to be, certain vertices or the whole object,
whether we want to use it to drive roughness or
88
00:07:33,840 --> 00:07:40,000
add a little bit of ambient occlusion and keep it
all within this single material, so to set a little
89
00:07:40,000 --> 00:07:46,720
something up like that we could just simply go and
add in a mix rgb node, drop that here i'm going to
90
00:07:46,720 --> 00:07:51,840
say set this color that we already have here into
the second socket and as the factor there, let's
91
00:07:51,840 --> 00:07:56,640
use another vertex color set, so we don't actually
have one at the moment, but if i click plus
92
00:07:56,640 --> 00:08:02,880
there we can switch this over to cal.001 newly
created and set that into here and then also this
93
00:08:02,880 --> 00:08:08,800
indicates that on some of these objects actually
we already have quite a few additional color sets
94
00:08:08,800 --> 00:08:13,360
as it was, so we might want to remove them to make
this a bit cleaner, but just pressing on for the
95
00:08:13,360 --> 00:08:18,640
moment. what we might like to do is come over to
our vertex paint selection, make sure that we're
96
00:08:18,640 --> 00:08:23,040
adjusting our vertex paint by just switching
this over here, just want to make sure that we're
97
00:08:23,040 --> 00:08:27,520
definitely going to edit this col.001 then
if i start drawing in the view we're not going
98
00:08:27,520 --> 00:08:31,760
to see anything because it's all part of this
right now, so i'm going to Control Shift click
99
00:08:31,760 --> 00:08:35,280
on this thanks to the Node Wrangler add-on we
can just see what we're doing with this one
100
00:08:35,280 --> 00:08:40,080
vertex color, so with this i'm going to set this
back to white by just pressing backspace and then
101
00:08:40,080 --> 00:08:44,400
go to paint and then set vertex colors and then
what i'm also going to do is let's take a look
102
00:08:44,400 --> 00:08:48,560
at dirty vertex colors, which is just another
way of saying ambient occlusion essentially
103
00:08:48,560 --> 00:08:53,920
so with that, we have some options that we can
set, but i'm perfectly happy with that result and
104
00:08:53,920 --> 00:08:59,520
that is now being fed into the factor, so wherever
it's a bit darker ignoring the outlines of course
105
00:08:59,520 --> 00:09:06,480
it will tell it to use whatever's in our second
socket, which is this RGB hue that we have here
106
00:09:06,480 --> 00:09:10,480
so let's Control Shift click on the mix shader
and it's not immediately obvious if i just darken
107
00:09:10,480 --> 00:09:16,000
that off a little bit more, we can see that coming
through and if we wanted to adjust of course we
108
00:09:16,000 --> 00:09:23,360
can add in a color ramp and just use this to tweak
our falloff and as mentioned before we could keep
109
00:09:23,360 --> 00:09:29,040
on layering these vertex color sets, so we could
click on the plus to add yet another one and then
110
00:09:29,040 --> 00:09:34,960
double click within the name field here to rename
this to something, let's just call it metallic
111
00:09:34,960 --> 00:09:40,400
for example we could use another color set to
drive the metallic value, so if we were using
112
00:09:40,400 --> 00:09:45,520
a Principled shader of course and if we duplicate
one of these color set nodes, just bring this up
113
00:09:45,520 --> 00:09:50,880
into view and then let's drag our color output
into the metallic socket and switch that to the
114
00:09:50,880 --> 00:09:56,800
metallic set and also just remember to use the
little camera icon make sure that this metallic
115
00:09:56,800 --> 00:10:03,280
here. is enabled and then with that done i can tab
into edit mode for example, press Z to toggle into
116
00:10:03,280 --> 00:10:09,840
wireframe and then yeah with say this selection
we can tab back into vertex paint mode and then
117
00:10:09,840 --> 00:10:15,120
enable our face mask here and then we can see what
faces we have selected and then with this black
118
00:10:15,120 --> 00:10:20,960
color here if we go paint and set vertex colors
and then go back with Z to material preview
119
00:10:20,960 --> 00:10:26,400
and Ctrl Shift click on this to see what we've got
we can see we've now painted that whole area black
120
00:10:26,400 --> 00:10:31,360
which is to say if we Control Shift click the
principled psdf, let's change this into object
121
00:10:31,360 --> 00:10:36,800
mode and just make this as clear as we can we
can hopefully see that this area up here, actually
122
00:10:36,800 --> 00:10:41,840
let's make this super shiny, so that really comes
through, we can see this area up here is metallic
123
00:10:41,840 --> 00:10:46,000
and this area down here is not, now as we
just changed the roughness there we could
124
00:10:46,000 --> 00:10:51,440
of course create another vertex color set which
controlled that and so on and so on, so as long as
125
00:10:51,440 --> 00:10:56,400
all the objects in the scene had those various
color sets, it means that we can just maintain
126
00:10:56,400 --> 00:10:58,400
this one material and get loads of different
results from it just using vertex colors
17876
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.