Hi,
I would like to create some kind of road tool, if possible using RTV. However i found that the RVT never been updated during runtime? Any idea how to?
Hi,
I would like to create some kind of road tool, if possible using RTV. However i found that the RVT never been updated during runtime? Any idea how to?
Sorry for bumping, but really like to know more about RVT
At the moment you cannot re-encode an RVT at runtime.
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.
Drag the runtime virtual texture that has been placed in your level into your level blueprint then get the virtual texture component from that, and then drag off invalidate to update. This can be used on tick or event. Maybe set the tick to every second rather than every frame. You can set the reference into another blueprint only to invalidate when there has been a variable change to the landscape material but on tick is easier.
Doing that on tick would pretty much make RVTs useless since whatever you saved in the RVT would be invalidated next tick either way, making the performance worse.
One should do that as rarely as possible. In my game I have multiple roads on a landscape that want to invalidate RVT, and they do that in one single frame once in a while, so made a little manager that listens for their request, and executes in the next frame.
Furthermore, you should get the existing bounds and radius of the RVT rather than feed some constant values in case the RVT is not used for something worldwide.
Tick interval can be set it doesn’t have to be every frame