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

Add density to vertical terrain to avoid texture stretching?

Discussion in 'Editor & General Support' started by Zen-Davis, Jun 24, 2013.

  1. Zen-Davis

    Zen-Davis

    Joined:
    Aug 14, 2009
    Posts:
    285
    Here's my problem: http://i.imgur.com/JxHlRGa.jpg . I want the rock texture to not look so stretched, while at the same time not affect the slope of the elevated hills. There's also a problem with the texture being upside down once it wraps around each hill, anyone know a way around that? or just a completely different method to achieving this look?
     
  2. Kragh

    Kragh

    Joined:
    Jan 22, 2008
    Posts:
    657
    There is no way to get cliffs like that looking nice directly on the terrain, as terrains project the UV coordinates from above. The only way to make nice looking vertical surfaces, is to build them as mesh overlays, matching the terrain. I have a level I made for a game which looks VERY much like what you are trying to produce, and I have attached some screens to get you going.

    $RanchScreenWire_zps5078958a.jpg

    $RanchScreen_zps5c15e089.jpg

    $RanchScreen2.jpg

    1) I make the mesh overlay by exporting the terrain heightmap to a raw file.
    2) I then flip it vertically (for some reason heightmaps are flipped in the y axis), and save it as .png.
    3) I then make a plane in 3ds Max the same dimensions as the terrain.
    4) Add a displacement modifier to it, and set it to Strength = "Terrain Height" (Property of the terrain resolutions)
    5) I build the mesh to match the terrain (took quite some time in this scene, I admit, so no easy solution here!)
    6) Create UV's for it, which ensure no stretching.
    7) Import the mesh into Unity, and do whatever material/texture work needed

    If you have any questions regarding stuff you have problems with, don't hesitate asking :)
     
  3. xanderlott

    xanderlott

    Joined:
    Apr 19, 2013
    Posts:
    1
    Your game looks great! Possible to do this all within Unity instead of using 3ds?
     
  4. ravingbots

    ravingbots

    Joined:
    Aug 20, 2015
    Posts:
    44