Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 PBAndy · Jul 13, 2016 at 05:04 PM · terrainperformance

Terrain CPU Performance

Hi,

(Note I already posted this on the console-specific forums and was told this was a general problem)

We're working on a project that makes use of a single terrain object in each level, and are seeing some alarming CPU performance problems on consoles. We're currently main-thread bound on the CPU and are running 5.3.5p1 (though I see no difference running 5.4b)

Profiling the game on the consoles (using their profiling tools, not Unity's), I notice that 25-35% of the main thread is spent in TerrainManager::CullAllTerrains, and later during rendering, there is a lot of time spent in QuadTreeRenderer's destructor (which I assume is also terrain).

The fact that a lot of the profile hits are in data structure creation/destruction, this seems like an obvious target for optimization.

So my questions would be:

  • Are there plans in the near term to fix this?

  • What changes can we make that will reduce the CPU cost of the terrain without drastically affecting visual quality (this is a finished game).

  • Does anyone have experience converting terrain to use static meshes and traditional rendering? The geometry part is easy, but we would also need to manage/render all the details (trees/grass,etc).

This is currently a huge blocker on our project and is preventing us from hitting our target framerate, so any help is appreciated.

-Andy

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by tanoshimi · Jul 13, 2016 at 06:10 PM

Terrain is a performance hog, there's no doubt. But that's at least partly because it's necessarily complex.

You haven't provided much detail about your terrain settings, but the only easy way to improve CPU performance is by reducing the heightmap size or increasing the pixel error. These will both reduce the polygon count and also decrease draw calls. Although you've said you're not GPU-bound, you should also look at the terrain shader - Unity's default one is not that efficient IIRC. Is your terrain casting shadows? That's another possible performance hit.

There are assets that will automatically convert from terrain to a mesh object, including retaining the position of grass and trees placed etc., but they too will necessarily reduce the quality of your terrain. Assuming you're using the default 513 heightmap resolution, for example, that's 262k vertices and over 500k triangles - far greater than would be allowed in a single mesh. Unity's terrain has a built in LOD system that accounts for this by dynamically decreasing the resolution of the mesh further away from the camera, but a simple mesh solution would not be capable of doing this, so must simplify the entire mesh resolution.

You could also look into chunking your terrain into a number of smaller sections and stitching them together. Doing so might give you finer control over pixel resolution of distant terrain elements, and benefit from culling terrain chunks that are not visible.

Comment
Add comment · Show 1 · Share
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 mayankela21 · Dec 06, 2019 at 08:53 AM 0
Share

thank! you as well

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to only show objects in range ? 2 Answers

I have to render a whole island from the vantage point of a mountain. What are your tips on how to manage performance? 0 Answers

Very big terrains can make the Unity slow? 2 Answers

How do I increase performance during a scene load? 1 Answer

How to improve the Performance of Removing Trees during runtime? 1 Answer


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