Unreal Engine 5: Building Worlds With Quixel Megascans
- Getting Started
- Understanding Quixel Megascans
- Navigating the Unreal Engine 5 Landscape Editor
- Landscape Mode
- Using the Scuplt Tools
- Sculpting Tools
- Using Quixel Bridge to Add Megascans
- Installing the Plugin
- Exploring the Quixel Bridge Catalogue
- Finding Textures for Your Landscape
- Finding and Adding 3D Assets
- Blending Multiple Landscape Textures
- Creating a Landscape Material
- Building the Landscape Layers
- Combining the Samples
- Material Tiling
- Duplicating the Files to Blend the Layers
- Creating a Material Instance
- Painting the Landscape
- Playing the Level
- Where to Go From Here?
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.
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.
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:
- Similarly, open MF_Layer_2, and rename each of the parameters:
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.
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.
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.
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.
Return to Landscape mode, and switch to the Paint tab.
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.
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.
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.
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
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.
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.