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).
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
111 People are following this question.
Creating a mesh and assigning a material during edit time.
Alternative Ways of Finding Vertices
Why does the Unity Editor display full mesh after I've programmatically removed vertices?
Material has milky overlay
How to cut meshes ?