This is a great article! I'm using this technique as well, and it's great. I'm doing this with terrain textures, foliage, rocks, etc.
One big disadvantage I found is how monochrome all the models end up looking, because the color resolution is limited by the vertex resolution. So for example you can't have green mold dripping down the sides of your wood bucket. Unless you use the blue channel as a "green mold" mask.
How did you get hard-edged vertex color in Unity? Are you breaking the vertices there? AFAIK Unity only allows one vertex color per vertex.
@Eric Chadwick Thanks man, I'm glad you like it.
It shouldn't be too monochrome but yes, it is limited by the vertex resolution unless
you have the option to use decals so you can add drips etc.
In Maya you can paint by faces, it doesn't seems to change the vertex count but
Unity will read it as 2 vertex, since the bucket is very low poly it didn't affect the performance.
@Lamont I didn't really understand your question but our lighting was done
by hand, we selected warmer tones for the top part and cooler for the bottom one.
People reinventing the wheel ^^
For unity, fbx doesnt support vertex color by face, but dae does.
I begged for a Maxscript on cgtalk to split vertices by color, in order to export with fbx to unity.
If it can help http://forums.cgsociety.org/showthread.php?t=1185723
In the end, i think that's how every engine deal with it, adding points, as for smoothing groups.
@m4dcow
That looks great, I saw the vertex chameleon plugin but since it was really dated I didn't think of using it,
so I just used Maya native tools. I should try vertex chameleon, maybe it will help us to improve our workflow.
@Kryzon
For some reason I can't see the first image but when I checked the link it worked...
This is also a great use of it, I can see they also used shadows in the texture probably to save some poly count, mainly the roof shadows.
@Noors
I think you are right, that's the solution of most engines, I don't see any way they can break the colors without adding vertex.
I just wish that Maya could show the game engine vertex count.
I've used lights and baking for vertex lighting in the past (and will use it on my own project). Hand painting is fine for Nintendo style games but there are other ways to use vertex lighting.
The technique I used on four Need for Speeds (PS2, XBOX, Gamecube, Wii, XBOX 360, PS3 and PC)
- NFS Underground - vertex lighting, everything lit by lights and baked using radiosity, bounce card placed under models to allow bounce lighting on bottom verts
- NFS Underground 2 - similar to Underground, but used additive textures on windows, light beams, etc to add detail
- NFS Most Wanted - two sets of vertex lighting with radiosity (two times of day) plus a diffuse grayscale baked vertex lighting channel used during rain (overcast)
- baked shadow maps on floating polys over roads, terrain and big walls
- next gen used realtime lighting with some vertex lighting, dynamic realtime shadows on next gen were actually lower resolution than the static baked shadows on PS2 and XBOX 360
- NFS Carbon - vertex lighting similar to Underground but roads also lit by models lighting to create better blending
- on next gen platforms still used vertex lighting but car headlights created realtime lighting/shadows to blend with vertex lighting
I also used vertex alpha to blend shadow map edges to transparent in some areas. That way, I didn't have to use an alpha channel in the shadow maps (I used a multiply blending shader for shadow maps).
I think Resident Evil 4 used the vertex lighting plus floating shadows technique. I saw Z-fighting in a few spots on the shadow maps.
Each game had about 5,000 unique models plus another 5,000 LODs. I had to re-model about a quarter of the models on Most Wanted and Carbon (previous games I only worked on my areas) to create more even poly distribution and make vertex lighting look correct.
The programmers also had a "vertex doubling" function in the game so the vertex colours were "doubled". This makes it easier to create hotspots in the vertex lighting and makes the falloff look closer to natural lights.
I used a lot of scripts to fix things. Seams are a big problem on terrain when the terrain is cut up and spread across multiple environment art files. I used a maxscript to load terrain pieces into a new file and blend vertex colours on adjacent pieces. This made the lighting look seamless.
A lot of these techniques could be useful on a mobile game.
Thanks for this writeup RyanB! Vertex doubling is probably 2x multiply, I'm using that also, very handy, effectively doubles the color range. Middle grey is no contribution.
I've been using VPaint in Unity quite a lot lately, it's one of the best vertex color toolsets I've seen. Bake lighting to vc, bake colors from terrain onto bottoms of meshes, use layers, etc.
Replies
One big disadvantage I found is how monochrome all the models end up looking, because the color resolution is limited by the vertex resolution. So for example you can't have green mold dripping down the sides of your wood bucket. Unless you use the blue channel as a "green mold" mask.
How did you get hard-edged vertex color in Unity? Are you breaking the vertices there? AFAIK Unity only allows one vertex color per vertex.
It shouldn't be too monochrome but yes, it is limited by the vertex resolution unless
you have the option to use decals so you can add drips etc.
In Maya you can paint by faces, it doesn't seems to change the vertex count but
Unity will read it as 2 vertex, since the bucket is very low poly it didn't affect the performance.
@Lamont I didn't really understand your question but our lighting was done
by hand, we selected warmer tones for the top part and cooler for the bottom one.
http://renderheads.com/product/vertex-chameleon/
Which was recently made open source.
First is with vertex colouring, then with it turned off:
For unity, fbx doesnt support vertex color by face, but dae does.
I begged for a Maxscript on cgtalk to split vertices by color, in order to export with fbx to unity.
If it can help
http://forums.cgsociety.org/showthread.php?t=1185723
In the end, i think that's how every engine deal with it, adding points, as for smoothing groups.
That looks great, I saw the vertex chameleon plugin but since it was really dated I didn't think of using it,
so I just used Maya native tools. I should try vertex chameleon, maybe it will help us to improve our workflow.
@Justo
Your welcome!
@Kryzon
For some reason I can't see the first image but when I checked the link it worked...
This is also a great use of it, I can see they also used shadows in the texture probably to save some poly count, mainly the roof shadows.
@Noors
I think you are right, that's the solution of most engines, I don't see any way they can break the colors without adding vertex.
I just wish that Maya could show the game engine vertex count.
I've used lights and baking for vertex lighting in the past (and will use it on my own project). Hand painting is fine for Nintendo style games but there are other ways to use vertex lighting.
The technique I used on four Need for Speeds (PS2, XBOX, Gamecube, Wii, XBOX 360, PS3 and PC)
- NFS Underground - vertex lighting, everything lit by lights and baked using radiosity, bounce card placed under models to allow bounce lighting on bottom verts
- NFS Underground 2 - similar to Underground, but used additive textures on windows, light beams, etc to add detail
- NFS Most Wanted - two sets of vertex lighting with radiosity (two times of day) plus a diffuse grayscale baked vertex lighting channel used during rain (overcast)
- baked shadow maps on floating polys over roads, terrain and big walls
- next gen used realtime lighting with some vertex lighting, dynamic realtime shadows on next gen were actually lower resolution than the static baked shadows on PS2 and XBOX 360
- NFS Carbon - vertex lighting similar to Underground but roads also lit by models lighting to create better blending
- on next gen platforms still used vertex lighting but car headlights created realtime lighting/shadows to blend with vertex lighting
I also used vertex alpha to blend shadow map edges to transparent in some areas. That way, I didn't have to use an alpha channel in the shadow maps (I used a multiply blending shader for shadow maps).
I think Resident Evil 4 used the vertex lighting plus floating shadows technique. I saw Z-fighting in a few spots on the shadow maps.
Each game had about 5,000 unique models plus another 5,000 LODs. I had to re-model about a quarter of the models on Most Wanted and Carbon (previous games I only worked on my areas) to create more even poly distribution and make vertex lighting look correct.
The programmers also had a "vertex doubling" function in the game so the vertex colours were "doubled". This makes it easier to create hotspots in the vertex lighting and makes the falloff look closer to natural lights.
I used a lot of scripts to fix things. Seams are a big problem on terrain when the terrain is cut up and spread across multiple environment art files. I used a maxscript to load terrain pieces into a new file and blend vertex colours on adjacent pieces. This made the lighting look seamless.
A lot of these techniques could be useful on a mobile game.
I've been using VPaint in Unity quite a lot lately, it's one of the best vertex color toolsets I've seen. Bake lighting to vc, bake colors from terrain onto bottoms of meshes, use layers, etc.
Also, thanks for the link Noors, very helpful.