Seams when blending High-res textures (3600x2700 each)

Hello

I’m trying to blend 16 textures that have 3600x2700 size for a planet Earth model.
I managed to do that in a Material Function where I tile them in a 6x4 grid, take 2 textures at a time and blend them together using Lerp and a third texture as mask.

The only problem I have is that there are seams between the tiles. Is there any way to get rid of that?

Thanks in advance!



Your first problem is that the resolution of your textures are not a multiple of 2. (128, 512, 1024, 2048, etc.)

Because of the way Binary Code handles information, (1’s and 0’s), having a texture, or any map that is not to the power of 2 will draw more resources. Which in the long run will kill performance if you’re using a lot of textures.

As for your seam problem, it probably has to do with your masking textures. ( I assume thats what they are.) You might want to extend the reaches of the white edges and then try it again. Usually seams only occur when things aren’t correctly aligned.

Hey,

I tried it with 3072x2304 textures and ended up with the same gaps…
I gave it some more thoughts and I think it’s an scaling issue. When zoomed in and the texture size is smaller then the resolution of the displayed area it’s interpolated which results in the usual soft pixels. Same for the masks which will result in different gray values.

Thanks for the info on the texture resolution, I’ll keep it in mind for later. Right now the performance is ok because I don’t have that many textures being rendered.

As for the masking textures, I am using a resolution of 6x4 for the images. And the earth textures I’m using are all parts of an image that’s 21600x10800 split into 6x4 tiles each 3600x2700.
I have defined the masks to not be filtered and some other property for them to be treated as masks.

Why aren’t they properly aligned, when there’s no room for misalignment? Should I use a 4k Texture also for the masks?

Can you cite a source?
From what I remember about NPoT textures is that it “has” to have hardware support to work.
Something does not take more space if it does not fit into NPoT because it’s binary, It has to do with how it is implemented.

Does the source textures have errouneus pixels along the edges?
The texture filtering mode could also be the problem, You can try setting it to “point”(Or whatever UE4 calls it).

You could see if UE4 has graphics a debugger where you can see what is happening on the GPU.

The alternative it to get graphics debugging tool from your GPU vendor.
NVIDIA: NSight
AMD: GPU PerfStudio
There is also another one called RenderDoc, But I don’t know if it will give you a pixel history and such as I have only used it to simple things.

You would then attach the Debugger to UE4 or use it to launch UE4 and then use that to capture what is going on under the hood.

HTH

Hm… I did a post already before…
I think it’s an scaling issue. When the texture size is lower than the displayed area the texture will be interpolated which results in the usual soft image. Probably same with the mask which is interpolated and not scaled which results in grey values at the borders…

btw. I tried already with 3072x2304 textures, same result… I guess we’d need to use a different approach to map the whole 21k picture of the earth on one sphere.

Try using a power of 2 texture for your mask so it will generste mipmaps. Just scale the 6x4 to 8x4 and try messing with the mipmap settings.

Tried that, still the same result. I think it’s the interpolating mentioned by Geekazoid.
The seam is actually smaller than a pixel in my mask and its values are from one of the textures being masked.

I guess this is a better approach on making this: Uber Hi-Res Earth Shader - Work In Progress - Film, TV & Animation - Epic Developer Community Forums

Thanks for the help everyone anyways!

Something that is not yet mentioned is that by default textures are set to tile, this can cause a bit of the other side to show up in a situation like this where the texture is not intended to tile.

Make sure that you set your tiling method to clamp for both X and Y in your texture settings and it should be fixed.

It was indeed the texture tiling that was causing the seams.

For those that are interested, I got some good results with a 32k earth
I solved the problem using another approach:

In Blender:
-Create a UV Sphere (64x32)
-Divided it in tiles (8 vertical cuts, 4 horizontal cuts → 32 tiles in total)
-Divided all the 32K Earth textures in 32 parts (diffuse, bump, specular, …)
-Created a material for each tile with its own textures
-UV Mapped them
-Joined all the tiles back to one single Mesh
-Subdivided and smoothed the mesh
-Exported as FBX

Unreal:
-Import FBX
-Result (WIP - normals are inverted) :
744697f8f34958e90b95fd0f810bcd32d1d36a7d.jpeg

since I saw our work in “Pic of the Day” :slight_smile: :slight_smile: :slight_smile: , here’s an updated version

atmospheric scattering is still missing…

fbea6d102f45dd57349c339a8487b1ec14258316.jpeg

congrats , this is nice work