Search Unity

How to make a large terrain in HDRP

Discussion in 'Game Design' started by wechat_os_Qy0989W4msb7Ot5jx6_iGbPvk, Mar 18, 2021.

  1. wechat_os_Qy0989W4msb7Ot5jx6_iGbPvk

    wechat_os_Qy0989W4msb7Ot5jx6_iGbPvk

    Joined:
    Nov 3, 2020
    Posts:
    10
    i want to make a big terrain in HDRP project(50km*50km),but i don't know what to do.My project often crashes if i use gaia pro to make a big terrain.Because it takes up too much memory.Could anyone provide me with some ideas.Thanks!
     
  2. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    How much draw distance do you actually need? making huge worlds is not a problem, designing them and rendering them is the two major issues imo.

    if you just want a height map you have move tutorials available than you can watch, doing marching cubes can get a little trickier if you have no experience.

    you should go check out Sebastian Lague, he's really good at making tutorials and he have one for a infinite height map terrain - it should provide you with all you need for doing one yourself.


    you can always just buy some asset from the store that does that, but i'm not the guy to recommend that.
     
    Zarconis and daveMennenoh like this.
  3. wechat_os_Qy0989W4msb7Ot5jx6_iGbPvk

    wechat_os_Qy0989W4msb7Ot5jx6_iGbPvk

    Joined:
    Nov 3, 2020
    Posts:
    10
    thank you for your reply,i have watched his video before.I hope to make a high-quality real terrain.So his method does not seem to be suitable for my project.
     
  4. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    what isn't "suitable"? you shouldn't just copy the project he did, you should learn from how he did it and take what is relevant to you, do it with enough tutorials and you'll have the the components you need to build your own system.

    you only said 50x50 km realistic terrain - what does it mean?
    how much draw distance do you need at a minimum?
    do you want a marching cubes terrain? height map?
    simulate erosion? plate tectonics?
    do you need water? ocean with waves? quite lakes? rivers?

    you need to provide some more info if you want an ideal answer
     
    Joe-Censored likes this.
  5. wechat_os_Qy0989W4msb7Ot5jx6_iGbPvk

    wechat_os_Qy0989W4msb7Ot5jx6_iGbPvk

    Joined:
    Nov 3, 2020
    Posts:
    10
    Sorry, maybe I didn’t express it very clearly.I am a newbie,so i search a lot of info to learn unity.I have used Hight map to make a realistic terrain before.But it does not meet my expectations.I think I may need to continue to study.Thank you for your reply anyway.
     

    Attached Files:

  6. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    In what way are the results you are getting different from what you want?

    Note that 50km x 50km is massive if you want to do stuff on it in 1st or 3rd person. To put it in perspective, from memory Skyrim is something like 6km x 6km, which includes a bunch of unplayable space. Just Cause 4 is bigger, and even that is a 32km x 32km map which also includes a whole lot of ocean.

    In both cases they make it work by seamlessly loading and unloading new areas as the player moves around. And they'd have most likely needed to make tools which support editing in that style, too.
     
    Martin_H likes this.
  7. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    674
    don't remember exactly but the terrain max size is around 1-2km, because the lightning will eat up perf (if set on default setting)
    so mii planning usin adjoinin (thats the word?) terrain tiles with distance lod thing (called occlusion?)

    yeah I planned 1000(?) km2 terrain, because plane game, so gametime is one hour (?)

    probably usin meshes is the best idea.
     
  8. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    674
    heightmaps have the attribute that don't connect (though that could be remedied)
    but haven't tried unity's newest terrain in that regard

    I guess that's a pixel to vertix conversion/resolution thing
     
  9. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    Gaia doesnt really support that large of a terrain, so unless you break it up into like continents or islands, Gaia really wont be of help. HDRP?, your biting off more than you can chew, No matter what, your going to have to chunk stream your terrain. The biggest terrain ive seen built, with decent performance is a 16k x 16k. A 50k terrain is insane, literally.
     
    Antypodish likes this.
  10. wechat_os_Qy0989W4msb7Ot5jx6_iGbPvk

    wechat_os_Qy0989W4msb7Ot5jx6_iGbPvk

    Joined:
    Nov 3, 2020
    Posts:
    10
    I divided the terrain into nine pieces.Make one by one.I also used GPU Instancer to optimize my project.But When loading the next piece,the trees float off the ground.:(
     
  11. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    I understand your new, so please bear with me. Even to us experienced devs, creating a 50k x 50k terrain would be impossible, Example: When you create a terrain in Unity, it has a floating point precision, and the father away from that point you go (a larger terrain), your going to see bad effects/errors from it. Someone can correct me if im wrong, but the biggest terrain that i know was made with little to no effects/errors was like around the 9k x 9k area. Now what do you think is going to happen with a 50k x 50k? and HDRP?, lol.

    "I divided the terrain into nine pieces.Make one by one.I also used GPU Instancer to optimize my project.But When loading the next piece,the trees float off the ground."

    Are you GPU bound? Have you looked at, or know how to use the Profiler? You have alot to learn, and best of luck, If you can create a 50k terrain with no effects, errors, and has good performance, your a god. And im not talking about procedural infinite terrain generation. Your going to get to a point of adding in assets till it all comes down a crawl, and the amount of probs youll encounter will melt your brain.
     
  12. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    Want some advise? I dont know your project, but: Create a 16k terrain with Gaia. Use SECTR for terrain chunk streaming. Now, remember, SECTR and other terrain chunk streaming systems, are better added in at the end of the project (so it can register things in).

    Now build your scene with a Spawning System. Objects will only be spawned as to camera view. With correct optimization (very big subject), you should have decent fps/ms. But to be honest, a 16k terrain is more realistic, and has alot of scale, and all objects you use can be scaled...
     
  13. daveMennenoh

    daveMennenoh

    Joined:
    May 14, 2020
    Posts:
    107
    Love Coding Adventure. Sebastian's videos are top notch, and dude is an amazing developer.
     
    SparrowGS likes this.
  14. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Also reference, try to mod skyrim first you will learn by osmosis how they organize their stuff:
    - they use tile of 64x64 yards, (58m roughly) that contan objects and terrain
    - they work on one or few tile at teh time, not on teh whole terrain
    - they use LOD (ie a lower detail terrain) that is generated from the tile after all the tile are done
    - they have big low rez terrain stretching to get the farm details
    - in game they only load tiles around the player with all teh objects, further they load LOD terrain, much further they show the simplified low rez terrain

    Try playing skyrim and morrorwind, and look at how the visual change at distance

    A lot of people use a png and single pixel color to planned the terrain, then use a code that replace all color by their relevant object to place high level details, generally it's hidden by tools so it doesn't look as scuff as usinga png, but the system is the same, id on a big array to mass place stuff by hand or by code, then tile by tile refinement, then visualization as if the player is there, by loading tile around a position totest the visual.
     
    warthos3399 likes this.
  15. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Publish a game with one terrain first.
     
  16. nanditho

    nanditho

    Joined:
    Jan 10, 2018
    Posts:
    27
    Try world designer it is inside gaia pro package, you can make infinite terrain. the problem is making the big stamp or heightmap resolution to cover those massive terrain.
     
  17. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    Even experienced devs have tried to make very large open world games with Unity, it can be done...sort of, and no offence meant, but i can tell your not at the experience level to take that on.

    With that said, have you thought of the right engine for your project?. There are other public engines/systems that do support large open worlds better. So if your "starting out new" you might want to think about the engine and what fits your project. Why waste time learning an engine that doesnt do what you want for your project?.