Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Extreme performance killer although it should not be one

Discussion in 'General Graphics' started by deLord, Sep 16, 2017.

  1. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    Just having an empty scene with a 20x20 fully visible terrain in it.

    After experimenting for ages, I found the following fps on my device:
    9-12 textures added: 10 fps
    5-8 textures added: 14 fps
    0-4 textures added: 25-40 fps

    The terrain always uses only 2 textures, no matter how many I added. There aren't even normalmaps added.
    How can that be? All textures are the same, there is no heightmap (all flat) and the least possible resolution in the terrain settings.

    It can't be that this is only my phone, I assume this is a Unity performance bug. The terrain data is less than 80kb, textures are 256x256. HW specs: Motorola Razr Maxx (from 2011), 960x540. Unity 5.4.2f2

    I know that my friends with newer phones do absolutely not have that problem (constant 60). But: there seems to be a bug, if you ask me, and I have no idea how much performance that will cost in general.
     
    Last edited: Sep 16, 2017
  2. brownboot67

    brownboot67

    Joined:
    Jan 5, 2013
    Posts:
    375
    Your phone is 6 years old. That's a million phone years. Lots of stuff will run bad on that phone.

    Unity terrain is very inefficient. You should use Microsplat shader off the store (its free) which will give you some better performance.
     
  3. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    Thanks for the hint. Although: "Requires Unity 5.6.1 or higher."

    I know the phone is old. Yet, I am not sure whether this is a Unity bug or some bug on the phone.

    Not gonna buy a new phone just to test the game on it ;)
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You need to do some research, it's not possible for you to use the standard shader here. The correct practise for this mobile phone would be to use a mesh, and a mobile shader suitable for that purpose. Microsplat will probably not run on that phone.

    The Unity terrain is fine for ancient 8 year old phones with the provision that the detail is low and the shader absolutely optimised for such a poor device.
     
    theANMATOR2b likes this.
  5. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    Well, today I tested it on a friend's phone from 2016, same low fps as with my phone.

    so if the terrain is fine (for old phones, why not for new??) then why is it so slow?

    Please tell me on what exactly to research here. Change shader for what? How to change the shader for the terrain?
    Use a mesh? Then what is the Unity terrain for?
    I don't even really need a heightmap, a "paintable" plane would do the same thing
     
    Last edited: Sep 17, 2017
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I told you: the shader. Make an optimised one or find one. This thread is about performance killing and I think I answered why that is, so good luck :)
     
  7. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    Did you understand my terrain is the only thing that is being rendered, there are only 5 textures applied, there is no height, all details are lowest? Just to say "your phone is old" is not really helpful :(

    Why do I need to write my own shader for the Unity standard terrain? I have all the details off, 1 plane surface. How in god's name can this cause performance problems on a 2016 phone? I am just looking into changing the quality settings ingame, mb that helps :/
    Moreover I still did not understand how I should change the shader for a terrain. If someone could explain me that, that'd be awesome :)
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Make a new thread for that question, I think. Use a proper topic title, not some random comment about performance, and people will actually read it.

    Example:

    "Need optimised mobile terrain - please advise" etc