Landscape UV seems to be slightly off on tiles other than the first tile
I am trying to use UE4 to do real world terrain rendering. I need to use real world height maps and imagery. I want to view the terrain from far distances as well as up close. While creating landscapes, I found a seam between landscape tiles that I can't seem to get rid of. I created a simple test to show this problem, and I am interested to know if there is something I can do to fix it or if it is a bug.
I created a 2017x2017 r16 file with flat elevation. I made 3 copies and named them appropriately to be imported. During import, I selected all 3 and left the default settings. I created 2 materials. Mat00 contains a grey texture with the top and left pixel edges being light blue and the bottom and right pixel edges being dark blue. I changed the default properties of the texture to take out distortion by changing the filter to linear and the compression to UserInterface2D(RGBA). The material also includes a LandscapeCoords node that sets up the UVs for the TextureSample where I set the UV scale to 2016. Mat01 is very similar to Mat00 but the border of the texture is different colors; the top and left are pink while the bottom and right are green. I set the landscape material for the first tile to Mat00, the second to Mat01, and the third to Mat00.
When I zoom in on the border between the 1st and 2nd tiles, I see a pink seam that is approximately 1cm between the green and light blue borders.
My first thought to fix this issue was to clamp the UVs instead of wrap, but clamping does not appear to work correctly on landscape tiles. It appears to be taking the top pixel and using it across the entire landscape tile. Here is what the landscape looks like when I change the TextureSample in the materials to clamp.
You may also be interested that if I import the landscape and uncheck the flip Y coords option with the same material/texture setup, the first tile does not have the clamping issue even though it is using the same material as the 3rd tile. This implies to me that the UV coordinates are not values between 0.0 and 1.0 for all landscape tiles.
asked Sep 21 '15 at 04:47 PM in Bug Reports
I created landscapes that are the above mentioned sizes. Multiple landscapes created using the suggested sizes and specifications mentioned on the site I linked. I imported the heightmaps at a height resolution of 2017x2017. I used a heightmap that is very busy just to amplify that seam.
I then applied three separate colored materials to each landscape, as you can see in the above linked picture. I then made sure that they were all snapping to the grid and snapped the three landscapes without overlap next to each other.
Then I duplicated the landscapes so that three tiles overlaps. This is the result in a new project.
This is the result zoomed out.
Then I recreated the same scenario with a 4096 x 4096.
These are the results starting with the zoomed in.
This is zoomed out view.
I changed up the colors just so you can see I changed up the landscapes to reflect the change in size that I did between 2017 and 4096. I used this same test with my original post just in that one I had a square height map around the entire landscape. Just to be clear I created this using heightmaps that are grey scale and tillable. This test was recreated from scratch in a new project to make sure this wasn't a random issue that pops up from project to project. I do not know what is causing this issue, however I would check to see that you are not overlapping on any of your tiles.
If they are not overlapping then I would try checking your maps themselves and how you created them. If you have a square straight up you need to calculate for that small part of the edge the map needs to hold onto in order to fake to push the height on the rest of your map. This may be what you are seeing.
As I cannot reproduce this issue, the only thing I can do now is test out your project specifically. For that You can either link me a Dropbox or go to our forums. From there go to advance options and search my name in the staff search section. You can send me a private message there with a link.
answered Sep 25 '15 at 05:23 PM
Hello Griffer G,
I haven't heard from you yet. I was wondering if you had a chance to look at our documentation yet?
answered Sep 24 '15 at 02:48 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here