Vertex group weight in shader editor
A vertex group weight node in the shader editor would be very useful. It would just return a per vertex 0 to 1 fac value. Could drive mix shader values and such...
A vertex group weight node in the shader editor would be very useful. It would just return a per vertex 0 to 1 fac value. Could drive mix shader values and such...
8 Comments
I know that this feature might look like something desirable, but we have got something much more powerful, and you don't need Geometry Nodes for it.
Its recently implemented
Set Attributeoperator inMeshmenu in edit mode.Set Attributeoperator and set the value you wantAgain - you don't need Geometry Nodes for this, and the workflow is very similar to Vertex groups/weights.
It is desirable as long as vertex groups exist as their own thing, not generic attributes. They may become generic attributes in the future, but currently they are not. They are currently in a separate menu, and work on specific things that generic attributes don't work on, and visa versa. For example: particle density, rigging, etc.
Here is a use case scenario: You have a grid floor. You have scattered grass particle instances over it. The density of these instances are set by weights of a vertex group. (Note: Unless the scattering was done in GN, density can only be set by a vertex group, and weight painting only works on vertex groups, not generic attributes. There is no Attribute paint mode). On this grass field, you have manually drawn a pathway in weight paint, where you want there not to be any grass, but rather concrete tiles, for example. The same vertex group that was used to remove grass instances could also be used to mix in the concrete tile shader in the shader editor. Currently, the workarounds are overcomplicated: You either have to convert the vertex group to a named attribute in GN, or draw the exact same thing as vertex colors in vertex paint mode. Or redo the whole grass in GN, and use vertex colors instead of vertex groups, so you can draw that pathway in vertex paint mode instead of weight paint... A "Vertex group weight" node in the shader editor would be simple and straightforward, as the same data block would be used for both: grass density and the mix shader, and the concrete tile pathway on this grass field can be drawn in weight paint.
Or, for the sake of argument, let's say you rigged a mesh and you want to color the vertexes in different random colors, based on what armature bone each vertex is attached to. Rigging can only be done with vertex groups, not generic attributes, so again, you need a workaround to get this to work.
From what you wrote to me it looks like a huge overcomplication because you either want to preserve some old scene setup with vertex groups driving the distribution, or you didn't made the grass scattering in GN in the first place (which was implemented for this exact purpose).
I found that editing vertex groups can have huge overhead with big meshes. General attributes are vertex groups on steroids, the only thing is that they lack is better integration in some places - like you mentioned rigging. This is pretty new system, so its expected.
Attribute painting exists - its Vertex Paint. If you want you can make new attribute in
Attributespanel and change the data type fromfloattocolorand you can paint on it right away.If you want the ability to select in edit mode what is already assigned to an Attribute (the way vertex group work), you have to make a boolean attribute. That way you go to "select" and "by Attribute" and you have the ability to have selection from Attribute. It's not as simple than vertex group but it work.
You can already do this. Just add an Attribute node and type in the name of your vertex group. It even updates in real time when you paint your group.
Yes I agree vertex group should work in the shader editor without going trough geometry node. And th silex for the "new method". And the other way I find to use the vertex groups is ; You have to create a color attribute + vertex group with the same name. And you have to create the color Attribute first otherwise there is a conflict and it says "coulnt be create". If you create the attribute first and then the vertex groups there is "Name collisions" warning, but it work. So it feel like a bug and not a normal behaviour.
You can already do this with geometry nodes.
I know, but it's obviously overcomplicated. It should be as simple as placing a "Vertex group" node.