How to make Megascans Default Material Triplanar

Hello! Noob here :slight_smile:
I’m using the newest version of Quixel Bridge (2019.5.0). When I export a material to the engine (4.24) it is a Material Instance of a default Master Material that gets imported automatically.

You can see it here:

How would I go about making this material world aligned or Tri-Planar, so I can use it on objects of any size with the material never getting skewed and projecting in all directions?

I got it working for one direction, here:

But making it work for the other 2 directions remains a mystery to me.

Hi!

You need to align the texture to the other world axes. This is a bit tricky and you need to have 3 texture sampler in order to have each one aligned to each axis. I prepared a simple example with anotations to explain it better:

You can add an Add node after each World Pixel Position mask, before connecting it to the UV, to get an UV offset for each side separately.

Hope it helps you!

Thanks Darxen!

I didn’t see your post and got it to work with the World Aligned Texture node. I had to use Texture Objects instead of Texture Samples. For the Normal Map I used the World Aligned Normal node.

Here some before and after shots:

Albedo (Roughness and Metallic follow the same logic):

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_179961_1577433199837_245”,“title”:“Capture1.PNG”}[/ATTACH]

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_179962_1577433219926_750”,“title”:“Capture2.PNG”}[/ATTACH]

Normal:

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_179963_1577433390414_259”,“title”:“Capture3.PNG”}[/ATTACH]

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_179964_1577433404737_434”,“title”:“Capture4.PNG”}[/ATTACH]

Distance Based Tessellation/Displacement:
[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_179965_1577433456130_466”,“title”:“Capture5.PNG”}[/ATTACH]

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_179966_1577433476486_889”,“title”:“Capture6.PNG”}[/ATTACH]

Over the weekend I will try your method, as it looks like it gives me more flexibility to tweak things and, like you said, adjust textures for each side. I would also like to be able to offset the textures. I haven’t found a way to get that to work with the World Aligned nodes yet. Any help is much appreciated.

Here is a link to the World Aligned Megascans Default Master Material that I’ve made:

Hummm well, take a look to the WorldAlignedTexture node:


Is almost the same as I did. To control each side separately, you need to add an offset to each UV. If you want to use the WorldAlignedTexture node from Unreal, you must modify it to include that offset.

By the way, I can’t see your images, seems broken :frowning:

I guess I could just create my own Material Function(s) with the copy of the nodes from the World Aligned Texture/Normal nodes and then just add another input for UV offset.

Here are the images before/after again:

Albedo:

Normal:

Distance Based Tessellation/Displacement: