Megascan's Materials and Runtime Virtual Texture (RVT)

I just started seeing these DprF textures in downloads from Megascans. I’m familiar with ORDp and RHAO, did a search online for DpRF or DRF and found nothing.

I’m trying to get some Runtime Virtual Textures going in a level, RVT is not working or if it works, the VT texture on the Static Mesh rock, looks much lighter than the landscape texture it sits upon. I’m trying to figure out if this DpRF texture, when mixed into a preexisting material have and not of Megascans origin is causing the assets not to render correctly and also possibly interfere with RVT if the landscape material not of Megascans origin is used.

Last download for a rock this textures appeared:
DpRF:
Dp- Displacement (assumed)
R- roughness- In the rock material DPrF, this comes out of the Green pin and goes to roughness.
F- Fuzz- In the rock material DPrF, this comes out of the Blue pin and goes to a Fuzz Material Function, it’s another black and white mask, I think. I guess I need to read up on a Fuzz map.

Anyway could someone confirm, my assumptions are correct?
Thanks!

Now here is the real issue: getting RVT to work on a landscape of mine using MegaScan’s Materials.
What I worked with before was the Megascan MS_Default_Material, no issue there, but now with a mossy rock…

I downloaded this Static Mesh asset: S_Mossy_Forest_Rock_vimrfgwaw_high from Megascans.

Associated:
Material Instance: MI_Mossy_Forest_Rock_vimrfgwaw_8k

  • Material: M_MS_Default_Fuzz_Material_VT.

First off, the Material Name, as far as anyone knows, the VT tacked to the end means Virtual Texture as in Runtime Virtual Texture, correct?

Secondly the Material itself, shows texture placeholders the have “VT” labels on them. The Material Instance has the actual textures plugged I there, and they also have “VT” labels on them.

I would assume this VT means virtual textures that are associated with Runtime Virtual Texture.

What makes them different than regular textures?

Thirdly, I am searching all over this Megascan Material and it’s associated MI, and MF, and I see none of the Virtual Texture nodes that I am used to seeing, that facilitates transferring the texture to be used by the RVT from the landscape material to the Static Mesh material.

Let me correct this, on my landscape I do have a Runtime Virtual Texture Output that sends the textures out for the Static Mesh to pick up. Returning to the “VT” label on the name of this material when I search through the Megascans Material, Material Instance, and associated Material Functions, I can’t find where the Static Mesh Material would be picking up the RVT. Usually it requires a **Runtime Virtual Sample Parameter,**actually 2 of them one for receiving the Virtual Texture Color and the Virtual Texture Height.

This material is designed to support Static Mesh Textures, it would really save me some heart ache and I would really appreciate it, if someone could tell me where these components are in the static mesh’s material with a “_VT” tacked to the end of it.

Thanks for listening to my whining and any help would be appreciated. :smiley:

Ok, it appears that Virtual Texture Streaming is different than Runtime Virtual Textures? (the VT label I’m seeing on Megascans textures) Looking for a good tutorial on this, because I’m thinking I need to distinguish between RVT and VT streaming, or is it the same thing or option B, is as simple as swapping out nodes from a traditional texture sampler to a Virtual Color Normal, node but I’ll guess it requires more than just this… :flushed:

Found this: Guide to Virtual Textures for Noobs | Community tutorial

Yes, Virtual Textures and RVTs are different things, althought they both involved tiled-sampling of texture-data (the V in Virtual).

In my experience VTs and RVTs don’t work well together; don’t have one kind feed the other, or another of itself (RVT → RVT).

VTs are more about texture-optimization for larger/more-costly textures on stuff-general, whereas RVTs are more suited for landscapes or painting other kinds of data into to share across stuff-general. When you just need to sample an 8k texture, make it virtual so the system can chunk it up and steam only(ish) the parts that are required vs loading the whole 8k monster. RVTs chunk up whatever stored-data in the same way, only rendering the tiles/chunks needed.

Generally speaking, I’ve only worked with RVTs w/landscapes+heightmesh and VTs on meshes. I’d have to check but I don’t know why on a given mesh one couldn’t use VTs as source and also sample-from an RVT, per the restrictions above. I know you can sample from multiple RVTs onto a single material, so I presume the other is possible as well.

