Search Unity

[Official] New Terrain System

Discussion in 'General Graphics' started by bibbinator, Jul 4, 2014.

Thread Status:
Not open for further replies.
  1. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Prefab-wise, I'd love to be able to save two completely separate objects (no parent-child relation) as a single prefab. Mostly convenience reasons, it would be for example great for enemy spawns.

    Back to topic. Any ideas what new terrain will be like? I'd really prefer something voxel-based as this would make making overhangs, natural bridges, etc. easier. Because, let's face it - heightmaps are old. As in, really old. Plus this will shut up OP of this topic because technically with voxel-based terrain you could make whole environments, not just terrains. Two birds with one stone.
     
  2. TechiTech

    TechiTech

    Joined:
    Dec 13, 2014
    Posts:
    212
    Thanks for replying.

    do you think it will take longer than 2 years to release it?

    and do you think it would be so hard to at least give us the option to turn off the current terrain LOD system?
     
  3. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Nothing to share yet, sorry.
     
  4. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    I will look into whether turning off the current LOD of terrain is possible/easy.
     
    angrypenguin likes this.
  5. TechiTech

    TechiTech

    Joined:
    Dec 13, 2014
    Posts:
    212
    1: understand

    2: thanks for trying
     
  6. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    Dude, read.
     
    elmar1028 and TechiTech like this.
  7. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @TechiTech

    As a side note you can do achieve the same thing (and maybe better) yourself.

    I built several games for Unity using the Unity terrain and I simply wrote a component that I attach to the terrain object in the scene that exposes some custom settings and an "export" button. When clicked, I export the terrain to static meshes (sliced into chunks based on the settings so they cull nicely), create better compacted splat maps and custom shader, etc. and save it as a disk asset and place the meshes into the scene and hide the terrain (with another button to toggle between the terrain and exported ones).

    I was able to get decent performing terrain on iPhone 1 :)
     
  8. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    The answer was posted while I was writing this post. I've deleted it anyway.
     
  9. TechiTech

    TechiTech

    Joined:
    Dec 13, 2014
    Posts:
    212
    Yeah I've experimented with that method, it's a good solution but workflow is a bit messy and time consuming.
    I have terrain destruction in my game so it gets messy using this method.

    So is it a big thing to give us the option to turn LOD off?
     
  10. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    I need more than 30 minutes to answer about LOD option :) Give me a day to find out!
     
    Don-Gray, angrypenguin and TechiTech like this.
  11. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    Heh, I've done that.
     
  12. Studio_Akiba

    Studio_Akiba

    Joined:
    Mar 3, 2014
    Posts:
    1,422
    We need a solution for realistic puddles, I have been having huge trouble doing this for the last several months.
     
  13. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    I think the WebGL / Web plugin changeover is taking up a lot of resources at Unity, but the terrain system is earmarked for 5.3 in the new roadmap*

    *subject to change
     
  14. antislash

    antislash

    Joined:
    Apr 23, 2015
    Posts:
    646
    Hi gods of unity

    here are my requests for the terrain in unity

    Who are you? What kind of game are you trying to build or would like to build?
    i'm Victor, been 3dsmax instructor for years, i mostly environment artist
    the game i am planning to do is a mono-level survival/adventure/puzzle

    i'v been on cry engine for a while, i am no evaluating unity 5 and maybe switch to it.

    How does terrain fit into that?

    very important of course, because it must cover several game areas and different environments
    the terrain will also be used to occlude the areas that won't be visible so it will have lots of mountains/cliffs, canyons etc

    What use-cases, features, workflows do you have or would like to see
    here is what i'd like to have :
    - large terrains management with continuous Lod streaming (maybe several terrains with different Lod's)
    - terrain tessellation (local or global) with distance Lod with terrain remeshing (better for cliffs ans slopes painting) with the possibility to paint déformations on each axis, not only on heightmap, that would also allow to paint more precise rivers, cliffs, hangovers etc

    - better vegetation tool with random rotation of trees, possibility to move/rotate/scale one tree at a time

    - grass billboards shadows (at least a cheap one)

    - paint several vegetation/grass items at a time

    - paint vegetation items on a spline with user defined frequency (useful to paint rows)

    - hide vegetation categories

    - define attractors/repulsors for vegetation

    - paint vegetation on meshes/objects

    - customizable splat maps with automatic vegetation spread with a per-vegetation density map

    - more detailed textures (albedo-normals-POM or tessellation) with surface properties

    - detail textures with alpha cutoff blending

    - a road tool

    - a river tool with a flow simulator (creating water mesh with speed and turbulence map)

    - a grass/moss/fibers pixel shader to simulate grass fields

    - possibility to define zones on the terrain that can be used as tags or triggers

    thanks for reading
     
    bartm4n likes this.
  15. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    On the Roadmap, Terrain is only in "Research" - it's not set for inclusion even in 5.4 which is a year away.
     
  16. antislash

    antislash

    Joined:
    Apr 23, 2015
    Posts:
    646
    but we can ask santa :D
     
    Whippets likes this.
  17. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    It's on my xmas list
     
    S4G4N likes this.
  18. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,659
    To be clear: it being in Research phase means exactly that. We're researching it. If the conclusion of the research is "actually current Terrain is OK for most of these cases if we just spend six weeks on it," then you may see improvements pretty soon. If it's "we have to throw it out and start over," then it'll take longer of course. Please don't take the "indeterminate timeline" or "research" sections as meaning "beyond 5.4" - it doesn't mean that, it just means we don't know what it will take yet.

    (Obviously in many cases these things /will/ be beyond 5.4, because they tend to be big-ticket things, but it's not necessarily the way it will be. Heck, even I recently exposed new API for helping users build their own realtime terrain editing tools in a patch for 5.1, because it had a clear benefit to specific projects in the short run - it's possible for us to get these things out quickly once we know that they are actually a good idea in the long run).
     
    tatoforever and Don-Gray like this.
  19. antislash

    antislash

    Joined:
    Apr 23, 2015
    Posts:
    646
    thats sounds interesting, a customizable terrain editor would be a bless...
    why don't you just spend some bucks and by some really nice work been done by third-part on terrains?
     
  20. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Why not exposing some functionnalities as experimental as a separate "experimental download" ?
    Some sort of Beta for people that want to try early stuff, and this could be good for feedback and finding bugs.
    It's just some idea.
     
    antislash likes this.
  21. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,659
    You mean an Alpha? :)

    (We do already release alpha builds - and in some cases, pre-alpha builds - to a specific group of users, in order to gather feedback on the features and direction. It's an important part of making sure that a feature is actually sensible in production. Finding bugs is usually not helpful at that point, though).
     
    Not_Sure likes this.
  22. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    Going back to the feature list, another good way of approaching this is to look at the latest high tech Unity demos. The blacksmith doesn't use Unity terrain. Now, why is that? Ask the guys who made the demo what the reason is why they opted for a standard mesh.
     
  23. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    More like full production = they have some people working on it. Not ready to release. So with that news, we need to manage our expectations accordingly. In the mean time there are still several alternatives available, like RTP3, Landscaper Terrain Tools, or Horizon On, for example. Or for some, jumping ship to UE4. I hope the Unity team is taking existing solutions like these, as well as what the competition is already doing, into account when developing their own solution.
     
  24. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Yeah, it'd be great to see all these rolled into one natively in Unity!

    :)
     
  25. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    530
    As a product manager myself, if something huge like a new terrain system is only in research now, my guess is that'll be one of Unity 6s big features to announce. Hope is good but not in software development ;-) Unity GUI came late in the cycle because it was promised forever. I have the feeling with terrain we won't be so lucky and it will slip through the 5.x cycle.
     
  26. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    Okay, SO, I know you guys are a multibillion dollar company and there are a LOT of moving pieces and a LOT of consideration for how things are trinkled to the public and that you can't say anything until you get the go ahead.

    But there's just one thing that I would LOVE LOVE LOVE to know and have GOT to ask:

    Will the terrain be released as a scalable tool that is expanded on with each iteration or will it be one big release?

    And if it is going to be expanding (fingers crossed) could asynchronous loading please, please, please be on the front burner? Take a glance at posts about terrain throughout the years and you will see that people are constantly looking for how to make Skyrim sized terrains.

    If you can't say don't worry.

    Thanks for all that you're doing!
     
  27. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    No promises on the final feature set as it's still in design/prototyping phase, but of course a new terrain system will be modern, maintained, and performant.

    @TechiTech

    You can adjust the "pixel error" property on terrain, the lower the value the higher detail level. However, setting to zero will not disable the LOD, but it reduces the detail level only for very very distant terrain patches. So if you want something truly static you need to write an exporter like I outlined in an earlier post.
     
  28. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Appreciate you can't give us any promises on features, but any info on what's being toyed with, or if there's anything that's made other guys in the office go "wow, awesome" would be great. Just anything once a month to keep up our enthusiasm and want to buy a ticket to the next stop on the hype train XD
     
    landon912 likes this.
  29. antislash

    antislash

    Joined:
    Apr 23, 2015
    Posts:
    646
    hey , hire me for the interface;)
     
  30. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Can you guys make a blog post weekly or monthly about the research, really love to know what you guys are working on, even if in the end it's not gonna make it into the final product.
     
  31. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    We will definitely start blogging more about what we're working on more regularly.
     
  32. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    With the caveat that some details will be kept under wraps until they're fairly close to release, since the competition will probably also read those blogs. Doh! Still be nice to get some of the broad strokes ahead of time, along with their priorities and estimated rollout timetables.
     
    Whippets likes this.
  33. Steelshot

    Steelshot

    Joined:
    Feb 24, 2015
    Posts:
    102
    Who are you?
    I am a team of one person (For now)
    What kind of game are you trying to build or would like to build?
    I'm trying to build a voxel game and a fun littler clicker game.
    How does terrain fit into that?
    Man, if you don't know how it fits into it...
    What use-cases, features, workflows do you have or would like to see?
    Spawn locations for animals/prefabs in certain biomes.
    Biomes.
    Cave systems.
    Random structures support.
    More vegetation.
    And.
    PLEASE SUPPORT SCULPTING THE TERRAIN IN CUBES!
     
  34. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    If so, cube smoothing too, please.
    Personally, I would not build a game built out of unsmoothed cubes,
    but with smoothed voxels so as to look realistic, though with the features of voxels,
    such as a number of programs today i.e. VoxelFarm.

    :)
     
    darkhog likes this.
  35. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Cool! Any chances of you sharing said asset? Would gladly pay for it.
     
  36. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @darkhog I'll see if I can find it somewhere. Been a few years!
     
    darkhog likes this.
  37. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    With a caveat that you should be able to turn smoothing off if you wish.

    Personally, I'd love to see new terrain behave similarly to Cube2/Sauerbraten level editor. It's both powerful and easy to use and gives ability to make various types of environment.
     
    Last edited: Jun 28, 2015
    Don-Gray likes this.
  38. Deleted User

    Deleted User

    Guest

    Hi Guys-

    I am glad you are soliciting feedback, please take a minute to watch my video terrain tests and consider how this might otherwise be implemented in Unity.

    Who are you?


    I am an independent researcher porting my own terrain system to Unity. While the port technically works, there are a few changes that would make a huge difference (described below).

    What kind of game are you trying to build or would like to build?


    Here is an example of the engine running in Unity, showing the entire city of Birmingham (from USGS). My primary interest is in GIS and simulation.



    Clearly, texture delivery and custom mesh rendering are my biggest concerns.

    How does terrain fit into that?


    I am exclusively focused on large terrain support in Unity. The core engine uses a smooth morphing LOD approach for the geometry, and seamless texture LODs are combined in runtime in the shader. This system would run much better with a tighter integration with the core. The big issues are of course pipeline-related.

    There are a few ways of going forward with this, the 2 most critical concerns are described next.

    What use-cases, features, workflows do you have or would like to see?


    DYNAMIC MESH DATA AND TEXTURES:

    Here is another video of Birmingham (from video capture), this shows how the visible mesh changes depending on the view frustum:



    Big Issue #1: GEOMETRY: - Dynamic Triangle Count and Vertex Buffer Updates:

    The engine can cull the geometry very quickly using an internal hierarchy/tree (vs dumping the whole thing to the pipeline), so the per-frame mesh data can have a vastly different number of triangles. The smooth morphing LOD transitions (for melting vertices in) also mean that fixed vertices are not really an option.

    SO, one of the big issues is setting up the mesh data each frame. If there was a nicer way to set a fixed vertex buffer, with client-side updates, and use a static buffer for triangle indices (with variable count), that would go a long way. As it is, the mesh is virtually created from scratch each frame, and ANY improvement in this area would be a huge help.

    Big Issue #2: Texture Delivery:

    Obviously threading is a big topic for Unity these days, I'll just assume you guys are working on that. For my purposes, a simultaneous loader for resources, that delivered ready-to-use objects (such as Texture2D) in memory, would solve it.

    If you look at the BHam videos you will see there is a ton of texture data being fed through the pipeline (and combined at runtime), this is probably the single biggest performance issue with the Unity port of the engine. I understand there are limitations to each platform that Unity has to run on, so I feel your pain :)

    NOTE: The engine has an option to stream from server using a "www" object (for the weblayer version), but this is of course very slow. One ideal solution would be a single-connection event for a remote database with texture/resource query mechanism. That may be out of scope for this topic but I wanted to mention it. If that's something we could discuss I would love to have that conversation.
    ---

    Any guidance or heads-up on what potential Unity changes might be happening that apply to my particular implementation would be extremely useful for planning; there are multiple ways of working around these issues on the client side (and that has been a fun part of getting the engine going), so any more info on possible future options might help to ease the pain.

    Feel free to ask any questions about how I am using Unity to run the terrain sets, the engine supports virtually unlimited data (with practical restrictions), and I have solid pipeline from USGS data directly into the Unity engine, so any publicly available data real world can be run pretty much out of the box (after download and prep). Virtually any improvement in performance is useful because it simply means more data (and better quality), as much as can be pushed through.

    Any response/feedback/comments/suggestions are welcome and appreciated :)

    Thanks
    -MM

    btw I know this is for feedback on Unity terrain, someone referred me to this thread so I thought I would throw out my 2 cents..
     
  39. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Can the Object, Grass/Vegetation Painter separated from the terrain tools, "the placement tools only"? like UE (sorry i have to bring that up)
     
    antislash and bartm4n like this.
  40. bartm4n

    bartm4n

    Joined:
    Jun 20, 2013
    Posts:
    57
    I don't know if it has been mentioned yet, but one thing that would be nice to have with the terrain tools is the ability to specify zones or boundaries for random placement as well as the ability to choose a subset of the prefabs to place in each zone.

    I am sure that something exists in the asset store, and/or it could be done with some editor scripting, but little things like this being available out of the box make things easier.
     
  41. antislash

    antislash

    Joined:
    Apr 23, 2015
    Posts:
    646
    i repeat : possibility to paint zones used as tags or triggers
     
  42. bartm4n

    bartm4n

    Joined:
    Jun 20, 2013
    Posts:
    57
    Apparently, it was mentioned already so uhhh... What he said..
     
  43. antislash

    antislash

    Joined:
    Apr 23, 2015
    Posts:
    646
    the more we ask, the more we get ... maybe ? ;)
     
    bartm4n likes this.
  44. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Any luck on that? Seems like good tool for anyone who wants to make open world/big level games.
     
  45. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    It is clear that people have wildly different requirements for the new terrain engine. There is no way that all these feature requests can be incorporated whilst still being performant.

    So Unity, whatever system you decide to implement, please expose the inner workings with an API and make it flexible enough that any type of low level terrain system can be made by a 3rd party developer. Currently this is not really possible, or at least not without making the GC throw up, or some other performance issue causing problems.
     
  46. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    Who are you?
    Indie developer

    What kind of game are you trying to build or would like to build?
    Mostly open-world procedurally generated games with huge outdoor areas.

    How does terrain fit into that?
    For all outdoor areas I need terrain, preferably with large viewing distances of many kilometers. In one project, I even need "infinite terrain", to allow the player to run around on entire planets.

    What use-cases, features, workflows do you have or would like to see?
    Although the current implementation is well done in many regards, it's very bare-bone and lacks many features for more advanced use-cases. My major issue is with performance in big open worlds:

    Pre-generated big terrain:
    If I just stick to one terrain object that I scale up to tens of kilometers, I get great performance, but very low resolution near the player (because it's scaled up so much). If I add multiple terrains to improve resolution, the performance decreases drastically, even if triangle count and draw calls stay low, because there seems to be an overhead involved with multiple terrains that is not related to triangle count but something else (see this post for details).

    Infinite/on-demand terrain:
    If I go the route of creating terrain chunks on-demand at runtime, to support an infinite world or avoid pre-generation, I both get the performance problem of multiple terrains mentioned above, and another problem that further complicates this: When adding terrain objects at runtime, I have to use SetHeights() to set the new terrain heightmap, but this command is very slow and causes the game to lag, even at very small terrain resolutions. It seems to be caused by the terrain collider being updated, so seems related to physics. I was hoping performance would improve in Unity 5, but I actually experienced the opposite: in Unity 4 I could use SetHeights on terrains of 129x129 resolution without too much lag, but now I have to go down to 65x65. The problem is that this requires me to use very many chunks instead, which leads to decreased performance because of the other problem mentioned before.

    Vegetation
    What I miss here is a dynamically combined billboard system, that combines billboards into one mesh to keep drawcalls down, and make them face the player using shaders or similar. From what I've understood, this is the approach taken by newer AAA games to allow drawing millions of trees or grass billboards in the distance with decent frame rate. Of course, it would require a method of transforming distant combined billboard trees back into individual objects once you approach them, so you get normal LODing when you get closer. Preferably, this would be somewhat separate from the terrain engine, so that it could also be used on meshes or in other circumstances. I would also love if it was more accessible during runtime, with documentation.

    Terrain texturing
    Although you can get a lot of improvements using the Relief Terrain Pack asset, it would be even better to have advanced material support built-in, based on Unity 5 PBR. High-quality materials on terrains make a huge difference, and I believe tessellation or similar is the future here to increase details.

    Terrain flexibility
    Although not as prioritized for me personally (I'm quite happy with heightmap-based terrain), voxel-based terrain would be cool (overhangs, caves, runtime modification), and making it flexible enough to support deformation and extreme LOD:ing to support planetary landings would be awesome. Although I can imagine that these require much larger changes to the engine.

    Thanks for reading!
     
    bartm4n likes this.
  47. fabianzz

    fabianzz

    Joined:
    Nov 24, 2012
    Posts:
    39
    I'm getting an error about spam-like messages, so I'm going to see if I can edit this post.

    For anybody getting the span like post error, simply post something random like above and edit the post.

    Who are you?
    Indie Developer
    What kind of game are you trying to build or would like to build?
    Open World MMORPG
    How does terrain fit into that?
    Terrain is a very fundamental feature in the RPG genre, so everywhere really.
    What use-cases, features, workflows do you have or would like to see?
    Below is a list of features that I personally would like:

    • Place objects directly on the terrain, and have them adjust to the terrain height / slope (optionally), preferably via colliders.
    • Edit multiple joined terrains at once.
    • Create ramps and roads, similar to EasyRoads3D's height and splat functionality built in.
    • A noise brush
    • Terrain streaming built in (with the object system mentioned up top)
    • Voxel-based terrains
    • Hole system
    • Automatic terrain painting by slope or height.
    • Custom terrain information layers for use in scripts, such as climate, zone / area ID, with specific data type e.g. float, color, int, boolean then whether or not it's blended or fixed.
    • Better built-in water shader, with integrated support for adding it to terrains (with support for the multi-terrain editing mentioned above). For example, the ability to add it around the terrain easily, without also adding it inside the terrain if the height reaches the water plane height.
    • Terrain "edit mode" not constantly re-calculating the lighting information.
    • "Overlay" paint with no blending. For example, painting marble on the ground and not have it blend with the adjoining grass.
    • Place grass and trees based on splat textures (e.g. grass)
    • Path "tread" feature, wearing the path down as though through use.
    • Texture atlas
    • Paint triggers onto terrain, e.g. when collider enters this area
     
  48. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    River tool with mesh surface creator. How this got overlooked, I don't know.
     
  49. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Large scale terrain.... currently its limited to 4096... but what if I want larger than 4096? ...well currently you gotta do a bit of work to properly set that up... or use something like terrain composer or world composer(awesome tools...but some people don't want to use those tools)

    What if I want terrain that is 81920 x 81920 or something for an open world game?
    Also what would be helpful is a height based material/shader ...so you just have to plug in the textures you want for each specific area...like mountains, ocean/lakes ..etc ..then some blending tools so it looks realistic..when transitioning to each zone..

    An option to generate a procedural terrain that can be edited would be nice

    Like the guy said above me...a tool to make realistic rivers or a river system
     
    bartm4n and Whippets like this.
  50. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845

    I love Terrain composer, and use it almost daily but I like to have more tools from Unity since I feel somethings can be done better in Unity and Terrain composer.. But I agree with this guy about bigger Terrains.
     
Thread Status:
Not open for further replies.