Search Unity

New Terrain *height* layers?

Discussion in 'World Building' started by hippocoder, Oct 16, 2018.

  1. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi,

    1. I want to be able to sculpt the height of a terrain manually using low frequency large brushes
    2. I want another heightmap on top of that which will be for erosion, local detail, etc

    Blend them together.

    This is so we can non destructively alter the world topology with broad strokes and then drill down for realism on another layer that's lumpy or whatever. I think this will be a nice modern workflow for new terrain.

    How do I do it?
     
    ChrisTchou and sqallpl like this.
  2. ChrisTchou

    ChrisTchou

    Unity Technologies

    Joined:
    Apr 26, 2017
    Posts:
    74
    Would you rather this work as "paint my terrain tile, then subdivide into smaller higher rez tiles where I need the details"?
    Or more of a generic layer system like photoshop, but with different resolutions on each layer?
     
    hippocoder likes this.
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Layers of resolution: this is widely understood from most sculpting systems, you work low res for broad changes then refine. I like the resolutions per layer, since that's about speed really, you can sculpt low res changes across miles in a short time then perhaps on other layers you'd run some code that'd do some nice erosion, or you'd make a nice little winding path down the hill without ruining the hill and vice versa. It's great.

    With the the tiled approach, I still lose my work with broad changes don't I? It's basically what we have now just adaptive, so it feels like this sort of resolution isn't really helping if we wanted to quickly throw together a world - it demands a lot of time and patience and as it's still restricted to just height changes, I wonder if it's really that useful. I can't see myself wanting to when it's actually right and proper to put real objects on for these kinds of details - such as rocks, vegetation and so forth...

    Now if you were talking about some kind of volumetric approach the answer would be super different.
     
  4. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    I would second the layers of resolution idea with the possibility to load different resolutions based on distance from the player, like a LOD system.
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Different thing really, should make a new thread for other things instead of being offtopic (it is off topic if its for a different purpose). My problem is authoring is not nondestructive. It's about authoring.

    Consider you work on lower resolutions but then a compute shader or other shader or asset store asset is able to calculate erosion on more detailed layers on the fly, perhaps within biomes? That's very powerful and possible with layers.
     
  6. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    I'll interpret this as in doing it yourself. Because if Unity decides to implement it, they'll most likely do it in a better, more integrated way than what I'll describe.

    Initial approach (proof of concept phase)
    You could have 3 identical terrains inside each other (same position and size).
    First would be the result, second one would be for rough features, and third one would be for fine details.
    After every change the result terrain would get updated, summing up the values of the two source terrains.

    Next iteration:
    At this point its like photoshop layers. But really not compfortable to use.
    Now I'd add an inspector so I could view any of the 3 terrain maps and edit it. Obviously changes to the result terrain would be forwarded to one of the two sources, so it looks like you're editting the result map, but in reality your changes go to one of the source maps (rough / fine).
    That way when changing the rough map the fine changes are not lost at all.

    Going further:
    This could be expanded to support more than two layers, maybe even grouping, and additional computation modes (a multiply-mode would be really interesting for masking purposes!)

    I think the biggest task here would be creating the editor tools. The computations themselves sound extremely simple, I bet one wouldn't even have to make their own shaders as pretty much every shader supports changing blend modes.


    Does that sort of go into the direction you were thinking @hippocoder ?
     
    hippocoder likes this.