Home Technical Talk

[MaxScript] Split vertex color in Vertex Paint Mods

polycounter lvl 7
Offline / Send Message
EspiSensei polycounter lvl 7
Hello everyone!

I am trying to create a script that read all vertex color of a mesh, split the colors in RGBA and then create for each color a "Vertex Paint" modifier which i could modify the specific color.

upload the code and a little example:

Thanks again for all guys!



  • Swordslayer
    Offline / Send Message
    Swordslayer interpolator
    You'd have to change your expectations with separate vertex paint modifiers where you can easily modify the channel, vertex paint doesn't expose any methods to do that. You could have a SimpleMeshMod (or DataChannel modifier) that extracts the vertex color of your choice - or for the sake of simplicity make three copies of the original mesh, each using only one extracted VC. Then you can use vertex paint, and combine the results at the end.
  • EspiSensei
    Offline / Send Message
    EspiSensei polycounter lvl 7
    mm......Ok, Maybe i will start with the second option because i don't know anything about SimpleMesh Mod or DataChannel Mod  :(

    Thank you again dude! I will post the news about that ^^
  • Eric Chadwick
    You could do this with VertexPaint. Each modifier could be used to paint only that color, and you could use Additive blending mode to combine them.

    The only thing in the way is you can't force each modifier to only one color. You would juat have to be very careful to only pick and paint with Red in the red modifier.

    But the modifier order could easily be setup like your screenshot.
  • EspiSensei
    Offline / Send Message
    EspiSensei polycounter lvl 7
    hello everyone! 

    i just finish the RGBA vertex painter tool.

    Finally i have created a tool Which copy 4 times the original model and each one paint with R , G, B or A, you can edit and save the changes.

    here a example: 

    Thank again for your support guys! ;)
Sign In or Register to comment.