Home Technical Talk

How to have 2 Vertex colours in one Cycles material ?

polycounter lvl 4
Offline / Send Message
drpeppercan polycounter lvl 4

Is it in combination of the Vertex Groups or Vertex Colours, and the Attribute node maybe?

Name  vertex_grps_colspngViews 43Size  145 KB Name  vertex_cols_nodespngViews 41Size  309 KB 


This is what it should look like:

Name  vertex_cols_examplepngViews 33Size  361 KB

Thanks a bunch guys 
DPC

Replies

  • drpeppercan
    Offline / Send Message
    drpeppercan polycounter lvl 4
    I'm thinking this might be easiest to do with Texture Painting: Face Selection Masking.
    It won't be vertex colours, but I was going to bake the vertex colours anyway, giving me an image too.

    It would be nice to solve this thread too anyway.

    DPC
  • drpeppercan
    Offline / Send Message
    drpeppercan polycounter lvl 4
    Somehow it worked once only. No matter what I do it's no longer working :(
    Some of the conditions I'm respecting:
    1. Ensure each sub-material has an Image Texture node.
    2. Ensure both Image Texture nodes point to the same image file. Assuming you want all colours into one file.
    3. Ensure both Image Texture nodes remain selected before hitting Bake.
    4. Ensure all faces are selected before hitting Bake, if in Edit mode. If in Object mode, just select the object before baking.

    I'll try again in a new file. As soon as Blender unfreezes :(
  • Prime8
    Offline / Send Message
    Prime8 interpolator
    Regarding the vertex colour topic, I hope I understood correctly what you are trying to do. :)
    To achieve such hard transition between the colours, as shown in your example, you would need a lot of geometry because the colours blend between the vertices.
    I would rather create a black and white mask with vertex colours and hook it into the Mix Shader node as factor, instead of different vertex groups for each colour.

    Another option would be to assign two different materials to the faces instead of using vertex colours, that gives you the sharp transitions.

    I do not understand the rest of what you wrote tbh. 
  • drpeppercan
    Offline / Send Message
    drpeppercan polycounter lvl 4
    Sorry I didn't get back to you any earlier :(
    Also sorry I wasn't any clearer explaining my issue.
    But now that I read yours I can see that I had been misusing the term "vertex colours". I meant "a colour per polygon face". What is this type of colour called then?
    So then, what would be the nodes setup like to have the colours on the mesh as they show in my 3rd image above on the 1st post?

    For some reason, even though I am covering all those conditions I mentioned in post #3, it fails to render one of the colours "sometimes". Yes, sometimes it works, and sometimes it doesn't :(
    A rather finicky procedure. I can't tell what made it not work before. Food for thought I guess.

    Tai from BlenderArtists was kind enough to reply this below:
    "Do not know if You have seen this video...Baking Normal with Cycles...There is some good advice in it.
    Sorry I misunderstood Your first question.
    You use the attribute node to render Vertex color....So far I know- Name in the attribute node is case sensitive.
    In Your picture...There are Big G in Green - in the attribute node and g in green in the material box.
    Hope this make a little sense...
    Tai
    "

    I still have to check that video.

    DPC
  • Prime8
    Offline / Send Message
    Prime8 interpolator
    Not sure how it's called exactly, multi-material maybe.
    It's what I described above, you just have the add the different materials to your mesh and then apply each material to the faces in edit mode.
    Nodes are setup individually for each material, they don't influence the separation,
Sign In or Register to comment.