Runtime Virtual Texture with Landscape


I am working with the new runtime virtual texture feature for my landscape and having some problems with it.

1. Triplanar mapping is not working with VT

I am using triplanar texture mapping for my layers that are placed on slopes (eg. rock texture) to get them tile nicely. Is it even possible to get world aligned texturing to work with the RVT? Would like to hear if someone has got it working with runtime virtual texture.

The left image is without using RVT and the right one is using RVT. As you can see, the mapping is not working as expected. I am using customized version of “World Aligned Texture” which samples 3 times the texture with different UV’s which are calculated using absolute world position. Lerping between those 3 samples is done using vertex world normal. Somehow it looks like that either the world position is not correct or vertex normal cannot be used with RVT. I tried to search the documentation but there are no specific information about such a things.

2. LOD with RTV

One idea was that I could use RVT for landscape components that are far away (LOD level 0 would use material that does not sample virtual texture) to get tesselation and my dynamic footsteps to work. Problem is that if I set the material using RVT to something else than LOD 0 it is drawn as black (or not drawn at all more likely).

I am having 2 instances from my master material assigned to different LODs where, LOD0 instance has VT disabled and LOD1 has VT enabled. I would like to get my landscape to always draw into RVT using LOD1 so it would use my material that has RVT output enabled. Is that somehow possible?

As seen in the image above, the LOD1 level material is drawn as black while it should sample from RTV. My theory is that the RVT was tried to be written using LOD0 material which does not have RVT output.

Having the same issues!

RVT is essentially a big decal so tri-planer mapping isn’t something your’re going to be able to do with it. Might be an idea to not sample the RVT on steep slopes like that.

any updates – did u figure it out?

  1. expected.
    how do you get a 2d image to map on the z axis?

  2. the RTV system is a large landscape sized render target.
    nothing more, nothing less.
    if you put a material in LOD 1 that doesn’t render the same in LOD0 the process isn’t able to capture the texture, thus renders black.

My advice would be to re-work your material so as not to sample rtv around your character and sample rtv further out.
you can probably get that to work quite nicely by now given all the improvements the RTV process had.
I’m not 100% sure of how viable the idea is, but given that you can apply tessellation and other maps without them being sampled/applied in rtv making a hole like area for the real material should be possible.

nice idea — but we talking about using RVT on the landscape (that’s the main reason for using RVT at all)

The idea of using rtv is performance gain.
25painted layers and 10fps vs 1 layer, one image, 120fps.

Hopefully, addiding in a hole of about 2m under the charachter wouldn’t condemn the rendering cost. Hopefully.

Hey. Are there solutions? In a fornite using RTV triplanar rocks …

upd: works on a landscape, does not work on a mesh with blending