Is it possible to use vertex groups as factor to mix shaders ?

Hi,

I wanted to try something: I have a mesh with a weight map named “Group”. I thought I could use it as a factor to mix 2 shaders but i don’t know how to. Does anyone know ?

I know it is easy with vertex paint, but I thought it would be possible with groups as well…

I think dynamic Paint can do that.

http://www.miikahweb.com/en/articles/blender-dynamicpaint-basics

I was looking for a way to do this a while back and I ended up having to write a little script that copied my weight groups to a black and white vertex paint and then used an attribute node for that. If you find something easier, let me know.

I just thought I’d give it a try myself and I came up with this solution for Blender Internal although I am pretty sure is can easily be ported to Cycles as well.

The Cube is the canvas and the sphere is the brush. Use the Vertex Alpha from the Geometry node to drive the mix between the two textures. Move the Sphere to cross-fade between textures.

NOTE: You must select the same paintmap in the Geometry node as you have setup as the target map for the canvas.

Attachments


27_dp_example.blend (129 KB)

@ atom: thanks a lot. It seems to me that you are more or less creating a Col map (aka vertex paint), aren’t you ?
I was rather searching for a way to use vertex groups as vertex paint maps.
I know a bit about dynamic paint, but it was a nice refresher !

@ m9105826 : yes, i thought there would be a way to do just that: so i searched for a tool, a ricght-click thing that could convert a weight map into a BW vertex paint map, but i haven’t found any.
Do you still have your script handy ?
Would you mind sharing it ?
Maybe there’s a way to incorporate it nicely (for example in the dropdown menu for the weight groups ?)