- Home /
Multiple materials vs Multiple Meshes. Which is better for performance?
Hello!
You can skip to the end for the TLDR version
I'm working on a 3D endless runner for Android and IOS. I decided on most of my workflow and architecture, but can't seem to reach a decision for creating environment assets. What I'm interested in most is performance and having ambient occlusion baked in the texture.
I know the best way would be to create each section (that is randomly instantiated as the player progresses) as a single mesh and bake a single texture for this, but I want to bake Ambient Occlusion too and I can't get away with 1024 and lower resolutions, I need at least 2048 atlas for each section.
Furthermore, the trade off for this performance would be development time. It reduces the flexibility Unity editor provides when it comes to designing environments. I would have to create each section in Blender. That would be ok, if it weren't for the fact that I need to re-texture every element of my sections for each section I create.
I'm thinking of creating each asset individually (ground, buildings, props etc.) and bake the ambient occlusion in each of their textures, move them to Unity and here design all combinations needed for my sections and then create an editor script that will Combine the meshes together, while keeping different materials for each asset. That means I will have only 1 Mesh with multiple materials. Is this better than Multiple meshes with each own material?
TLDR: Which is more performant? Having multiple meshes or having a single mesh with multiple materials (I know the most performant is 1 mesh 1 material 1 texture atlas, but I explain above why I want to get around that).
Thank you!
Your answer
Follow this Question
Related Questions
Creating a mesh and assigning a material during edit time. 1 Answer
Profiler.GetRuntimeMemorySize(xxxx) always returns 0 1 Answer
Hiding seams between planes without using mesh combiner 1 Answer
Fix uneven application of a texture/material 0 Answers
How do I use the same material on 2 meshes without distortion? 2 Answers