If I have a model, for instance UV unwrapped, how can I from a texture assign a vertex group. White = assign vertex, black = don't assign vertex, values in between = halfway assigned vertex based on color intensity. A grayscale image would probably be used.
-
$\begingroup$ possible duplicate of Remove vertices based on texture $\endgroup$– Ray MairlotOct 16, 2013 at 10:14
-
$\begingroup$ It is a dubplicate, however the titles are so different I think this one deserves to be here, or does it? Thanks for pointing it out. $\endgroup$– GunslingerOct 16, 2013 at 17:27
-
$\begingroup$ @Gunslinger dups aren't necessarily bad, see blog.stackoverflow.com/2010/11/… and blender.stackexchange.com/help/duplicates, it will still "be here", just with a link to another post that answers the same question. $\endgroup$– gandalf3 ♦Oct 16, 2013 at 19:39
2 Answers
You can try the Vertex Weight Edit modifier. For example, I can input the following texture as a Texture Mask to the modifier:
... that will then use its value, to control how the modifier assigns weight to each vertex. Tweak at least the Default Weight, threshold settings and fallof type to get the result you need:
Though not instantly updated if we edit the image, the result shows up immediately, and is usable by modifiers further down the stack:
Default Weight and Add Threshold should be of that weight which you'd like to have as the end result, Add Threshold should be slightly less.
-
$\begingroup$ If you wonder why I hesitate to accept this answer, I can't get it to work for me. Will try more later. $\endgroup$ Oct 17, 2013 at 6:06
-
$\begingroup$ Check it through weight paint mode, maybe the modifier settings, or its position within the modifier stack (should be above whatever other modifier is using it). $\endgroup$– AdhiOct 17, 2013 at 14:24
-
$\begingroup$ @Gunslinger , did this ever work for you? Thanks. $\endgroup$ Dec 18, 2015 at 17:36
-
$\begingroup$ No, I think I did it another way. I don't remember anymore. $\endgroup$ Dec 19, 2015 at 12:36
-
$\begingroup$ @Adhi Could you please upload a .blend file with your solution. I can't reproduce it. $\endgroup$– vvoovvDec 10, 2016 at 23:52
I have a solution that works but is annoying:
- Create a new vertex group, and in Edit Mode assign all vertices to the group.
- Back in Object Mode add a VertexWeightEdit Modifier
- In the Falloff Tab create a custom curve and move the right point to 0.
- In the Influence Tab add the texture you've already created.
What this does is subtract the texture from the 100% weight of the original group. This means the final selection is the inverse of what you want: lighter parts of the texture are the least selected. So any time you use the Vertex Group you have to enable the invert button (Looks like this: <-> ) to get the result you expect.
-
$\begingroup$ Wow, almost 10 years ago. Time flies. Thanks for the answer, will check it out. $\endgroup$ Jan 31 at 9:47