As far as the Megascan material, I don’t have it, but if there is no runtime-virtual-texture sample node then it doesn’t touch an RVT. Otherwise, any nodes set to sample as a VT needs to have the correspondingly sampled texture set as a VT.

And yes, depending on compression of the source texture, and the compression on any RVT, color CAN vary somewhat. Maybe some textures are set as sRGB and other’s not?

Generally, on an RVT it’s surely worth spending the expense on the YbPbr(?) compression; the expensive one. It does a much better job a matching color when sampling in the static mesh.

1 Like

Thanks for the explanation. My experience is that from the perspective of a student, things change rapidly in UE World. In the the process of learning UE, I have been downloading assets from Megascans for a year, and recently on mossy rocks these VT textures started appearing, I assume as part of the Fuzz element.

My experience is, they A- don’t seem to work well with RVT either or B- this is just another one of the many instances where something new to me appears and I don’t know how to adapt it to what I am working on and my searches online reveals basically nothing in the way of official documentation or tutorials on how to incorporate this into a project.

There is a Megascans Static Mesh Mateial that looks like it is designed to work with RVT, but so far, I can get it to work, it’s not wotrking correctly, the RVT texture being painted on the bottom of my static mesh rock asset, has a distinctly lighter shade than landscape it’s supposed to blend with.

After about a week playing with VT, at this point, I think I’ll just check my Megascans download settings, revert to the MS Default material forget about Fuzz for now until I can find a decent tutorial on the topic, and get RVT working with the way I learned it.

I know what you mean. This can be influenced how the RVT is compressing data, can you try changing your setting:

Per - Runtime Virtual Texturing in Unreal Engine | Unreal Engine 5.1 Documentation

As far as the material, I don’t believe I have it in my project. What model did it come with so I can try a take a look at it myself? NM, I see it “MI_Mossy_Forest_Rock”; will take a look…

1 Like

:frowning:
this was all I got on exporting a mossy-rock (there were several) :frowning:

Any chance you can screenshot the part of the logic where there is an RVT? What folder did the material end up under in your project?

For whatever reason, I only have that MS_DefaultMaterial_Fuzzy material… No VT. Unsure how to get that particular one.

1 Like

Hmm, Looking over this project, I may have misspoken about “VT” material ready for RVT. It’s very possible I got something like an edited material from one of the many tutorials I’ve been working on, mixed in with the MegaScan Presets folder. My apologies. :flushed: Mossy_Forest_Rock_vimrfgwaw

So do you know if RVT should work in a Fuzz material? As I said, I kind of got it working by the Static Mesh material, inserting the MF_RVT to the left of the MF_Fuzz. But I have an issue with the different shade. I’ll take a look at what you suggested and I’ll try moving the MF_RVT to the right side of the MF_Fuzz.

The other part of this issue is that built-in Bridge is insisting on downloading all textures as Virtual Textures. I don’t want Virtual textures, just traditional texture samples.

This is what I posted over at Quixel:

I have been experimenting. I found that for some reason Bridge built into UEv5.1 is insisting on downloading Virtual Textures with the “VT” stamped on them. I see no setting that will turn this off.

I do have Virtual Textures enabled in my project setting for the purpose of using Runtime Virtual Textures but this is different than Virtual Texture Streaming. Of possible interest, Virtual Textures enabled is a project specific setting, so why would Bridge insist on downloading them before using the “add to project” button?

I tried to use the suggestion of in Project Settings (Editor-Texture Import>Virtual Textures) set the Auto Virtual Texturing set to 8k, then try to download via build-in Bridge 4096 resolution textures, but they too came in as “VT”.

I can download traditional texture samplers via stand alone Bridge, although don’t see any settings for turning Virtual Texture downloads on or off, maybe it is by virtue of setting the downloads to Nanite? Don’t know.

I would appreciate clarity on:

What exactly controls the downloading of Virtual Textures "VT"s from Megascans, where are the setting(s)?

Is it now possible to download traditional Texture samples via UEv5.1 built-in Bridge? If so what settings are required and where?

I do appreciate your patience and assistance. :smiley:

