Blurry Textures in the material of Landscape

Hi everyone, i have a problem with the textures of the Landscape. I did a Master Material for the Landscape with 2 layers, so, in the second layer the base color texture its failing and shows like a texture of PS1, so blurry and the brush paints by quads, what can i do?

I tried to improve the “r.streaming.poolsize 4000” and also put the source sampler of the texture sample to “Shared:Wrap”, and the texture keeps showing blurry. Could anyone help me, please?


Hey there @Rafa_EsYu1712! Welcome to the community! I see you’re using the default TexCoords UV node. Give it a try replacing it with a LandscapeLayerCoords node and adjust it for your needs. Does this mitigate the issue?

Hello, First of all thank you for your response, actually it changed something and improved a little bit, but it keeps going showing a little bit weird, or maybe the landscape has not enough polys… It supossed to be like this?

If your landscape resolution is too low, it could definitely cause issues like this. Try using the same landscape material on another, much higher resolution landscape and that would verify that hypothesis one way or another.

This is a big topic. Are you using Runtime Virtual Textures? Are you using streaming virtual textures with your landscape? The fact that you’re using virtual textures would indicate you’re not using either RVT or SVT and this is why you’re getting blurry textures. Your framerate is likely to suffer greatly as well.

AFAIK, virtual textures don’t work in the main render pass for landscapes. I know with 100% certainty they don’t work with RVT. Without RVT, I don’t think it works either, but not as certain.

Let us know if you’re using RVT and/or SVT.

1 Like

Hi, if you paint on the landscape, you have a default precision of one pixel per square meter. If you need a smoother transition, you can use a height blend with a texture, to get more detail (I think you set it somewhere in the layer info, not at my PC right now, then you will get an additional height input in the landscape layer blend).

1 Like

(post deleted by author)

Hi, yes, when this happened I found the height blending for the landscape and I will do it meanwhile I try to fix the blurry texture. Thank you for the advice!

Yes, actually I am using the virtual textures because I need it for do UDIMs. So, wich is the best way to use it and remove the blurry textures on the landscape?. Once again, thank you for your response.

Ah… I’m not sure how you would go about making UDIM’s work with landscape. To be VERY specific, you are using UDIM with landscape? If you’re using UDIM elsewhere, but not on landscape, that’s perfectly fine, but you’d need a proper RVT setup..

I’ll try to explain how landscapes work. I’m not a top expert, but I think I grasp most of this. So if I get anything wrong, others are free to correct me.

So for this part, I’ll explain how to set up RVT in case you want to use it and you’re not using UDIM or virtual textures for landscape. Otherwise, if you ARE using UDIM with landscape, skip below to the part about LOD.

*** RVT ***

What is RVT? This is basically a sparse virtual texture. If you know what clip-mapping is, this is similar to that. So you have a special virtual texture that usually holds different textures in each channel (diffuse, roughness, etc.). As you move around, the engine will ask your material to render a specific area or tile. You will need to store this in the RVT via the RVT output node. If it needs it again, it will ask your material again, but it will let you know it’s already available in the RVT. As you move around, it will discard some tiles from the RVT so if you come back, you will need to re-render it from the source textures (these cannot be virtual). You set up RVT with an RVT volume asset in your outliner. There’s one for diffuse (and associated textures) and one for height.

Now, how do you tell in your landscape material if you need to render from the source textures or if you can just grab it from the RVT? There’s a node called “VirtualTextureFeatureSwitch”. The No input comes from the original non-virtual textures and you also write this info out to the “Runtime Virtual Texture Output” node. On the Yes input, you can grab the materials directly from the RVT node. If you have masked out part of the landscape, you can use the Landscape Visibility Mask node to your Opacity Mask attribute.

And that’s basically it. A request comes in. If VTFS says No, it’ll grab it from the original textures and you also write it to the RVT output node. If VTFS says Yes, you grab it from the RVT node.

Now, RVT doesn’t work with virtual textures when VTFS says No. In fact, I get an error in UE 5.6 if I try to use a virtual texture with RVT. In past versions, it would let you do it, but you often got blurry textures.

Why?

