Home Technical Talk

Vertex Painting in Unity 3

Anyone know how to keep the vertex painting information from Maya when I export from Maya into Unity?

Replies

  • Ben Apuna
    Options
    Offline / Send Message
    FBX or COLLADA is how I do it from Modo, should be the same with Maya.

    EDIT:

    Oops! didn't read the "3" part of Unity... well that's what I've been doing with Unity 2.6, I'm thinking it should be the same with Unity 3. I haven't had much time to mess with Unity 3 yet. It could possibly be a bug if it's not working as expected.
  • achillesian
    Options
    Offline / Send Message
    fbx doesnt seem to be working... is there a setting in unity i need turned on? A post I read on unity forums said i might need a special shader...
  • Ben Apuna
    Options
    Offline / Send Message
    Yeah you won't immediately see any evidence of vertex colors when you import your model unless you apply a shader/matarial that uses them. If you import the Standard Assets (Mobile) unity package into your project there is a Mobile Vertex Colored shader in it. Right click that shader -> Create -> Material. Then drag the created material onto your mesh in the scene Hierarchy panel. You should then see your vertex colors.

    Other than that the only other way I know of to check to see if vertex colors were imported properly is to click on your mesh in the Project panel then look at the Preview section in the Inspector panel. It should list things like vert and tri count along with your uv channel(s) as well as the word "colors" it indicate that vertex colors are present.

    Unity3_VertexColors.jpg
  • achillesian
    Options
    Offline / Send Message
    Thanks Ben, that does work. Will it be impossible to use vertex colors with say, the toon shader? (I think Nintendo did this for Zelda WW)
    link%20windwaker.JPG


    Or am I forced in having a diffuse with the flat coloring/style I want.
  • Snowfly
    Options
    Offline / Send Message
    Snowfly polycounter lvl 18
    There are little touches all over that model that show they used a mostly flat diffuse anyway (boot creases, edges of the tunic, lips, not to mention shield and sword).

    Wouldn't it be possible to frankenstein a new shader out of the vertex color and cell shading ones?
  • Ben Apuna
    Options
    Offline / Send Message
    Sorry, I haven't looked into any of the Unity toon shaders yet. I'm pretty sure almost anything is possible with a bit of tinkering about with the shader code.

    Fortunately there are a couple of node based shader editors for Unity 3 which should make that a whole lot easier.

    ShaderFusion by commander_keen.

    and

    Unity 3 Node Based Shader Editor by Unity community members Stramit and Texel.
  • achillesian
    Options
    Offline / Send Message
    What I'm considering now is low rez diffuse, mostly flat colors for characters, and straight up vertex painting for buildings and props. Thanks for your guys' help.
  • bugo
    Options
    Offline / Send Message
    bugo polycounter lvl 17
    you can still resize the uvs into a 3x3 px size spot to create your color if you want just a flat color
  • nosleep
    Options
    Offline / Send Message
    Sorry to necropost, but I built a vertex painter Editor tool in Unity3d. It also includes 9 blend shaders.

    You can paint vertex color in the editor, as well as paint skinned cloth weights.

    http://dl.dropbox.com/u/18986451/GrantSimpleSoftware/gss.html
Sign In or Register to comment.