So as far as the Quixel stuff, I cannot really comment. I’ve not had anything come down with a VT/RVT set of logic inside of it, just some basic master-materials like the fuzz and the basic-basic master-material.

As for the Fuzz + RVT question, it shouldn’t matter. Insofar as the material with the Fuzz in it, the RVT is just-seen as another texture, you can do what you want with that information as you will; it’s just scalar-data; you interpret it as BaseColor, Roughness, etc.

If you put the fuzz before the RVT-sample, that would be proper (to my mind); you don’t want to fuzz the stuff coming from the RVT! That stuff should be whatever you painted in, comes out. If you want to modify after blending with the mesh, sure, you can Fuzz it all you want, but to my mind wouldn’t make sense (generally) unless you have a use-case for it.

1 Like

I have located the issue of why I am getting VTs on download:
Project Settings>Engine-Rendering: Enable Virtual Texture on Teture Import UNCHECK THIS.

Yes I checked it thinking this had something to do with RVT, but it has to do with just VTs. I appreciate your attention and help.

1 Like

No worries, let me know if you have any more questions.

1 Like

I thought I had this whipped, but I’m working with a rock Static Mesh that uses a fuzz material and when I plug in the Material Function designed to enable RVT in the Static Mesh’s material (MegaScans material), the part of the SM that is supposed to be picking up the landscape texture, when placed on the landscape is white. Is there any usual reason for this to happen? There is no issue if I use the Megascans Default material (no fuzz) and plug the RVT MF into it.

I’ll go back and try to see if I overlooked something, but I did notice that the SM uses a DRF channel packed texture (rough+ a Fuzz map output) and I’m wondering if there is something I need to take into account in the Material Function I’m using?
Thanks!

What does the graph look like?

I’m not sure what graph you are referring to. Of note, it appears that if I plug my RVT Material Function before the fuzz Material function, I am getting better results, instead of plugging it in after. Still playing with it. If I think about it it seems like you would not want the fuzz action effecting the RVT area which are the areas on the static mesh that were turning white. But that might not be it or It could be something else I’m not aware of. :slight_smile:

Note that IANAP (I Am Not A Professional). I am self-taught, haven’t dropped my project’s, so more of a noodler, but I try. :smiley:

As far as the graph, I was referring to your material graph. You ought to be able to paste a pic into the reply, like so:

As far as the order in which you hook your functions up, it will depend on what you are doing to each part. It’s more a logical-puzzle, order of operations in what makes sense.

In your case, since the Fuzz is specific to the mesh, it would make sense to fuzz before blending with the RVT.

In other cases it might differ; for example: in my case I have a wetness function that can be applied to either meshes, skeletal meshes, landscapes, etc; it’s literally the same function so it’s always consistent across whatever. One might feel that I’d blend the mesh w/the RVT, then apply wetness, and that might work in a simple case, yes. In my case, each kind of material-type (stone, flesh, cloth) has parameters they can pass into being wet to make things look differently wet, as well, my landscape is the same, with each layer having control over how wet it looks and how it looks wet. :wink:

Since the power of an RVT is to leverage as much up-front, front-load it as you may, it makes performant-sense to apply wetness to the landscape as it’s being rendered into the RVT. As well, since the RVT is just PBR information, there’s no real way to keep track of any kind of mask so that I could apply DIFFERENT wetness values, per-area, after sampling. Thusly, I apply wetness before rendering into the RVT.

Consequently, (I know, a mouthful), it makes logical-sense to wet the mesh before the RVT-blend, even though it might seem like ‘extra-work’ it makes logical-sense to do so. Offhand benefit is that the mesh can now be distinct in this way in it’s own right, and whatever the landscape is doing just-comes-through the RVT as you would want.

The pic up top is exactly that use-case applied to the default MS material in my project.

In your case, if you wanted to apply fuzz somewhere, you’d stick it in between the adjustments node and My_Wetness. That stack of logic would define just-the-mesh, then blend it to the RVT as the final step.

Thusly:

1 Like

Thanks for your help. I am learning and it’s a hobby. :)When I have a chance to organize my info better, I’ll give a longer reply and make a copy of my material. It seems that when I plug the RVT Material Function in last just before the output, with the Fuzz material that comes with the Megascan assets, the RVT area on the rock is white. But when I hook up the RVT before the Fuzz Material Function, then it seems to be working…

