Search Unity

Low Poly World Performance

Discussion in 'General Graphics' started by Spiraseven, Jun 12, 2019.

  1. Spiraseven

    Spiraseven

    Joined:
    May 2, 2014
    Posts:
    25
    Hi all, I am developing a low poly mobile game. I have been trying to decide on the best approach for me to develop my 3D models, color them, and arrange them in Unity easily. Performance was a big question in my mind, more so because I want to do things in a proper way. I was wondering if anyone would recommend:

    1. Static batching the models (they will not move) vs GPU instancing.
    2. If I should use one texture pallete and one material for all my models, or if I should use one material and use the material property block to color them differently as in this post (https://thomasmountainborn.com/2016/05/25/materialpropertyblocks/)

    Any other ways of handling a low poly world would be greatly appreciated!
     
  2. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    Last edited: Jun 13, 2019
  3. Spiraseven

    Spiraseven

    Joined:
    May 2, 2014
    Posts:
    25
    TLDR: I ended up using static batching, realtime shadows, and material property blocks to change all my lowpoly models colors. Using proper settings I can get good performance on mobile with this (even with realtime shadows), and this setup is the fastest for me in terms of development time, least space used (no lightmaps), and performance.

    Thanks for the information. It did help give me some good hints.

    I ended up using static batching, but no lightmap as the amount of levels and objects I have would make the game a bit too large. I am using a realtime light, even though it is a bit more costly.

    In terms of coloring. I started by using vertex colors, and created a script in unity to change the colors in the editor. This caused some issues with prefabs, I think because changing the vertex colors in the editor creates a new instance of the mesh for my model. So I ended up going with changing colors of all my models using material property blocks. The downside to this is I get 1 draw call per different color I use that is in view. I found it to be quicker to iterate on then creating a texture atlas and changing uvs, though. I am not getting more than 20 draw calls at a time in my game so this seems to work. Realtime shadows essentially double the draw calls, one new draw call for each static batch that needs shadows. So I am keeping the casters to a minimum and the shadow distance to a minimum as well. I might still go to using baked lighting, but it seemed like the total of my lightmaps for all 100 levels I would like to have will end up making the game a bit bigger than i would like.
     
    BrandyStarbrite likes this.