Search Unity

How would you create a cliff?

Discussion in 'World Building' started by Phoenix116, Jun 21, 2019.

  1. Phoenix116

    Phoenix116

    Joined:
    Jun 30, 2016
    Posts:
    39
    Hi guys! I have been using unity for a long time for 2d games, now I would like to learn how to achieve some beautiful environments in 3d, I already have a good concept of how to create a AAA small scene.
    But there was always a question that I wanted to solve, how do you get caves or cliffs like in the photo in unity? I think you actually need to create your own terrain system or buy a really expensive asset, right?

     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,374
    You can model it in 3D.
    You can use indeed some Assets, with predefined landscapes.
    You can use assets, to generate landscapes.
    There are different. Quality and look will vary much. So ensure, you use them from same author. Or game will look weird.
    You can use 3D scanner and generate from point cloud, which probably is most realistic result.
    Also, you need LOD capabilities. Pretty must. + probably partitioning into sub sections of terrain.

    From concept to AAA is long way to go, specially in 3D. Just saying.
     
  3. Phoenix116

    Phoenix116

    Joined:
    Jun 30, 2016
    Posts:
    39
    Of course I could model it in 3d, but how would I blend it with the terrain?
    I think you haven't focussed your answer well, I'm not a beginner trying to make gta V. I know how this engine works and I know my capabilities. I'm totally able to make a good looking scene with quixel assets (that were used making the lastest unity and unreal cinematics), I just want to enrich my knowledge

    I have seen some really experts in terrain building in the forums, I thought one of them would tell me his favorite way to do it. For example, this asset seems to work really well while doing caves https://assetstore.unity.com/packages/tools/terrain/digger-caves-overhangs-135178 but I also wanted to know other alternatives or if I could try to code it myself, I hate depending on external assets (above all assets with scripts), I always try to do it myself

    What I want to know is how can I make that vertical wall and, whatever method I use, blend it with the terrain
     
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,445
    Cliffs are done as modelled objects. Anything otherwise is some kind of hipster thing. In Unity 2019.3 you get to punch rough holes into terrain object, which is also masked and filled by modelled objects.

    That's the normal way games are made.
     
  5. Phoenix116

    Phoenix116

    Joined:
    Jun 30, 2016
    Posts:
    39
    Makes sense to me, but it leaves me with a new question, were all this cliffs in tloz breath of the wild modeled by hand?
    upload_2019-6-21_14-17-38.png

    Seeing other games as inspiration has been always a good idea, I'm sure they have a easier system to do this kind of things
    upload_2019-6-21_14-19-53.png

    In another example, we can see how in dragon quest XI, the slopes blend perfectly with the terrain, I doubt this was made with a 3d object (or maybe yes, that's why I'm asking :p)
    Even in the top part of the slope, there is no seam between the path and the slope

    Terrains like these ones are what I would love to learn to do, I thought learning how to make cliffs was a good start ^^
     

    Attached Files:

    Last edited: Jun 21, 2019
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,374
    Peter77 and Phoenix116 like this.
  7. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    729
    Crap like this makes it easy for people to ignore you. You post a question, and we don't know you from Adam, so how will we know your whole resume´ to tailor the responses? On its face, the question seems like what a newbie might post, not familiar with the different terrain concepts. Your picture shows a skybox Yosemite and a 3d-modeled cliff with no visible blending.
     
  8. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    666
  9. Phoenix116

    Phoenix116

    Joined:
    Jun 30, 2016
    Posts:
    39
  10. Phoenix116

    Phoenix116

    Joined:
    Jun 30, 2016
    Posts:
    39
    Do I have to show a entire video to show that cliff is blended with the terrain for trusting me? hahaha
    But I could have been more specific with my post description and what I was trying to achieve, sorry, forgive me :oops:
     
  11. Phoenix116

    Phoenix116

    Joined:
    Jun 30, 2016
    Posts:
    39
    I haven't seen the shader he is using yet, but it seems that it`s painting the intersecting vertices with a sand texture, so it's easy to integrate in the terrain

    I think that hippocoder said a good answer to my question, cliffs are mainly modeled by hand
    And as halley said, dq xi terrain is probably modelled as well, so it's not hard to blend well the start of the slope with the end of the terrain

    I apologize for sounding prepotent, I was a little bit angry for the "From concept to AAA is long way to go, specially in 3D. Just saying", let's be honest, nobody is gonna change just for someone telling you something is hard >.<

    Edit: I think I could have answered everyone in one reply, I didn't realise, sorry :confused:
     
    konsic likes this.
  12. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,445
    You would want to use terrain until it's not possible to (overhangs/caves) - so take terrain as far as possible, then the next step is usually just having overhang meshes and so on. Every game that's not some sort of voxel gimmick does it like this. The blending between mesh and terrain does not need to be perfect, and is easily disguised with similar textures, rocks, grass.

    That's the done thing, and those are really just approaches. Some shaders will give a good blending to terrain but it's not really the big problem people think it is.
     
    Phoenix116 likes this.
  13. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,374
    @Phoenix116 you shouldn't get angry because some one wrote just a statement. Surely shouldn't get angry, if someone gives critique. :)

    However, I haven't said it is hard, nor if it is easy. I just indicated, it may take prolong of time for high quality game alike, regardless of your skills.

    Now, if you considering for example at least near perfect blending, and hand placing objects, + mesh manipulating, that process on its own will take while. And if you multiply by number of hills, mountains etc, plus debugging, all ads up. Not to mention, moving vertex in xy axis, may brake visual aspect in z axis. That need be taken into consideration. That's before you even start coding. You know where I am heading with this.
    For example, placing tons of objects/buildings, on uneven terrain. Suddenly realizing, or during gameplay, half of them are floating, or are sunk in the ground. Easily done with vegetation. :p

    Sure, there are some good tool assets, to assist with that process. Still, It won't be magic snap of fingers. And I am sure you know that well. :)

    Problem may be equally trivial, by if it takes time, it will take time.
     
  14. Phoenix116

    Phoenix116

    Joined:
    Jun 30, 2016
    Posts:
    39
    As I supossed, there are games which unity's terrain isn't the best option, thanks for this clarification :)
    You have reason about that I was worrying too much about blending well the terrain, now I have a much more clear sight about making open world environments


    First of all, forgive me, I understand your point of view and you have reason, but I just want to create a really good terrain to take a single screenshot, not a whole open world hahaha
    But hey, I don't discard making someday a small open world where I would need to blend some hills (if I ever do it, it will have them, I'm sure), as I said, I just was really curious about how are they made ^^

    In fact, even games like the new pokemon have floating objects missplaced :p
     
    Antypodish likes this.
  15. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    1,513
    ZBrush is mainly the go-to software for making rocks, cliffs like in your screenshot or even entire game levels (see this one and this one). You could also give 3DCoat or Blender (see this Procedural Rock Generator on blenderartists.org) a try. But no matter which software you'll use in the end: All you gonna need is lots of practice and time.

    As for terrain blending, check out these assets available in the Asset Store:
    Terrain Blending Starter Kit (Free) | MicroSplat - Terrain Blending (Paid, module for the free modular terrain shading system MicroSplat)
     
    Last edited: Jun 21, 2019
    mechanic_kharkov and Phoenix116 like this.
  16. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    591
    This thread and 2nd post is my favourite:
    https://forum.unity.com/threads/add-density-to-vertical-terrain-to-avoid-texture-stretching.187478/

    It shows nice pics how cliffs are added on the terrain. Also you can see geometry in the scene.

    My question so far which I still didn't found answer myself would be how to generate cliff mesh directly in Unity. My particular interest in this is procedurally generated runtime terrain where you can't use any pre-defined geometry as terrain is generated on runtime.
     
    Phoenix116 likes this.
  17. Phoenix116

    Phoenix116

    Joined:
    Jun 30, 2016
    Posts:
    39
    I always wondered what programs where used to make voxel terrains, I apreciate your help :)
    But how did he sliced the terrain in small chunks to apply occlusion culling? I have never used ZBrush, so maybe is pretty easy

    This is exactly what I would love to do, my main problem is matching the terrain with the cliff, but I guess I should just use a 3d model and blend them with some grass and rocks
     
  18. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    591
    I had some thoughts about procedural cliff generation but it just thoughts which came up by just looking into these pics. So I guess these could be some guide steps for algorithm:

    1. Identify cliff squares as terrain areas with steepness above certain threshold.
    2. Group neighbouring squares to get full cliffs.
    3. Make a copy of terrain mesh part where you find the cliff.
    4. Subdivide mesh several times till you achieve good resolution
    5. Adjust new vertices based on your rules, i.e. perlin noises, voxel rules, etc.
    6. Run mesh simplifier to get low poly cliffs

    I may try writing something this way to see if I can get it working. P.S. Sometimes using external tools, it can end up spending more time on designing each cliff than to write an algorithm :)
     
  19. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    721
    For geom-blending we are working on a drag & drop solution:

     
  20. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,847
    Create the cliff in 3d modelling program with the bit that will be blended at the base also as part of the model, then do your texture painting in something like substance painter with opacity channel to make the cliff blend with that base bit, then bring into unity and put onto terrain, use terrain texture brush to blend the base bit with the terrain object (which will both have same texture).

    Usually you would make cliffs like that in something like world machine or world creator etc etc first, but the end process usually follows the above. Its actually not too difficult once you give it a go :)

    Alternatively go with a shader solution, but usually its a combination of both the modelling technique and a shader also.

    You absolutely can do this very well in unity using unity terrain + 3d model, and the 3d model does have to be "by hand" but can be made using world creator, world machine etc etc
     
    mechanic_kharkov likes this.
  21. Phoenix116

    Phoenix116

    Joined:
    Jun 30, 2016
    Posts:
    39
    I agree, I could use a custom shader to properly align the object's texture offset with the terrain so it looks pretty smooth just as TerraUnity showed us

    What I would love to learn is how terrains like those that Mauri showed us are made, but I have no idea about zbrush and I don't find anything in google
     
  22. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,847
    I mean to do any of this you will need to learn to use zbrush, thats a given. For most organic 3D zbrush is a must.
     
    Phoenix116 likes this.