Does RVT output in masked geometry gets computed?

Hi!
I’m making floating islands for my game, therefore, I have big chunks of landscape masked out using the visibility mask system. I’m also using RVT, mostly to blend the meshes I use on the border with the landscape.


(Landscape visible part highlighted, Mesh on the right is sampling RVT content written by “invisible landscape”)

As you can see on the screen, the RVT sample works even in areas where the landscape is masked out. Not too far-fetched considering I do not “branch off” the “Runtime Virtual Texture Output” node when the landscape visibility mask value is 0. But this makes me wonder whether:

  • scenario 1: the whole landscape is writing to the RVT, masked or not, which performance-wise would be bad in my use case (I would render a lot of invisible pixels)
  • scenario 2: there is something else going on that makes it so that only the pixels used by the mesh sampling the RVT are computed.

I read some replies on another post about the RVT being a cache of instruction more than a cache of pixels, which makes me think this could scenario 2. I also did some stress tests which leaned more towards that hypothesis (GPU Virtual Texture cost didn’t show up until adding Mesh sampling the RVT). The thing is… I couldn’t find any content explaining the algorithm used in RVT so I was wondering if anyone had a better understanding of what is happening under the hood, or can direct me to relevant content to read on the topic.

Thanks!

Almost guarantee its 1.

Rtv writing/reading is not as expensive as material complexity rendering.
Therefore, rendering less material you don’t really see much of an impact.

Realistically, you should be using baked meshes anway. Particularly if you are all done sculpting and you can convert things.
Because? You make custom mesh collision for each mesh, and you avoid players being able to mesh a level…

Thanks a lot for the answer! Is baking to meshes the right way for a non nanite project? I feel like it would be quite complex (having to create low res geometry, normal maps, LODs, convex mesh collisions etc…) and you’d end up with a lot of geometry and normal maps+ having to rebake after each iteration. And I would lose grass blending (but I guess I could bake a texure for that).
But if we’re in case 1, and I want to optimize that “useless” cost away, maybe baking the weight data of the landscape on a texture can be another option (my total area is quite small, probably a 2k x 2k vertices, that are going to be split in smaller area for streaming).

Meshes will always cost less than landscapes to render.

How they work, what you loose or have to replace, thats a different story.

Assuming your landscape is set, you can bake it to a mesh from within the engine using the level impostor system.

The collision created for it is not the best, but you can manipulate it at the individual mesh level to max out the variable options/hull count etc.

Under no circumstance should you or anyone use Complex as Simple - that’s what causes player’s ability to mesh in the first place (look up ark meshing for instance).

Taking the mesh out of the engine and customizing the collision further, though cumbersome, gives you more refinment options.
Also probably a more logical apporoach to collisions compared to the automated “make up hulls however you think woeks best” approach.

Landscape material can easily be converted to work on a regular mesh by using the mesh UV, or WPO coordinates, and feeding in an image for the layers to follow.
But, then you have performance costs which could be avoided. If you bake down the material and render it to a single texture you get much less off a perfoance impact - at the cost of resolution.

Having gone throguh the process on several levels, i can tell you, it will see you pull your hair out a bit and take about a week.
The benefit however is being able to reach a lot higher fps, to the point where the game would be shippable in most cases (224hz on 1080 or whatever).

Personally I do think its worth the effort.
Surely, its not everyone’s cup o tea or monetarily responsible.

Would I still do it if Nanite worked?
Probably yes.
Even with nanite I’m 100% sure that meshing is possible if you don’t fine-tune your collisions as solid pieces.
Is meshing really that much of a problem to gameplay?
Depends. Multiplayer, yes. Single player? Probbaly not.
Would I still go out of my way on single player only? Not as much compared to performance impact…

1 Like

Amazing! Thanks for the thorough answer. I’m on a single player project, I’ll keep in mind everything you said when profiling my project!