3
$\begingroup$

I suspect, but can't prove, that the answer is "No", as materials are meant to be portable. However, I don't see why we couldn't implement something that would at least look up the vertex group name to be sure and return a default value otherwise.

I'm working on some very visceral-looking alien architecture, and I assumed that I could use a vertex group (and its associated weight painting) as the factor input to a mix shader. However, when I go browsing through Input nodes for my material, even though I could swear this was in there at some point, I'm coming up with nothing.

I may end up doing something complicated involving a custom property and a sequence of drivers here, if I can't find it. Seems overkill for a material, but thems might be the breaks.

$\endgroup$
2
  • $\begingroup$ Try an attribute input and set it to the vertex group name. It’s a long shot, but it works in geometry nodes. $\endgroup$
    – TheLabCat
    May 31 '21 at 3:13
  • $\begingroup$ It didn't work, but thank you, it was a great idea. I feel like it might still work if I could remember the path to the uv nodes. @ZargulTheWizard Do you think this might be a decent development suggestion or personal implementation? I mean we have vertex colors accessible (which is what I'll be doing next). $\endgroup$ May 31 '21 at 3:41
4
$\begingroup$

Since Geometry Nodes, certainly in 2.93, you can reference any GeoNodes attribute in the 'Attribute' input to a shader tree. Strangely, I don't think you can get at a vertex-group directly (yet).

You can do it by transferring the weights to an attribute created in the GeoNode tree. (e.g.) Attribute Fill your chosen name with 0, and Attribute Math add the vertex-weights from the group to that name.

Pre GeoNodes, there's @Nathan's Wonderful Workaround :)

$\endgroup$
2
  • $\begingroup$ Personally, I wish vertex-weights were a little more smoothly integrated into all other branches of the application, as they were in XSI. $\endgroup$ May 31 '21 at 8:48
  • 2
    $\begingroup$ That hack is genius. Here I was about to say that this was useful information but I'm looking at material nodes; then I notice this. Honestly I've done everything I need to do in a cleaner manner with texture painting; but thank you for this. $\endgroup$ May 31 '21 at 13:14
0
$\begingroup$

So, after some digging, I've determined that the answer is effectively "no", most likely for the reasons above; but it's also redundant. You can easily simply UV-unwrap, and then texture paint any number of textures to carry your data in an R, G, B, or A channel; then reference the channel in the material. Or, given that your mesh is fine enough and you won't mind the interpolation, you can just paint vertex colors and reference the channels of those—which you can also have several of if you need them.

This in mind, weight painting has come to feel almost like a redundancy at this point, which gives me both questions about the future, and actually great ideas for it.

$\endgroup$
0
$\begingroup$

So i think i just figure it out, so i created an input attribute of my vertex group in this case called ´´damage´´ in the new geometry nodes (Blender 3.0 beta) then i added a set material node with the material that i am gonna use, for the object in this case called ´´Rock´´ after that i created an output attribute and connected it to may vertex group, and i called it ´´RockPaint´´ after that i just went to the material ¨Rock¨ and added an attribute node that outputs ¨RockPaint¨ that way i can use it as a mack for my different materials.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.