Unreal Engine 5: Building Worlds With Quixel Megascans

Learn how to craft Landscapes using Unreal Engine 5 and leverage the power of Quixel Megascans for high-quality textures and assets. Discover the step-by-step process of applying complex material blends and adding intricate details to create captivating gaming environments. By Matt Larson.

Leave a rating/review
Download materials
Save for later
You are currently viewing page 3 of 3 of this article. Click here to view the first page.

Material Tiling

In this function, having parameters later makes this a reusable component where specific textures can be assigned when it’s used. The last useful parameter to add to this Blueprint is a value for the Tiling, or how quickly the texture repeats on the surface.

Now add another node — a Scalar Parameter — and name it Layer_Tiling. Next, drag to create a new Multiply node. Then, add an MF_Tiling node. From the MF_Tiling node, connect the output to the input value B of the Multiply node. Finally, set the Layer_Tiling default value to 1.0.

Connecting Layer Tiling and MF_Tiling to Multiply

Next, connect the output from the Multiply node to the UVs inputs of each of the TextureSampleParameter2D nodes. Connect MF_Tiling Rotation Angle to the MF_MapAdjustments Tangent Normal Rotation Angle input. These parameters affect how the textures repeat on the landscape, as UV coordinates determine how each image is sampled and drawn on a surface location.

Adding the tiling nodes

Save the MF_Layer_1 Material Function, and close the Material Blueprint window.

Duplicating the Files to Blend the Layers

Under the Content Browser, right-click MF_Layer_1, and choose Duplicate. Name the copy MF_Layer_2.

Now that you have two copies, rename all the parameters so each name is unique:

  • Open MF_Layer_1, and rename each of the parameters:
    • Layer1_Tiling
    • Layer1_Albedo
    • Layer1_Metallic
    • Layer1_Normal
    • Layer1_ORD
  • Similarly, open MF_Layer_2, and rename each of the parameters:
    • Layer2_Tiling
    • Layer2_Albedo
    • Layer2_Metallic
    • Layer2_Normal
    • Layer2_ORD

Save both of these Material Function Blueprints before closing.

Open M_Landscape_Blend again. Now, drag and drop in the MF_Layer_1 and MF_Layer_2 Assets from the content browser directly into the left side of the graph. Connect the Result outputs to the Landscape Layer Blend node to complete the Material for blending two Material layers. This now completes the missing items in M_Landscape_Blend, and the error you experienced before should now have disappeared.

Layout of the blend material complete

Save this and close the window.

Creating a Material Instance

Now, create an instance of M_Landscape_Blend, and make this the landscape material. In the Content Browser, right-click the material and choose Create Material Instance to make the instance, and name this M_Landscape_Blend_Inst. A Material Instance lets you use the parent Material as a base and customize each instance for a unique appearance.

Selecting material instance from the menu

Open this M_Landscape_Blend_Inst, and you can specify each of these parameters with a particular texture. Check the box for each parameter you’d like to modify, and then set the Albedo, Normal, and ORD textures for each.

Material instance configuration

Now save and close this window as well.

Painting the Landscape

Expand the Landscape in your level, and select it and all the LandscapeStreamingProxy_* tiling Landscapes underneath your Landscape node. In the Outliner panel, under the Details panel, find Landscape Material and change this to your instance of the M_Landscape_Blend_Inst to assign all the sections of the Landscape to use this Material.

Showing which landscape nodes to select

Return to Landscape mode, and switch to the Paint tab.

Note: You may need to close and reopen the Landscape mode in order for the window to refresh.

You’ll see two Target Layers. Before you can use these for painting on the Landscape, you’ll need to choose to Create a Layer Info for each. Click the + icon to Create Layer Info for each of the Layers, and select Non Weight-Blended Layer. Save the layer info objects in the Materials folder.

Adding a new layer info object

Initially, the textures fit the Landscape poorly as the tiling repeats too frequently. So, adjust this by opening M_Landscape_Blend_Inst and decreasing the Global Scalar Parameters of Layer1_Tiling and Layer2_Tiling to the value 0.01. Save the material, and return to the Landscape editor to see the changes.

Global Scalar Parameters with tiling values set to 0.01

You’ll now see the textures drawn on the Landscape. If the texture mapping doesn’t appear on the Landscape, double-check settings in MF_Layer_1 Material Function. Make sure the Layer_Tiling node is correctly linking to the UV of each Material type and that the Rotation Angle is also assigned to the MF_MapAdjustments Tangent Normal Rotation Angle.

Scene ready for texture painting

Select the second Layer_2 texture, the rocky ground, and paint the canyon floor to give it a different pebbled texture while leaving the canyon walls as more graded cliffs.

Playing the Level

Final result of the landscape with a sub in it

The level has a PlayerStart that creates a SubmarinePawn Blueprint instance to be controlled by the player. The SubmarinePawn instance is set up with WASD keyboard controls for going forward, left, backward and right. Camera control is via the mouse.

When you’ve completed the Landscape textures and added Assets, you’re free to explore this underwater world by running the level with the Play button.

Sub moving through the created landscape

Where to Go From Here?

You can download the completed project files by clicking Download materials at the top or bottom of the tutorial.

See more examples of the Quixel Bridge and Megascan Assets in the Unreal Engine documentation, and watch the demo for the Valley of the Ancient that showcases these Assets in a sophisticated environment.

Quixel resources describe possible texture maps provided in their Assets in online documentation.

Learn more about building Player Blueprints in the Kodeco Unreal Engine 5 Blueprints Tutorial.

We hope you enjoyed this tutorial, and if you have any questions or comments, please join the forum discussion below!


The “Submarine Low-poly” 3D model by Natali_Voitova is licensed under Creative Commons Attribution.