Suppose the engine asks for the super high precision tile that’s directly in front of you. So far, so good. You do a texture sample from your virtual texture and off you go. But wait… what did you actually read from the virtual texture? If this is the first time reading from it, you will get the coarsest tile because the engine hasn’t had time yet to load in the higher detailed tiles. Virtual textures work this way. They go from coarsest to finest in that order. You have no control over what LOD it will give you. This is often seen as texture popping. It’s usually not a big problem because every frame, the engine will ask for that same tile and it’ll get better and better as the engine loads higher LOD tiles from disk.

But with RVT, it CACHES the initial tile it obtained from the virtual texture. And that’s usually the coarsest tile. So it stays blurry until that tile gets cycled out of the RVT. This is why after a while, the textures look fine as the engine asks you to regenerate those tiles it has flushed out. Zooming out and in helps. But if you just rotate the camera, it won’t get better and you’re screwed.

In your case, it seems you’re just rendering every time. Since there’s limited memory, you’re likely never going to get as nice a render as you would with a proper setup of RVT. So that’s one cause of blurriness. You can still get the same issue though even without RVT, but I want to finish off explaining RVT setup first.

Now, RVT has a drawback. If you look at the horizon, it’s going to need the coarser LOD’s since those are far away. But coarser LOD’s require EVERYTHING to render since it covers such a huge area. These are insanely slow to render. This is where SVT comes in (Streaming Texture property on the RVT volume). You can precompute the coarsest N LOD levels. Usually 4 to 6 is enough. This is why there’s a “Build” button. It is SLOOOOOOOW. But once built, it will always be available at runtime and this will help with performance on those coarser tiles.

*** LOD ***

Now, back to your case. You’re NOT using RVT because I don’t see you writing to the RVT output node. So why is it blurry? Well, even though you’re not using RVT, the engine still requests the exact same tiles. So if you’re using virtual textures, the engine will start by asking the tile directly in front of the camera with a high LOD. But your virtual textures still operate the way any virtual texture does and will load the coarser ones first. I don’t know what the engine does here because I don’t use landscape this way. Ideally, texture precision should get better every frame, but it’s possible the landscape LOD and your virtual texture LOD aren’t in sync. So you can play with LOD Distribution properties on your landscape actor. This is something you need to tweak even with RVT.

*** POOL SIZE ***

Ok. So that’s the main engine system. There’s ANOTHER reason why the textures could be blurry.

In the console textbox in the editor, type the following:

r.VT.Residency.Show 1

Some graphs should pop up.

In your project settings, go to Engine/Virtual Texture Pool. If you already have settings here that you’ve set up earlier, write them down or take screenshots or something because we need to remove everything. Set your default size in Megabytes to at least 256MB. Check “Pool Auto Grow In Editor” (this must be ON). And delete everything under fixed pools and transient pools.

Now back in the editor, move your camera around. Turn the camera everywhere you can, not just the land. What you want to keep an eye on are the red lines in the graphs. If any of them go to the top or you see the view resetting and the pool size grow, then your pool sizes are too small. Keep moving the camera around until the red bar no longer resets your view and no longer reaches the top.

Then go back to the same place in your project settings and copy the transient pool settings to the fixed pool settings copying the info EXACTLY in the exact same order for the formats and round up the Size In Megabytes for each entry to a power of 2. You only need to copy the size and format properties. Now uncheck “Pool Auto Grow In Editor”. And delete the transient pool completely.

Your textures should now look a LOT better.

2 Likes

Just thought of something else. If you have problems with virtual textures looking blurry in general, you can try increasing the tile size in your project settings under Engine/Rendering → Virtual Textures → Tile size. Normally, this wouldn’t matter, but it does start to matter on large areas such as landscapes.

I found that enabling Anisotropic filtering is also very good. Requires a bit more memory for textures, but what this does is help with textures seen at an angle. Walls would be the exact opposite since it is flat on the view. But landscapes are very prone to being viewed at an angle.

If you’re not using RVT, I think you need to set “Draw in Main Pass” to “From Virtual Texture”. Make sure you have no RVT volume in the scene. I’m not sure on this one, but thought I’d mention it.

1 Like