Hi this is a quick tip for you about the multi-domain capabilities of geometry nodes the point separate node where people seem to have some issues with it and how you can use vertex colors in a modifier that only allows to use vertex groups so let's get started .
alright here i am in blender 2.93 ifa this is the latest version i just downloaded this from builder.blender.org this is my startup file and we're just going to use this because this is going to be a very quick video so i'm going to take this outer .
Sphere here go to geometry nodes and i'm going to remove this subdivision here now we need a new geometry nodes node tree first thing we want to look at is the point separate some people watched my video and they can't make it work so once again this is how it works first .
Of all we distribute some points on to the geometry crank up the density here and then uh you know what we have to go to a weight paint so over here i hope you can see this yep so over here we um are going to add a new vertex group .
And we call that painted painted and now we're gonna let me just disable this modifier quick and now we can wait paint right so let's go over here and we're gonna paint something like this okay now let's enable the modifier uh we have this .
Uh weight painted now in our vertex group called painted we can add a point a separate note and we can use the painted as our mask so this is everything that we didn't paint and geometry 2 now is that like cross that i painted okay so this is using vertex groups .
Vertex groups have um so a vertex is either in a group or it isn't and when it's in the group it has a weight assigned to it weight between zero and one i personally think that the vertex groups should actually be called vertex weights .
Because it's weight painting and if it has weight zero it's not in the group so well i would i would call them vertex weights but they're called vertex groups and it's called vertex uh now weight painting if you paint on the vertex group the other thing we have in blender are .
Vertex colors and vertex colors this is where you vertex paint so this is where the multi-domain capability comes in that we get in geometry nodes now let's try the same thing with vertex colors let's add another vertex color slot here .
It's called chord and you can see if i put call in here it doesn't work so neither this one and nor that one so that the one is just one and the other one is zero and we also get this error message up here no attribute with name call although we do have an attribute .
Um called call but it's not a value between zero and one why because it's a color right it has an r a g and b value and also and this is what the multi-domain thing is um the vertex group where you wait paint um is for the vertex itself right each vertex has a value between .
Zero and one vertex colors on the other hand the domain for the color is not the vertex although it's called vertex color it's actually the corner and like i said we have rgb values we don't have one value between zero and one so how do we get .
One value well it's actually quite easy all we have to do is we have to go attribute separate xyz we take the color and we separate it into its r g and the b values and now we use for example the r value and if we plug that in here why isn't it working well because i haven't .
Painted anything yet so let's go switch this off this is our weight paint right we have to go to vertex paint which is actually corner paint and we're gonna paint on this one here the selected one where the the little camera is active so first of all let's make it all black so i set the color to .
Black and set vertex colors now everything is black i pick white and i'm gonna just paint something up here like this okay so now this is not weight painted this is vertex painted and it is painted in this color and if i go to object mode and if i switch my modifier back on you .
Can see now i'm using the red channel of my vertex color as the mask for the point separate so this is the stuff i painted as a vertex color and this is the other stuff okay so this is probably the one we want cool .
Now we're using a vertex color as a separate uh as for the point separate note of course we're using the red channel so how about we go into vertex paint disable this modifier quickly i'm gonna pick the red color and paint some more red .
Down here okay now if i enable this you can see since i'm using the red channel here i get this added to it if i were to use maybe the green channel or how about the blue channel rgb right b well whatever so the blue channel is just the white .
And the red channel is with the red okay so this is how we use vertex colors now we can take this even uh further and um for that i'm gonna go over here i'm to add another vertex group and i'm going to call this from vertex color so i'm going to take this vertex color .
And put it in here all using geometry nodes how do we do that well first of all we don't want the points right so we just want the geometry we want to take the vertex color curl separate it into rgb and then how can we set first of all let's put .
This in here how can we set um uh to something well probably the easiest way is with an attribute math node so forget all this down here uh we're just going through here right so we're going to take the r we're going to add nothing to it .
And we're going to set it into this vertex group from vertex color so if i go to vertex now to weight paint now you can see this is the one i hand painted and this is the one we get from geometry nodes now so now we're using the red channel from .
This color in this vertex group if i take the blue channel i get this okay so let's set it back to red and red and now the cool thing about this is um we can now for example add a displace modifier let's take some cloudy displacement .
And you know that modifiers always have vertex groups so you can limit the modifier's effect to a vertex group but not vertex colors right so we can only use vertex groups here and you can see we said that we took the red channel from the vertex color placed it into a vertex group called .
From vertex color and now we're using that in the modifier and we're only displacing this painted stuff up here so we look like this right get some displacement up here these things are weird because uh this shader ball actually has some bubbles in .
So it has uh geometry inside and of course with the displays the they kind of pop out but you can see the effect here i'm only affecting this a painted area and this is not weight painted from a vertex group it's actually a vertex color set .
Or transferred over from one domain to the other domain using geometry nodes that's it quick and easy i hope you liked it if you did thumbs up subscribe to the channel if you're new here i have all sorts of blender tutorials and of course i'm gonna stay on top of the whole geometry node development if .
You're also interested in some introduction to geometry notes i have some videos here on the channel you can find links down below thanks for watching crispy out you