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

Using a Terrain vs using a Model

Discussion in 'General Discussion' started by Christian-Tucker, Feb 21, 2014.

  1. Christian-Tucker

    Christian-Tucker

    Joined:
    Aug 18, 2013
    Posts:
    376
    The more I venture into the midst of YouTube the more I see people creating terrains with blender and maya, while I see that this may be easier (for some people) to work with and create land-scapes the way they want them to be, I'm curious about performance.

    Is there every a time when One is Better than the other? Is One ALWAYS better than the other? Does terrain take advantage with larger zones? Help me out here.
     
  2. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Well, making terrain as a model has this advantage as terrain, being heightmap-based can't account for things like tunnels, caves, etc. There's little to no performance differences and if even, it is in favor of model-based terrain as terrain needs to be eventually converted into polygons so GPU can render it which takes additional cycles.
     
  3. SVGK

    SVGK

    Joined:
    Jan 25, 2014
    Posts:
    99
    so model based terrain is better in every way except for how easy/fast it is to create?.
     
  4. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    I don't know if it is better, sometimes you don't need things like caves, etc. in your terrain - then using a Unity's terrain is good choice, you can also mix models with terrain to achieve things like tunnels.

    It largely depends on what game you are making. For levels in my current project I am largely using meshes, but that's because my game takes place largely indoors. What I'm trying to say is that every tool is better in some application than other one.
     
  5. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    The unity terrain is more intensive than a mesh. If any part of it is in view the entire thing is drawn...

    I use a plugin on the asset store called Terrain 4 mobile (T4m) that converts unity terrains to a mesh in Unity and lets you draw 4 textures on the mesh just like the unity terrain, and you can paint on objects like trees, rocks, etc

    The other option with Unity terrains is a slicing plugin that divides the terrain into seamless chunks so it can only draw the chunks in view...
     
  6. KheltonHeadley

    KheltonHeadley

    Joined:
    Oct 19, 2010
    Posts:
    1,685
    Using Unity terrain has Occlusion Culling I believe, or some sort of culling to keep performance. I've been back and forth between models and heightmaps. If you go into wireframe, and zoom out of the terrain you'll see what I mean. You can't do that with a terrain object unless you break it into tons of chunks.
     
  7. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Unity terrain has the benefits of built-in billboarded trees, grass and detail mapping, wind zones, and splat-mapping for textures. If you're using trees, grass, wind, and tiled textures for terrain, the built-in terrain will be faster. The drawbacks are that it's heightmap-based (overhangs and caves need to be separate models), and kind of old, buggy, and low-quality compared to more modern terrain engines. You have more freedom using a custom mesh solution, and a voxel engine will give you full 3D terrain with caves and overhangs, but it is slower and much more memory-intensive.
     
  8. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    That's true for meshes as well.
     
  9. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    This isn't true; the terrain is converted to polygons as soon as the scene starts and doesn't take much time. It is the same as saying that a mesh needs to be loaded from an fbx file and converted to polygons. It does, but it happens once at start and doesn't matter after that.
     
    Ignacii likes this.
  10. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    True, guess I forgot to mention that you can reduce the number of polygons during the conversion to output low poly meshes from the high poly terrain, which ends up more efficient and you still get to paint on trees/plants/rocks/and 4 textures or substances. But no wind zones...

    If the built-in Terrain system had LOD runtime options it would be a million times better than it is.
     
  11. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    It does have a few LOD options; you can set the distance to render detail meshes and where trees turn into billboards. You can also set the basemap distance, which is the distance at which it switches from using full-resolution textures on the ground to smaller low-res textures. If you use multiple terrain tiles they can also use occlusion culling (though it's not always useful) or have them clipped by the camera's far clip plane. You can also tweak the "pixel error" setting at runtime; the higher this is, the less polygons will be in the terrain, so you can set it high on distant terrain tiles but keep it low on near ones.

    But in general, I agree there are quite a few things that Unity could add that would make it a million times better. They haven't really updated the terrain engine at all in the last decade or so. :/
     
    Alverik, Wildfly and Tinjaw like this.
  12. KheltonHeadley

    KheltonHeadley

    Joined:
    Oct 19, 2010
    Posts:
    1,685
    You can use splatmaps on objects as well, you can do everything besides wind zones.
     
  13. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    You can't use the builtin billboard trees or details on arbitrary meshes. Lars' ATS shaders can get you similar results but any plugin-based billboarding system is slower than the built-in tree version due to needing to use external render textures and other tricks. Despite the built-in tree billboarding being kind of buggy, I haven't seen anything on the asset store that matches it performance-wise.
     
  14. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    I'm not an expert, but aren't billboards essentially planes that rotates with camera to always face it? That kind of behavior would be quite easy to replicate, e.g. with LookAt (saving earlier x and z location and restoring afterwards so only rotation on Y axis will be changed)?
     
  15. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    Yes, billboards themselves aren't difficult to implement. I wouldn't use a separate transform for each one, I think, but you could build up a big mesh and then transform vertices to where they need to be in a shader without a lot of trouble. The point where it becomes difficult is transitioning from billboards back to real 3D meshes, as well as generating the textures for the billboards.
     
    twobob likes this.
  16. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Ah, I see. Thanks for clarification.

    //edit: Also batching them into single mesh wouldn't work if those were to move in any way (e.g. to achieve shooter stylized for old shooters when computers weren't powerful enough to display mesh of every object on screen). Unless you want to do this in each frame which would be terrible for performance.
     
    Last edited: Feb 21, 2014
  17. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
  18. KheltonHeadley

    KheltonHeadley

    Joined:
    Oct 19, 2010
    Posts:
    1,685
    Ah well I have been using RTP and Toms Terrain tools so I forget what is what from time to time.
     
    Deleted User likes this.
  19. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,789
    I always thought the best thing about the Unity terrain was it's automatic Quad-tree like LODing... can be much more performant than a highres mesh. Depending on your usage of course.
     
    angrypenguin likes this.
  20. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    I've been using Axis Game Factory Pro which is brilliant for creating terrains and is fun to use. I'm not much of a terrain artist, or artist per se in fact, and I always lose sight of the time messing about with AGF, whereas unity terrain I'm always a bit nonplussed over what to do and how to texture it. One of the features that always makes me smile is when raising the terrain with a brush, when it gets to a certain height an underlying rock texture breaks through. It's an amazing thing
     
  21. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    The built-in billboard system is faster since it all happens within Unity on the C++ side through some black magic. If you make your own, you need to set up a bunch of render textures and manage them with constant Update calls in Mono which will inevitably be slower.
     
  22. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    I'm mainly doing mobile development. I just made a unity terrain and converted it to a t4m terrain...simply the mesh, I can add trees and do some more tests.

    Unity native terrain:
    $UnityTerrain.jpg


    Then I simply converted it to a T4M object and you can see the draw calls dropped significantly, which to me is more important than the speed of billboards, this is just the base terrain, nothing added:
    $t4mTerrain.jpg

    How can you batch unity native terrain textures and trees???
     
  23. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,579
    Nice lmbarns.

    This is pretty disappointing though; how can this level of performance be acceptable by UT? The plugin cuts down almost everything important in half. I expect more from you guys.

    Still love ya though! :)
     
  24. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    Honestly they've added a lot of settings for the terrain that didn't use to be there. But it still is not usable for mobile development because of the number of draw calls.....

    Honestly I never have more than 50 draw calls in a mobile game, but the default terrain is more than 50 by itself with nothing added....more than my entire budget!

    I don't know how T4M batches the textures, but it does, the entire thing is 1 draw call and it gives you a slider bar to change the number of polygons in the mesh it bakes out of the Unity terrain.

    So you can take a unity terrain that is 100k polygons, and hundreds of drawcalls, and output a mesh that is under 5k polygons in 1 drawcall, it'll be more blocky, but it still maintains the general shape and features, it keeps the first 4 texture splats from unity terrain, and performs excellent on mobiles....

    It also supports substances natively, so you don't have to install a plugin or workaround like you do with a unity terrain, you can simply load substances into the texture slots and paint them onto the mesh. I tried to make an example with substances but I couldnt' get them working on the native unity terrain even with the plugin, after several minutes so I gave up.

    In the 2 images I posted, not just the draw calls are reduced, but look at the VBO total and VRAM usage! They're half as much as the unity terrain. That's using the default settings, default terrain size, default T4M settings to convert it, you can actually reduce it a lot more!
     
  25. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    You can reduce the polygons in a regular terrain by reducing the heightmap size or increasing the pixel error. This will also decrease the draw calls. The reason the T4M terrain has less vertices is because it's lower rez; if you look at it, you can see it no longer has all those little circles you drew on the regular terrain. Also, draw calls aren't everything... if you want it to do level of detail and render more distant terrain more quickly, it needs to separate the draw calls. If you have a terrain with only one draw call it means it has to draw the entire terrain all the time, and can't separate it to only draw what's in the field of view. Unity does support substances natively on terrain since 4.0; you don't need a plugin. If you want a more accurate test, you should make a terrain with 4 or 8 textures, set the same resolution in both Unity and T4M, with trees and details, and check framerate both with a camera looking at the whole terrain at once and with a camera at eye level where you'd expect your actual game to take place.

    I'm not saying Unity's terrain is great; as I said it has quite a few problems. But saying "just use a mesh, look I made a blank green mesh with nothing on it and it's faster" isn't a good use case. If all you need is a blank green mesh then yeah, doing a blank green mesh is faster than using a terrain. But if you want a terrain with multiple textures splatted onto it, lots of trees, detail textures and meshes, wind, etc., then a terrain is probably better.
     
    Tinjaw likes this.
  26. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    How low can you get the poly count and draw call count, draw calls is very important on mobile....

    What kinda unity terrain can you do with say, 20 draw calls and 20k poly?


    edit:: If the base terrain is unusable why would I bother to add trees, it's unusable. Show me a usuable 2,000 x 2000 terrain for mobile. Pls.
     
    Last edited: Feb 24, 2014
  27. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    Generating a HIGH POLY T4M Mesh with 2x as many polygons as the unity terrain and no compression it's still more efficient.

    HIGH POLY T4M Terrain from Michael O's landscapes:
    $highpolyt4m.jpg



    Native Terrain from Michael O's landscapes:
    $nativeterrain.jpg



    To recap: Unity terrain:
    -48 draw calls
    VBO Total: 87 - 7.1MB
    VRAM Usage: 26.3MB

    T4M version of same terrain:
    -5 draw calls
    VBO Total: 45 - 6.7MB
    VRAM: 19.5MB
     
    Last edited: Feb 24, 2014
  28. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,050
    Really not useful to compare Apples to Oranges.

    The Unity built-in Terrain system is a highly efficient method probably using Chunked LOD to provide very high resolution terrains through level of detail, which priorities easy large scale culling, a pre-built LOD (hence apparent larger memory usage and increase in vertices) and polygon count over draw calls.

    For desktop solutions which is what the method was developed for its perfectly fine and beyond moving to geo-clip maps you wont get a better trade off between high polygon count, draw calls, efficiency and performance. It can also take advantage of occlusion (e.g. hills) if implemented.

    Unfortunately its not very suitable for mobile, due to trading drawcalls for culling and dynamic LOD, though certainly modern mobile devices aren't as drawcall limited as they used to be.

    Some of the comparisons here are very unfair, that you can convert a terrain into a single drawcall and decimate the number of polygons by several factors does not inherently mean Unity Terrain is bad, just that its not a suitable technology for mobile.

    A far more fair comparison would be to turn you terrain into a single mesh and not decimate and see how far that gets you (on a mobile device not in the editor), especially when say viewing the terrain from one corner to the other or from the center to a corner.

    Though i've not tested drawcall performance recently on mobile I have tested polygon count throughput and on an iPad2 you can get very impressive numbers which is why it may well be more advantageous at this point in time to manually split a terrain into a small number of submeshes/drawcalls possibly with some level of decimation thrown in for good measure.

    Personally i'd be very tempted to explore the previous king of terrain rendering methods that of ROAM (Real-time optimally adapting mesh). It provides the dynamic LOD (though based on entire terrain within view per frame) with a single drawcall. The only problem is that it puts the entire effort back onto the cpu and as such I suspect it will not offer the performance benefits required. In which case for mobile at least you're back to manual terrain creation to balance drawcalls vs polygon counts and culling.

    However you don't have to use ROAM dynamically, it can just as easily be used to generate an optimised terrain mesh, though you should be able to do the same in any modelling app too, the important aspect being to move away from a polygon grid to a mesh where it decimates polygons in flat, co-planar areas whilst retaining polygons in areas of high variations.
     
    Last edited: Feb 24, 2014
    twobob, peon_1, Tinjaw and 1 other person like this.
  29. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I'm hesitant to reply since it's pretty clear you are more interested in promoting T4M than actually caring about how terrain vs mesh works, but ok...

    Draw calls are not everything, not even on mobile. Like I said, when you turn your terrain into one giant mesh, you get one draw call, but it means it has to always draw the entire mesh and all the polys even if only one of those polys is on screen. The reason Unity's terrain breaks it up into several draw calls is not because it likes messing with you; it does it because that allows it to handle LOD and cull at different distances. On a terrain, if you point the camera down at the ground, or you are behind a mountain, you will see both the number of polys and the draw calls will go down. On a mesh, it never changes - if any part of the mesh is in the frustrum, it renders the whole thing in a single LOD.

    You could do a huge terrain that has a hundred thousand polys and then set the Pixel Error high, so that the terrain in the distance is LOD'd down and you only ever have 20k rendered. If you are doing a single mesh you can only have 20k polys total.

    Here's a 2000x2000 terrain with 4 textures and a directional light, and as you can see, the draw calls are high and it has 30k polys...

    $Capture.JPG

    But wait! By setting the pixel distance, we get automatic LOD, which again is the point of the Unity Terrian, and here is the same terrain, now LOD's because it is far away:

    $Capture2.JPG

    Now there are only 7 draw calls and 4k triangles. The good thing about LOD is that when we are close up, we can have high detail, but when far away we get less detail.

    Here's the same terrain, with the player standing halfway across it, and then looking down at the ground. As you can see, due to being able to cull and LOD sections of it, the draw calls go down and the poly count is much lower than if you had to render the whole mesh.

    $Capture3.JPG $Capture4.JPG
     
    Last edited: Feb 24, 2014
    _slash_, Thentias, Zolden and 3 others like this.
  30. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    Thanks, I actually have never been able to get a unity terrain to work like that...

    And for the record I do split the terrains into much smaller segments on mobile before generating meshes...this was simply a comparison between unity terrain and a mesh, because I didn't see how you can reduce the draw calls, poly count, etc with a unity terrain. By default, when you repeat a texture it adds a S*** load of draw calls. But apparently it can be improved significantly.

    Thanks, I will give unity terrain more effort and see if pixel error makes it worthwhile for mobile.
     
  31. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,050
    Can you be more specific as to what you mean by repeating a texture, because that behaviour doesn't sound right at all. The only thing remotely similar that comes to mind is if you exceed 4 textures (assuming that limit hasn't been raised recently), in which case from what I remember it will double drawcalls as it will render the terrain twice, though unsure if thats per terrain or per chunk.
     
  32. WhendricSo

    WhendricSo

    Joined:
    Jan 1, 2011
    Posts:
    171
    Great discussion!

    I am inclined to agree with Makeshiftwings because of the dynamic LOD.

    Also mentioned before is the fact that other methods might reduce draw calls. However, draw calls are not the primary function of performance except when you exceed the limit for your particular platform. Fill time and vertex/edge count typically have a much higher impact on performance, and the dynamic LOD and automatic tree billboarding included in the Unity terrain handle this issue quite well.

    I've done quite a lot of stress tests on Unity (I've been working hard to get some very complex, multi-material meshes to dynamically batch, and they do now!) and I've found that I can triple my draw calls safely in most cases as long as the fill time is low and the number of shared edges is high (to reduce the number of triangle strips being generated)

    It's true that Unity terrain is heightmap-based, which comes with limitations, but there are tons of tools out there that generate heightmap data such as Terrain Composer (Unity plug-in) or Bryce (which still generates some of the best terrains in 3D graphics), so if you want to take full advantage of all these great tools, you need to use the built-in terrain.

    Also, in most of the AAA studios, or even in accomplished indie studios, when overhangs, tunnels, cliffs etc are needed, a mesh is added that compliments the terrain.

    In Skyrim, the tops of mountains and most rock formations are generated meshes with a nice relief mapping on them. This gives them a sharper look than the heightmap can create, and the heightmap often represents loose gravel or dirt, which looks quite good.

    I would only recommend using a mesh terrain for very small terrain areas, because otherwise you're cutting your options short, and you'll have to do some extra programming to get good performance for larger scenes which would not be necessary with the built-in implementation.
     
  33. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,081
    I like to have things like caves and overhanging ledges, so I've taken to just making my own terrain system.
     
  34. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    Would you mind elaborating - how do you use substances with the native terrains? I'm using the latest version of unity, and I am unable to drag substance output textures to the terrain texture slot.

    From my experience, substances aren't supported on terrains unless you're using a custom terrain shader. The only thing I haven't tried is to edit the terrain shader and remove the "Hide in Inspector" thing, that hides the texture properties from the inspector.. but I imagine those are hidden for a reason.
     
  35. n8

    n8

    Joined:
    Mar 4, 2010
    Posts:
    147
    I don't have a ton to add to this thread other than this was a super interesting read that illuminated so much hidden knowledge about terrains. Thank you all for you deep insights! I have been suffering from performance issues with my terrain (which is huge), and after reading through this, I have messed with the pixel error and now everything is running MUCH smoother. Thanks!
     
    angrypenguin likes this.
  36. Dholguin93

    Dholguin93

    Joined:
    Dec 22, 2014
    Posts:
    2
    As n8 has mentioned, this thread provided me with a lot of knowledge that I didn't have half an hour ago. Thanks for making this complicated field a lot clearer for an Undergraduate student.
    I have a few basic questions if you guys don't mind :

    1) I read the concept of billboarding trees, grass, and etc. What exactly is billboarding?
    2) How do I break up one "large" terrian object into "little" terrian objects?
    3) What is batching?

    Thanks!!!
     
    Last edited: Aug 27, 2015
    angrypenguin likes this.
  37. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    1) "billboards" are generally a simple primitive like a plane with a texture rendered onto it, that always faces the camera

    "billboarding" trees and grass is where you have an LOD that's just a billboard; so for example trees that are very far away will use a simple billboard of a tree instead of the 3d mesh tree.

    speedtree has some impressive LOD / billboarding tech, their billboards look pretty good and LOD transitions are very subtle. But there are some free speedtrees where you can play around with them and see how the LODs and billboards look.

    but in general, "billboarding" trees and grass is just an optimization; a way of rendering them without rendering actual 3d geometry.


    2) generally you use a tool like worldmachine to generate multiple "little" terrain objects that form one big landscape,

    otherwise you need some kind of a tool (unity plugin, etc) to split an existing terrain.

    or generate your heightmaps in another software, then you can just chop the heightmaps up in photoshop or something and import them onto terrains in unity.

    one workflow problem when using multiple terrains is working on the edges of the terrains, in the editor, after you have imported them. You will need some kind of a tool to "stitch" the terrains together in that case. I have seen unity assets that do this.


    3) dynamic batching is used to optimize draw calls when you're drawing multiple objects with the same material, static batching is for optimizing the rendering of meshes that are marked as "static" in the editor

    .. well, I guess just read this, it can explain it better than I can :) http://docs.unity3d.com/Manual/DrawCallBatching.html
     
    MGhasemi likes this.
  38. Dholguin93

    Dholguin93

    Joined:
    Dec 22, 2014
    Posts:
    2
    Thanks, I'll give it a read and at the very least, be more informed. The billboarding example you provided helps me conceptualize it and will probably end up playing around with the information you provided and do more research from there. Would you know if their is a "Optimization in Unity" document that kind of goes over all of the ways to optimize Unity? Specifically 3D since it's more intensive then 2D games?
     
  39. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    MitchStan likes this.
  40. d12duke

    d12duke

    Joined:
    Mar 22, 2016
    Posts:
    37
    I know I'm a bit late on this but I personally found a wonderfully easy and inexpensive way to get Great terrain at 1 drawcall and about 5-6k tris 8-9k vert.

    Download a free trial (i bought it personally, amazing software) of Z-Brush. Design your terrain IN Unity, like fully.. all the crevaces, all detail possible at no pixel error. Then export the terrain as an OBJ and open it in zbrush. From there you can "decimate" the terrain down... After removing the triangles you can then apply a normal to it and it looks absolutely perfect. So On a mobile game, I have a 2kx2k fully detailed terrain at 5.6k tris, 7.9k vert and at only one draw.

    I bet this would work for chunking and voxel destruction too if you eff'd around with it long enough.
     
    haolly, WizardingStudios and chingwa like this.
  41. d12duke

    d12duke

    Joined:
    Mar 22, 2016
    Posts:
    37
    btw, atlas atlas atlas. Must.. have... Atlas! :)
     
  42. kunst-stoff

    kunst-stoff

    Joined:
    Sep 2, 2014
    Posts:
    9
    I used and scripted for Unity terrains intensively. For programmers changing the terrain during development and runtime by scripts is a big plus, also the simple adaption to the hardware capabilities. For the level designers editing terrain inside Unity with all level assets already at its place is a big plus.

    I can compare the performance on iPhone 4 to iPhone 6 for unity terrain and mesh terrain. In the game two Unity terrains of 1024x1024 datapoints with 3 splatmaps were shown with adapting their pixelerror during runtime every second depending on the distance. The mesh conversion splits the terrain in square patches (T4M unfortunately does long stripes), so only few of them are in the frustum. Then the mesh topology was simplified to a few percent of the original by an asset called Cruncher at development time, so that the look in the game is approximately the same.

    At runtime the Unity terrain takes a lot of CPU performance and batches, pops visibly from time to time and is 20% slower than the mesh! Anyway we shipped it with Unity terrain because it still looks nicer when you look closely. If one spend more time to regulate the crunch process better, the mesh is the better option. In your game it also depends if the valid camera position has a defined limited area or the player can cruise around freely and if your app is already CPU bound or not.

    You can see screenshots in my article
    http://www.gamasutra.com/blogs/ChristophEnder/20170222/292179/Open_World_on_Mobile_with_Unity.php

    By the way: On faster hardware with a mesh you are not limited to splat maps, you can use satellite images for example. Several LOD meshes for terrain patches might be useful.
     
    d12duke and sonofbryce like this.
  43. WizardingStudios

    WizardingStudios

    Joined:
    Mar 4, 2017
    Posts:
    13
    Quote:
    I know I'm a bit late on this but I personally found a wonderfully easy and inexpensive way to get Great terrain at 1 drawcall and about 5-6k tris 8-9k vert.

    Download a free trial (i bought it personally, amazing software) of Z-Brush. Design your terrain IN Unity, like fully.. all the crevaces, all detail possible at no pixel error. Then export the terrain as an OBJ and open it in zbrush. From there you can "decimate" the terrain down... After removing the triangles you can then apply a normal to it and it looks absolutely perfect. So On a mobile game, I have a 2kx2k fully detailed terrain at 5.6k tris, 7.9k vert and at only one draw.

    I bet this would work for chunking and voxel destruction too if you eff'd around with it long enough.

    Please, can anyone tell me what do you think about this procedure?
     
    JamesArndt likes this.
  44. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    From a geometry perspective it's a really good solution. For the texturing aspect it might be a bit limited unless you find a splat map shader for the terrain. Otherwise, using a 2k texture map for the terrain would mean every 3 feet give or take would be covered by 1 pixel! That's a pretty blurry terrain. It doesn't improve all that much using a 4k texture map either. I suppose using tiling textures with a splat map shader is the best way to go.

    By the way the more I think about this approach it's actually far more limited than say simply creating your terrain mesh in zBrush. I mean you have a very limited toolset for sculpting terrain in Unity whereas in zBrush you are almost unlimited. So why even add the extra step by sculpting out a terrain mesh in Unity at all?
     
    haolly, ROBYER1 and d12duke like this.