Landscape Virtual Texturing (Since UE 4.23)

Looks like we are getting Virtual Texturing support with 4.23.

I want to dedicate this thread specifically to landscapes where VT will probably be a big gain. From what I’ve heard is that huge landscapes with many layers (10+) is a bottleneck in UE with the old Texture Streaming method.

I’ve already done some tests (in 4.23 preview 1) but I’m unsure if this way actually gets the most out of VT for landscapes.

So what I’ve done is enabling the “Virtual Texturing Streaming” on each landscape Texture.

After that I went through the landscape material and switched the Sampler Type of any Texture Sampler to Virtual Color/Normal.

So as I said, I don’t know if this is actually sufficient to fully take advantage of VT or if there needs to be a lot more work to be done on the landscape material.

There are also some new material nodes like Runtime Virtual Texture Sample. I couldn’t figure out it’s usage yet.

D_QYj7mVUAAHCaa.png

do virtual textures act like megatextures? Talk:MegaTexture - Wikipedia
or amplify textures? https://amplify.pt/unity/amplify-texture-2/
where we can potentially use a ■■■■ ton of textures? with limited mesh space?

That’s very interesting.
I’m also not sure about the advantages, I hope they’ll explain that feature more in the final release notes.
For example, if we have a landscape material with a couple of 4k textures (counting things like splatmaps, global normal maps, etc.), will that improve the performance in this case?

To my understanding, this should go much further with the landscape textures getting rendered into a virtual texture (using decals and potentially complex layering) and then the landscape and static meshes would simply sample that runtime generated texture. This would avoid the high costs of constantly recalculating the often expensive landscape material for every visible pixel at the cost of some memory and especially import make it much easier for other static meshes to use that landscape material as well.
The only issue with a system like that is that I have no clue how it would handle triplanar texture mapping, but I can do without triplanar mapping if there is a simple way to use the landscape material in static meshes to cover steep areas, that would result in better looking environments anyway.

From what I understand, it seems like virtual texturing is just a more efficient (depending on the circumstances) streaming algorithm, where the algorithm doesn’t need to stream in the entire texture but only the texels requested by the engine. My immediate thought was how useful this would be for HLODs and merged material atlases created by the engine’s built-in tools, as the pixels will be streamed in as needed.

However, it seems like VTs often have their own inherent issues. Here’s a link to a stack exchange post that I think discusses it really well:

I’m excited for what VTs can do, but I don’t think they’ll completely replace traditional textures anytime soon, but I certainly hope they’ll find their place as something to offset issues that traditional texturing methods have difficulty with.

Now that 4.23 was released and we have some documentation I still wonder how to use VT for landscapes.

What if we create an 8k texture atlas that combines all landscape textures? We could then just have two virtual samplers (1 for color, 1 for normal) instead of having dozens of shared wrap samplers.

I’m trying to use this new Virtual Texturing system and I’m running into a myriad of problems. Hopefully someone can help. To start with, Here’s my full image in Photoshop. It’s 24576x40960. It’s broken up into 15 tiles of 8192x8192, saved at PNG files and numbered with the UDIM pattern.

20190909_173807.jpg

First problem is that I can’t get UE 4.23 to import the 8k images, it crashes during import. I have been able to get a set of 4k resamples to import. The imported texture map asset shows the file paths for all 15 images, and Virtual Texture Streaming is checked. I see 12 MIP map levels, but this is where the weirdness begins. The tiles are all in random places, and in different places on different MIP levels.

This is MIP levels 1, 2, 3, and 4. Why? Why are they not in the right order and why are they in a different pattern for each MIP level? When I place this on an object in the scene, it looks the same as the texture display, and then zooming in and out shows the MIP map levels changing and the tiles animate from one pattern to the next.

I’m concerned about not being able to import the 8K maps, because some of my other images would be 8 tiles wide at 8k resolution, and I don’t see a way with UDIM to get more than 10 images across. Is there another file naming schema that would allow for a larger grid of images?

Help!

NC3D.com

Bump!

I’ve spent a day on this so far and I’m really stumped as to how to use the Virtual Texture. I can’t get it to arrange the tiles in the correct order.

I can’t actually get a virtual texture to import either. My tileset had poor numbering at one point and started at 1011 and that imported a virtual texture. But when the numbering scheme is correct it just imports a single UDIM tile as a regular texture.

I’ve gone through the factory and UDIM naming function and it all seems fine, so I had no idea what’s up.

Edit: oooh, I just figured it out. The base names before the UDIM ID all have to be the same.

Edit: oooh, I just figured it out. The base names before the UDIM ID all have to be the same.
[/QUOTE]

My texture file names were all the same and it made a Virtual Texture, but the tiles were all mixed up. Are you getting all of your tiles in the correct places on every MIP level?

20190916_170505.png

have you guys been able to manage a transluscent object to render correctly into de RVT? if i apply a gradient into the opacity of my object, when it projects to the RVT the black parts show as color instead of transparent.