It seems like vertex color data on meshes aren’t taken into account when lightmass calculates its lighting.
Simple mat that uses the red vertex channel and a mask to blend between two colors. (Extreme green and pink for easy viewing )
Result after vertex painting and baking -
As you can see, after vertex painting green is the dominant color on the mesh yet it still bounces around just the pink color.
After switching around the green and pink constants in the lerp node -
The opposite occurs, making it seem like lightmass only takes into account of the color / texture that is connected into the b input of the lerp node and ignores all vertex painting.
Lightmass bakes out materials in the 0-1 UV space a single time to keep build times low, instead of for every triangle they are applied to. This means that any per-instance properties like vertex color, world position, camera vector etc are not going to be correct and use defaults. You can use a LightmassReplace node to have it use something different for lighting than what you see rendered.
Ah that makes sense. I know there are only very specific situations where a feature like this would be needed (materials being blended that have high contrast ex. gradual buildup of snow on dark asphalt) but any chance of adding some sort of option, either for meshes or materials, that tells lightmass to calculate materials for each triangle instead of just using the uv space? This way you can make sure it’s only doing the extra baking calculations for the mesh instances / materials that absolutely require it.
I know you guys have a ton on your table already so maybe just stuff this somewhere in the “Maybe One Day” folder
Old post, but first on Google: I have a change ready that enables VertexColor GI. It will be exposed with 4 checkboxes in the Material, one of them enables scaling the diffuse color by VertexColor.RGB. So passing in LightmassReplace = (1,1,1,X) would give you pure vertex color GI. There are checkboxes to tint and scale the emissive as well (static emissive vertex color lighting). I’ll update this post when I have the Pull Request ready, I might need community support to push this faster since it’s a slightly bigger change.