2
$\begingroup$

I am wondering if it is possible to assign different shader's based off the colours of a Texture Painted UV Map that is assigned to an object? I've seen a couple of tutorials that use the Separate RGB node to split the colours, and then assign the shaders based off the result, but i was unsure if there was a simpler setup that followed a rule of 'if UV mapped texture = certain colour, assign this shader', possibly involving a ColorRamp node, for example?

Here is my progress so far: Progress Image Essentially each colour on the sphere would have a different shader assigned to it.

Thanks!

$\endgroup$
  • 1
    $\begingroup$ I'd say this is more work for Vertex colors and Vertex Paint. You paint there something on the mesh which will be a mask for shaders you'll add after that. In the material you add those vertex colors as a mask to the Factor input. It may be needed to add as many masks as there are shaders though but you really would specify " if certain colour, assign this shader ". $\endgroup$ – Mr Zak Dec 15 '15 at 21:12
  • $\begingroup$ Sure, i did wonder whether vertex paint would be suitable for this, and it probably would be in this instance. As far as i knew though, for vertex painting to work well you have to follow the direction of placed vertices and edges of the mesh, whereas with texture painting colours can be painted smoothly across the surface of the mesh, without necessarily following topology? $\endgroup$ – Hexbob6 Dec 15 '15 at 21:19
  • 2
    $\begingroup$ Nope, there isn't an easier way. Just use a Separate RGB node and plug the individual color channels into mix shaders. $\endgroup$ – PGmath Dec 15 '15 at 21:38
  • $\begingroup$ Yes, that's really the downside of that method. You still can use almost this approach but painting a texture instead, so using Separate RGB node, as PGmath already mentioned and plug its data as a mask. Having texture like this you'll get something like this (the setup is quite messy, hope you get the idea). $\endgroup$ – Mr Zak Dec 15 '15 at 21:46
  • $\begingroup$ @MrZak , thank you for the screenshots, what is the exact purpose of the ColorRamp Nodes in that instance? :) Carlo, That looks like it might be useful actually, i'll give it a look! $\endgroup$ – Hexbob6 Dec 16 '15 at 0:40