I’m around, so just reply to the thread or whatever.

As far as diagnostics, the best method is generally to work backwards.

Skip the rock material, and use a color like red [1,0,0]. Hold 3 and click into the material graph, and then use that single color as your base material. Blend with that with the rvt and see what goes where. The alpha is going to be your focus since it determines what shows up where.

Otherwise, it’s a step-by-step process to take what works and then add 1 thing, then one more. Eventually it will break and you can focus on that thing.

Check this guy out, he’s where I started learning all about unreal materials. He has a multi-part series on landscape stuff: Landscape Material Tutorial Part 1 (Unreal Engine 4) - YouTube

1 Like

I’m sorting though an issue where I have several levels where RVT (Runtime Virtual Textures) works properly, and another project where it has not been working. In this project when I look at the Runtime Virtual Texture UObject after it is being fed texture and height info from a material, should the texture that would be displayed in it, should that fill the entire window? For both the height and material data in the 2 RVTs, these windows instead of being filled with the textures or height data, are only partially filled, the top third, but the bottom 2/3 of these windows are black.

Does that mean anything in particular such a a texture resolution mismatch?

This project is using 4k textures for the landscape. I assume the texture in the RVT should match the same resolution? As far as settings a size setting: Size of the Virtual texture in tiles, this is also set to 4k. Is that correct or an issue?

The landscape is composed of 4k textures.
in the RVT Widget details:
Virtual Texture Size: 4MiTexels
Page Table Size: 1024
Size of the Virtual Texture in Tiles: 4096
Size of each Virtual Texture tile: 1024
Border Paddin for each Virtua Texture Tile: 4
The Height RVT is set to World Height.
The Material RVT is set to Base color, Normal, Roughness, Specular.

Any other pointers would be appreciated. The level does not currently display RVT properly. Thanks!

OK, this is somewhat embarrassing, but although I’ve experimented with RVT in my project, I discovered that RVT enabled, had been turned off in Project settings. (Slaps self)

But now, it kind of works, the RVT Height and Material widgets displaying properly I’ve got the RVT tied into the Static Mesh material, but I’m seeing two things.

One is the Material Instance displays a warning about using a Linear Color associated with the DpRF texture. I looked at the DpRF texture place holder and it is default as Linear Color. And I’m using what Megascans provided. So there must be a reason that Unreal Editor does not like this situation.

The second issue is that I have the Runtime Virtual Texture working, but the color that is blended onto the Static Mesh is substantially lighter than the landscape texture, so it’s not blending with the proper match in color tone/density.

Is there a common reason for this and an easy fix?
Thanks.

No. The RVT is just an information-sink; you can make as dense as you need to. What feeds into it can be whatever (but not a virtual-texture itself).

What you want to set it towards depends on what you want to capture. In my landscape system, I only need the alphas, so for a 2k landscape texture, it’s sized at 12,0,2 When I wanted to capture the actual PBR into an RVT, I tended to use 12,2/3,2.

If your RVT is set to a low-density value then feeding 4k textures won’t really matter.

As far as color density, the docs note there can be drift owing to the compression being used, ensure you are using YCog for your color-space. For blending, assuming you paint PBR information into the RVT, you would sample that in your object-material, create a blending gradient (I usually grab world-height and then height-lerp to the mesh-material. That way it’s the same color as your landscape/heightmesh that is also sampling the RVT.

You can also just dither the edge with stippling of you want ‘soft’.

short vid I found that talks to some of this: https://www.youtube.com/watch?v=zD_IPknrdyM

Also, Tharle is great: https://www.youtube.com/watch?v=PKX_v4RDkPc

For the colorspace, open the texture and make sure the sRGB box is/isn’t checked. I’ve also had odd issues with the material editor where it seems to ‘see’ (linear)color and complain about the default texture provided. In rare cases, I’ve had to delete the texture/sampler nodes and stick new ones it. Point being that if you checked the rest and are still having an unexaplainable error in this context, might just be the nodes (for my experience). It’s happened to me a few times when I had to go through and update color-spaces, so…

1 Like