This website uses cookies to enhance the user experience

Material Creation and Texturing

Share:

Unreal Engine boasts a robust suite of tools for creating stunning and immersive visual effects for video games and virtual reality. One of its core tools is the Material and Texturing system, which allows artists and designers to create realistic and visually complex surfaces for their game objects. This system works by applying images, called textures, to 3D models in a way that controls their visual properties like color, shininess, transparency, and more. In this chapter, we'll cover ways you can leverage the Unreal Engine's Material and Texturing system to breathe life into your game environments.

Let's start off by walking through the procedure of creating a Material. You begin by creating a new Material asset. Right-click in the content browser, navigate to Create Basic Asset > Material, and name the new Material "Mat_BatmanCape".

Once the Material has been created, you can open up the Material Editor. The Material Editor is where you'll be spending a lot of time when working on your game's materials and textures. This editor offers a node-based system for creating and modifying materials. This makes it very intuitive and user-friendly, even for beginners.

In the Material Editor, you'll find three main components: the Preview panel, the Graph panel, and the Details panel. The Preview panel provides a dynamic 3D preview of how your Material will look. The Details panel gives you a wide array of options for modifying the properties of your Material. At the heart of your Material creation process is the Graph panel where you will manipulate nodes to define your material's properties and visuals.

A Material's visual and physical properties are controlled by different inputs (like Base Color, Metallic, and Roughness), which you can manipulate through nodes. The simplest way to modify an input is to feed it a constant value. For instance, the following code will set the Base Color input to solid red:

make MaterialExpressionConstant3Vector
{
   Constant3Vector=(R=1,G=0,B=0)
   MaterialExpressionEditorX=160
   MaterialExpressionEditorY=-384
   MaterialExpressionGuid=1B6561E1465077439F8555B44F3A1F7D
   Material=Parent
}

Next, let's explore using a Texture Sample to define the base color. Right-click on the Graph panel, search for "Texture Sample", and pick a texture of your choice. Let's choose a default texture named "T_SpiderManSuit". You connect this Texture Sample node to the Base Color input of the Main Material node. Your material now uses the selected texture (T_SpiderManSuit) as the base color.

Visual effects in Materials can be created by modifying multiple inputs using mathematical operations. For instance, you can create a glowing effect by adding an Emissive Color input.

Let's create a flickering glow effect, similar to a movie projector light, by adding a sine wave to our Emissive Color. You can add the nodes as follows:

make MaterialExpressionSine
{
   Frequency=1
   MaterialExpressionEditorX=-128
   MaterialExpressionEditorY=128
   MaterialExpressionGuid=A1234567ABC890123456789ABCDEF12B
   Material=Parent
}

To modify the glow's intensity, you can multiply the sine wave by a constant using a multiplication operation:

make MaterialExpressionMultiply
{
   A=(Expression=MaterialExpressionSine'Material.Sine')
   B=10
   MaterialExpressionEditorX=-128
   MaterialExpressionEditorY=128
   MaterialExpressionGuid=BCD123456789ABC890123456789ABCDEF
   Material=Parent
}

Remember to connect the last multiplication node to the Emissive Color input.

Material Instances give you even more control over modifying Material properties in your game. Let's say that you want to create different versions of Batman's cape for different weather conditions. You create a Material Instance "MatInst_BatmanCape_Rainy" from "Mat_BatmanCape" and adjust its properties in the Details panel.

Remember, the node-based Material Editor is designed to be intuitive, so don't be afraid to play around with nodes and connections. Not all connections make sense, but you can always disconnect nodes and try new things.

This is just the tip of the iceberg when it comes to materials and textures in Unreal Engine. The next steps can include blending multiple textures, creating animated materials, and understanding complex material inputs. Material creation and manipulation is a true art form within game design, and you're now equipped to dive deeper. So, go ahead and create your own materials and textures and let your creative instincts flow!

0 Comment


Sign up or Log in to leave a comment


Recent job openings