0
\$\begingroup\$

I have heard many conflicting opinions about the pros and cons of using terrain vs mesh in Unity. Some people say that terrain has better performance while others say mesh does. So, I am not sure which one is better.

In Unity asset stores, there are some assets that convert terrain to mesh. The developers of these assets say that mesh will have better performance. That may be true, but, I want to get more opinions from independent experts. :-)

Please compare terrain vs mesh in terms of:

  1. Performance on mobile phones
  2. Storage Size
  3. Ease of customization such as modifications, LOD, materials, etc...
\$\endgroup\$
6
  • 1
    \$\begingroup\$ This sounds like something you can answer more quickly for yourself by building a quick test scene and profiling it. Then you'll have first hand evidence quantifying the exact differences, rather than relying on Internet hearsay. And you can be sure the figures accurately reflect your version / use case / target hardware rather than extrapolating from another game. "Ease" will depend on your fluency with shaders — if you want to write your own shader, you can make a mesh do anything you do with terrain or vice versa, since they're both getting rendered by the same graphics pipeline. \$\endgroup\$ Commented Sep 13 at 12:23
  • 1
    \$\begingroup\$ I would argue that Unity's Terrain system takes into account their concerns for what a terrain should be, not your concerns for what it should be. And furthermore that middleware (like Unity) always has a cost in both size and performance based on the generalisation it does. Now, whether you want to pay that price is up to you. I would probably err on the side of writing something using a Mesh myself, but again, whether that kind of effort is worth it depends entirely on you. Unless your task is very performance hungry indeed, you should probably use what has been provided: Terrain. \$\endgroup\$ Commented Sep 13 at 17:01
  • \$\begingroup\$ @DMGregory, That is a good idea. I will try. \$\endgroup\$ Commented Sep 13 at 21:46
  • \$\begingroup\$ @Engineer. Good point. I will take that into considertion. \$\endgroup\$ Commented Sep 13 at 21:47
  • 1
    \$\begingroup\$ Idk of Unity's in particular, but terrain systems, in general, are concerned with handling large, dense, mostly horizontal, geometry. And they are willing to incur extra cost in storage and performance, to be able to load and unload portions of it, at different LODs, to keep within RAM and GPU budgets (and might not be for mobile budgets). If your terrain is small and simple, it is likely a waste. You will have to test to figure out at which point it is better, or how bad is the difference for your case. Consider that terrain systems wouldn't be a thing if they were always worse. Thus: test. \$\endgroup\$ Commented Sep 14 at 7:53

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.