- Home /
Vertex colours - can they improve performance? Do they affect batching?
http://docs.unity3d.com/Documentation/ScriptReference/Mesh-colors.html http://docs.unity3d.com/Documentation/ScriptReference/Mesh-colors32.html
Not sure if folks are familiar with the original Rebellion Alien versus Predator game, but my understanding was that in order to overcome memory restrictions the level textures were stored as greyscale which were then tinted by vertex colours. In addition to this, there's a lovely document here: http://athey.deviantart.com/art/Resistance-Level-Art-QandA-117607780 ...which highlights the importance of vertex colours for high performance in areas of low memory.
Is there anybody out there who can tell me if this is an avenue worth pursuing for first person games on IOS/Android/PC? Not huge environments (say, the halls, conference rooms and hotel rooms of a decent hotel as an example), but quite detailed.
I'm happy to hear I can just ignore this, but I'd love to hear details. =)
Thanks in advance,
--Rev
(Quick follow-up - is there an obvious GUI method to do the tinting or should I just add a script to each mesh object? Is there a best method of exporting meshes with vertex colour?)
Can only address the part of your question: changing vertex colors in the mesh does not break dynamic batching. But note that batching is limited by the number of vertex attributes on a mesh, and adding vertex colors can push a mesh above the limit. The limit is 900 vertex attributes.
Thank you for another very informative answer, Robert. I wonder, is there an easy way to identify when you're getting closer to the 900 vertex limit. Hmm. Time to investigate the Stats overlays...
Cheers! --Rev
Select your mesh in the Project folder and take a look at the bottom of the the Preview window for information on that mesh.
Answer by TheAleksandar · Mar 20, 2015 at 04:52 PM
https://www.youtube.com/watch?v=O3dbE2t8lPQ More then a year too late, but none the less i hope this helps future viewers.
Your answer
Follow this Question
Related Questions
Colors do not work with a mesh created in script? 3 Answers
Vertex color by face 1 Answer
Changing vertex colors break batching? 3 Answers