Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by AndreasX12 · May 12, 2014 at 07:39 PM · androidterrainlagcloseframerate drops

Unity Android lag when close to terrain

I have a simple Unity Android scene with a terrain with some textures. There are no trees, grass etc. and the texture-size is very low. I test my game on high-end devices.

Usually, there are no problems when I'm making terrains for Android, but something went wrong here. When my camera is close to the terrain, the framerate drops to about 15FPS but if my camera is 100 meters above the terrain (facing down), the framerate is about 40-50FPS. I have tried this:

Changing camera Far Clipping Planes Remove textures from the terrain Set basemap distance to zero.

There are no problems in the editor.

I have spent a lot of time on this terrain, so I really don't want to start all over...

Thanks in advance.

Andreas.

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image supernat · May 12, 2014 at 10:01 PM 1
Share

You should print out the draw calls, because it sounds like geometry, and print them out on the other terrains that work fine for you, then compare. Other terrains may have worked okay on mobile due to the terrain structure, i.e. low detail needed to represent the terrain. If this one has more areas of movement (up/down in height), then it can't be optimized, and you end up having to draw more geometry. So when you are close up, the geometry near you will be of the highest detail, and if you are looking at a shallow angle, you will see lots of terrain to the distance, and it will be optimized to render LODs based on the detail (what it can get away with) as well. Curiously, if you turn on the wireframe of the terrain, you can see what I'm talking about.

So, every terrain in general will behave differently. The reason you would get good frame rate above the terrain is because it goes to low detail and reduced geometry. I doubt your textures are the problem. $$anonymous$$ore likely, the problem is that you're using the built-in terrain engine which is not optimized for mobile. You may want to consider something like T4$$anonymous$$ in the asset store (terrain for mobile) or similar.

avatar image AndreasX12 · May 13, 2014 at 11:59 AM 0
Share

I see what you mean. It's clear to see, that the draw calls are reduced about 60% when above 100m. Verts go from 750k to 150k. Render textures go from 14mb to 0mb. It must be the geometry and low detail. Is it possible to set the geometry to lower detail, without having to reset the terrain?

avatar image AndreasX12 · May 13, 2014 at 04:11 PM 0
Share

Hahah... I just figured out there was hidden a lot of polygons in my player model. Wonder why it only lagged when it was close to terrain though.. Anyway, the problem is solved! Thank you very much for your help :)

avatar image supernat · May 13, 2014 at 04:20 PM 0
Share

Oh, well if you use some character controllers, when you zoom the camera in close to the player, it turns them transparent, so that probably had a large hit if doing that. But you also get the same effect, depending on your character model, if it has multiple level of details. Glad you solved it though.

avatar image AndreasX12 · May 18, 2014 at 10:35 AM 0
Share

Just curious... When my game get's a lot of polygons it would probably begin to lag again.. As you said: "The reason you would get good frame rate above the terrain is because it goes to low detail and reduced geometry".

Is there a way to make it stay at low detail and reduced geometry no matter how close the player is to the terrain?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Problem with Android Framerate Dropping 2 Answers

Terrain Lag Issues : Trees 0 Answers

Input lag on Andorid but not in Unity 1 Answer

Interstitial ad kills framerate in different scene. 0 Answers

Android device LG G3 Frame rate problem 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges