Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

How many submeshes are too many

Discussion in 'General Graphics' started by plasmabazooka, Mar 12, 2015.

  1. plasmabazooka

    plasmabazooka

    Joined:
    Mar 8, 2015
    Posts:
    70
    I've tried to find a proper thread but have not succeeded.

    I'm doing a house model and there are a lot of different textures and materials.
    Because maps for objects such walls are based on tiling I cannot use one texture for all.
    And every material comes from Blender as a submesh. There are not so many faces actually for each.

    So If I have for a house 10-15 submeshes and 15-20 houses for a scene would it be affordable for PC and Android?
     
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    If the materials used are the same across the different houses, they can be batched together. Have a look at static or dynamic batching documentation.
     
  3. plasmabazooka

    plasmabazooka

    Joined:
    Mar 8, 2015
    Posts:
    70
    Materials are the same across different houses. Just different meshes and UVs.

    I've looked batching documentation and seems it is working. I have bathed calls.
    But I cannot use static for houses because right now there are issues with different lightening for static and dynamic objects in Unity 5 right now.
    And I'm not sure if I can use house as static when light is fixed because I want those to be destructible because if a wall is destructed I need to remove the whole mesh from scene and replace it with sliced mesh with rigidbodies if that is a correct approach.