Search Unity

Cut terrain

Discussion in 'Editor & General Support' started by mk1978, Jun 20, 2011.

  1. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Is there a way to sort of cut terrain? I would like to make a clean edge in my terrain. I am modelling a golf course, which is about 2000m x 2000m in size. Bunkers are not looking good and therefore I would like to know if there are any tools or ways to make a clean edge between grass and sand. River tool seems to have some of the functions that I would need, but is there something similar for pits/holes?

    http://sixtimesnothing.com/river-tool/

    Bunker:


    This is where I am right now:
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    You need to model it instead of using the terrain editor.
    The terrain is a grid with heightmap and can only get steeper, not stepped or cut
     
  3. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I was a little bit scared that there is no good solution for this and would need to model the whole thing in external software. Actually, I am already using Sketchup for modeling the terrain and I use obj to Terrain- script to create the terrain. With this workflow you still don't get "sharp edges", so I guess I have to find some other solutions.

    One more question. Is there any Solids tools in Unity that could be used with terrain (Intersect, Subtraction, Union)?
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    There are no booleans at all in unity. (they aren't gaming friendly anyway as booleans create masses of polygons the moment something is no longer axis aligned and trivial that cuts or is cut)

    The terrain can't be cut or anything alike at all, its a heightmap based grid and for its whole area there is a continous mesh thats there, always :)

    so an obj to terrain won't change anything, the terrain is always a heightmap with continous surface, no steps.
    But good thing is if you used the converter you also have the model to just use :)
     
  5. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I am actually using Sketchup for modeling the terrain. Is it possible to import Sketcup model into Unity so that I am able to paint trees and textures on it, with terrain editor or some other tool? I have been using Tom's Terrain Tools for texturing my terrain, because I can texture the whole model in just about 5 minutes. I would think that if I manage to import Sketchup model I would still need to modify the textures in Unity.
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    No, if you use meshes you lose all terrain capabilities including its tree and detail object systems with imposter LOD etc.
    You would need to use an own system then, write own tools to texture it etc.
     
  7. Zaffer

    Zaffer

    Joined:
    Oct 21, 2010
    Posts:
    266
    Hi mk1978,

    I found a way to use the terrain tools that come with Unity to do something like your bunker. See if this example would work for you. bunker

    To get this, I used the Paint Height tool with the sharpest brush (see screen capture). If you shift click on the terrain with the Paint Height tool selected, it will go to the altitude you clicked on, so pick a low altitude (like the bottom of a hill) and use the tool to carve out a bunker that will have a pretty sharp edge. Hope this helps.

    Also, I haven't tried it, but I did run across a script that will convert an ordinary mesh to a terrain at:
    http://www.unifycommunity.com/wiki/index.php?title=Object2Terrain

    Zaffer
     
  8. g2mediagroup

    g2mediagroup

    Joined:
    Jun 25, 2011
    Posts:
    98
    Has anyone gotten this to appear in the "terrain" menu? I followed instructions according to wiki, but it won't show up...???

    We need to convert an externally modelled object (blender 2.57) into a usable terrain object...HELP!

    Thanks
    George
     
  9. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    if you put it into the Assets/Editor folder and it didn't appear you have compile errors in your editor log
     
  10. g2mediagroup

    g2mediagroup

    Joined:
    Jun 25, 2011
    Posts:
    98
  11. Naison

    Naison

    Joined:
    Feb 21, 2010
    Posts:
    386
    If you need to cut into the terrain you need to flatten your heightmap in the terrain setting usually 20 will work, increasing resolution will give you smoother cuts.
     
  12. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    g2, have you tried re-encoding the text? It may be an error from copying from the wiki.
     
  13. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I haven't been following discussions so carefully lately. Therefore, I would like to check if there is already some kind of solution/extension available for this problem.

    Instead of "cutting the terrain", I would have golf bunker (pit/hole) modeled in my terrain with only grass texture (no sand texture at all) and I would model individual geometry with sand texture on top of that hole.

    Do you know if this kind of "painting with geometry on top of terrain" extension exists nowadays?
     
  14. vfxjex

    vfxjex

    Joined:
    Jun 3, 2013
    Posts:
    93
    Why not model the whole terrain in 3D Modeling packages like Maya and Mudbox or Zbrush and create a height map on it.
    you can do what you want with your terrain in 3D modeling packages and that would be closely what it looks when you export and import your height map in Unity Terrain.