Add density to vertical terrain to avoid texture stretching?

Here’s my problem: Imgur: The magic of the Internet . 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?

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.

  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 :slight_smile:

6 Likes

Your game looks great! Possible to do this all within Unity instead of using 3ds?

Yes, it is possible to do it within Unity. You need a better terrain shader, and you can download it from the Asset Store: https://www.assetstore.unity3d.com/en/#!/content/44225

…or you can read the tutorial that explains how it works and write your own shader: http://ravingbots.com/2015/09/02/how-to-improve-unity-terrain-texturing/

if possible, please make a video about it, how you did it all step by step. And how to do it in a blender?

Please don’t necro post. It’s very unlikely that someone is going to remember how they solved a problem from 10 years ago. Create a new thread and explain the problem you have so people can help.

Thread locked