Vertex Painter Function

This material function is entirely my design and idea. I learned the basics of vertex painting from eats3d.


The function is very simple when broken down. Red represents the input values, Blue represents the "meat" or functionality of the material function, and Green represents the outputs, the results of the input values going through the meat of the function.


The actual blending of the textures is simple. Vertex color is controlled by the alpha(can be any channel) which is passed through a multiply node and then an add node. This allows the blending mask(Vector 3 Input) to be mixed with the alpha channel but the vertex color will still be in control. It then goes into a power node with the exponent being how sharp or blurry you want the blending(Scalar Input). Finally it is passed though a clamp(min=0,max=1) due to lerp (Linear Interpolate) nodes needing a 0 to 1 value for a scalar value.




Next, the clamps output goes into the alpha input in the lerp node of each set of maps you have(Diffuse, Normal, Specular, etc.). Using Vector 3 Input nodes, create two for each map you have. For example, for diffuse you will have two input nodes, one for the Base diffuse map(B slot) and one for the detailed or changed diffuse map(A slot).

Finally, the outputs of the Lerp nodes go into an output node and that will complete your material function



Now, when you call your Vertex Painter function node you will get something similar to this. Your inputs(Red) on the left side of the node and your outputs(Green) on the right. Plug in your maps and you now have a vertex painting material that will blend all your maps together using the same blending mask

No comments:

Post a Comment