Pages

Sunday, July 15, 2012

Texture Mask vs. Vertex Colors vs. Material IDs

This is an addition to yesterdays post:
http://oliverm-h.blogspot.de/2012/07/ue3-performance-analysis-material-ids.html

Since the vertex color solution is so expensive I've made a masking texture with the same colors this time, using the second (lightmap) UV channel. The material is identically.


The result is exactly the same as with vertex color blending. Next to the material complexity it's probably the blending of textures itself that is causing a performance impact, no matter if the blending is based on vertex colors or texture masks.
So as long as you don't need smooth texture transitions you should stick with multiple materials or split up the mesh into multiple pieces. However this is for PCs only, if it comes to PS3/XBOX you have to keep an close eye on the total draw call count, according to Epic.

Comparing vertex colors and texture masks, they both have their dis/advantages. Texture masks causes the VRAM usuage to be higher. Vertex colors on the other hand will increase the static mesh mb size, so this might be a bad idea for meshes with a very high triangle count.


No comments:

Post a Comment