• 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 /
  • Help Room /
avatar image
0
Question by GregZ · Jan 06, 2017 at 10:11 AM · terrainperformanceoptimizationprocedural

How does many terrains on scene affect performance?

So, I made a tiny terrain with trees, which I saved as a prefab and want to replicate using script all across the scene (this is just a test for now, I might make a terrain generator using this method). The editor view started lagging a bit after I made a few duplicates:

alt text

alt text

The question is, how well can Unity handle multiple terrains? Is there a way to optimize those tree patches, or should I stop trying?

imagfwfwfe-3.jpg (401.2 kB)
imagefwfwf-2.jpg (341.8 kB)
Comment
Add comment · Show 2
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 tanoshimi · Jan 06, 2017 at 10:12 AM 0
Share

What benefit are you trying to achieve from duplicating a tiny terrain lots of times rather than just having a single large terrain, which will allow Unity's inbuilt terrain LOD system to work better?

avatar image GregZ tanoshimi · Jan 06, 2017 at 10:23 AM 0
Share

It'll allow me to generate the map by just instantiating tiny pieces ins$$anonymous$$d of generating texture or trees or modifying height directly. Just easier that way.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Wolfdog · Jan 06, 2017 at 11:35 AM

Terrain in Unity isn't great for performance. This is clearly visible the larger the terrain gets. Splitting it up into smaller pieces is in fact the way some people have tried to improve performance. However, from what I can see, you will have an insanely large amount of these terrains. This might actually be worse than just one terrain piece, simply because of the number of them. This is similar to trying to render one model with 10,000 faces vs 10,000 models with one face each. The larger model is easier to render.

Increasing the terrain chunk size and simply having less of them should improve performance, and only rendering the terrain chunks visible by a camera should again improve performance significantly (occlusion culling).

If this is the way you want to do it, then you should take a look at methods which convert terrain to mesh, as mesh it easier on performance. There are scripts on the internet which can convert terrain objects to mesh, keeping trees and grass orientated. However, the terrain will lose some detail.

I can remember using TerrainObjExporter in the past, but I don't know whether it will work in real time, or only in the editor, so it might not be what you're looking for.

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 GregZ · Jan 06, 2017 at 01:38 PM 0
Share

Ok thanks I think this idea was a bit crazy, I should just use one of the paid terrain generation tools from the asset store, ins$$anonymous$$d of reinventing the wheel.

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Best way to make a huge terrain for flight simulator? 1 Answer

Need help on light baking 0 Answers

can/should terrain children be merged to reduce object count? 0 Answers

Sprite size much bigger than originally - how to resolve 0 Answers

[Unity5 3D]85 SetPass Calls still running below 15FPS on Galaxy Samsung S3 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges