Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Place Image in Terrain

Discussion in 'World Building' started by Ben_Iyan, Jun 5, 2018.

  1. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    I've been experimenting with Unity terrain and was able to add an image (a game map) to the terrain. The image, however, must be the first one and is stretched over the terrain. Since it's non-square, I simply adjusted the ratio dimensions of the terrain to match the image, and it works as expected.

    The problem is that the edge of the game map is also the edge of the world, but I would like to have the terrain extend out past the edges of the map so that I can add hills and trees. If I extend the terrain, however, it simply stretches the image, which is the expected behaviour.

    Is the solution to use multiple terrains, or is there a more elegant way to achieve what I'm looking for? Thanks.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
    That is an interesting approach. If your terrain is any great size, the actual resolution under your feet each step will be quite low of course, but I suppose you realize that?

    As far as extending it, you could add additional terrains around the edge, or else just put dead border space in your image and sprinkle your trees into that, all in the same image.

    Usually terrain is textured by a splatmap method, with repeating (wrapping) images used (aka, "painted" on) in varying ways: grass, dirt, rock, etc., mixed appropriately. This enables you to have higher localized image resolution because you are recycling the same image. But obviously it doesn't scale to using a single giant image like you are doing.
     
    Ben_Iyan likes this.
  3. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    When you say "put dead border space", where would I find the option for that? Thanks for the reply.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
    I mean either a) make a larger image and stamp your existing image in the center, or b) shrink your existing image and fill the outside with dead border space.
     
  5. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    Stamping an image sounds exactly what I'm looking for. Does it require a special asset?
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
    Any basic image editing tool: Photoshop, MSPaint, your choice. :)
     
    Ben_Iyan likes this.
  7. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    LOL :) I was over-complicating the problem. That's an excellent solution, thanks!

    Love your avatar, btw.
     
    Kurt-Dekker likes this.