View Full Version : Need help on Vertex colors in Maya.

09-03-2011, 03:04 AM

I have recently started to add vertex colors for Maya 2012 and are using VertexChameleon. I am really new to vertex lightning and need help with some basics. When you use vertex colors in Maya you have to choose a "material blend setting" also you have to choose what material channel you have to use.

1. Is it possible to have multible blending options for one model ?, example: i want "add" to some parts on the model that i want to glow more and "multiply" on some other parts where i just want the color to blend with the texture.

2. When i combine objects some vertex colors gets distorted. am i doing something wrong here or is it generally speaking a better idea to use vertex colors in the end after you merged the entire scene ?

3. While working in unity what setting do i need to change to see vertex lightning in there? (this is a question for a friend of mine who is a programmer not my part really)

4. does vertex color add extra drawcalls in an game engine or is it so basic that it doesnt slow down the game at all ?

5. What is the difference between diffuse + ambient and just diffuse material channel ?. It whould be great if someone could explain what the standard is for game production.

6. I am trying to create a glow that fades up on an edge but cant get the result i want. Basicly i want a color that completely overlays the underlaying texture. I am trying to erase an edge between a glowing field and a wall (look at attachment)

I guess that this is a bunch of really stupid question but i really have no clue where to start. any tutorials on this matter would be very appreciated.

Thanks alot !

Thanks alot guys.

09-03-2011, 05:53 AM
1. modulate x2. note that if you use this mode gray is the midpoint instead of white.
2. maybe you're having triangulation issues. vertex colors interpolate over triangles so the way they are oriented is actually important. that said it's easy to just flip edges on the combined objects.
3. you need a custom shader. here's one that does mult x2 vertex colors over a diffuse texture. (http://privatepaste.com/9aa406d0a7)
4. no, no extra overhead. it requires some extra memory for storing the colors in the vertices, but this isn't an issue in unity since the color data is there by default.
5. put stuff in the color/diffuse channel. ambient doesn't react to lighting the same way but it's not important for game dev.
6. mod x2 etc is both multiplicative and additive so that should fix half your problem.

09-03-2011, 02:45 PM
Thanka alot man for the help ! I havent had time to really dic in to it yet but the little i tried worked perfect,thanks alot !