Download

Runtime Virtual Texture update in runtime

Hey there. I’d like to ask if it is possible to reflect material changes within object rendered onto RVT on the texture itself? If I, for example, have material with base color being based on some simple panning texture, I get it to render as a decal on the RVT, but it only use material’s “initial state” and isn’t updated after that, which I guess is correct behaviour?

I want to use RVT as a mask to make dynamic changes to landscape and foliage material colors mostly - while in-game I can spawn static objects that will draw a mask to the RVT and this will be read by for example foliage material. Imagine that you “spawn” a tree and grass around it gets greener with passing time.

Is there a way to get RVT to update according to material changes or should I set up a landscape sized Render Target?

Yes, you actually can. You can use Material Parameter Collection to change value, and then use node “Invalidate” of Virtual Texture Component (this is the root component of Virtual Texture volume). “invalidate” forces VT to update in real-time, but for some reason for me it worked only with Material Parameter Collection, but not with normal material parameters.