top of page
  • Writer's pictureLingheng Tao

UE4#3 Material Editor

This note writes about the basics about using the material editor in the Unreal Engine 4. Here I am using my models for my portfolio game Endoguardian. Specially I will also write about how to export from Substance Painter.


Basics


Actors are the basic game objects of UE4. You can place these actors from the Place Actor Panel.

In early versions this panel is called the Mode Panel.

Drag one to the viewport and you can see the geometry (the game object, the actor) in your level. It's basic information is on your right handside.

You can modify these values by dragging on them, or just input in the input fields.

Notice that if you want to make your actor as movable, select Movabl in the mobility field. Otherwise you cannot move the geometry by any means.


Now let's create a material for it. Right-click on your Content Browser. You should see a list like this:

Click on Material to create one, and you should see a material ball file in your content browser.

You can name it whatever you want.

Double click this material ball file, then you can enter the material editor.

Let's create a color by using a VectorParameter node.

Search for "VectorParameter", there should only be one node in the list. Name it as blue.

Double click on the black part of this node, and you can select the color. (The color picker panel shown on the left). Don't forget to set your A value to 1.0; otherwise you may not see any color shown in the node. Now it has the color.


Now we can pass this color into our material node, and you will see the material ball change.


Ctrl+S to save this material. Now drag the material from Content Browser to the actor you just created.

And you will see your actor appear to be a same material as the material ball.



Import Models


Now let's try to create a material for a model who has been applied materials already in other PBR-based software such as Substance Painter.


First of all, let's see what the model looks like in Substance Painter. Never mind about what the model is. The render view gives a clearer material-wise understanding of this model.

So in this model, we can see some parts are transparent, and some are not. Therefore, it is wise to create 2 materials for this model: one for transparent parts, another for the opaque parts. Alright, let's go to Maya for this.


Select the transparent parts in maya, Shift + mouse right key, and drag to the "Assign a new material..." on the list.

Then, choose the Arnold aiStandardSurface in this interface.

Then, on the Attribute Editor on your right-hand side, rename by clicking on the second white rectangle with a triangle on the right side.

Do the same thing for the opaque parts.

Now, export it as an (.obj) file.

And let's go back to UE4. Import this obj file to your content browser by whatever method you like (drag into the browser, or using the import command on the toolbar...)



Now you shall see two material spheres to be created automatically. One of them named opaque, another transparent.

Let's drag the obj into the level for convenience to see. It's almost totally black at this moment.

Now it's time to go back to Substance Painter. That's where we get some textures


Press Ctrl+Shift+E to call out the Export Texture window.

Then, go to output templates. Select Unreal Engine 4 (Packed) on the presets panel. You shall see 4 output maps.

Add a gray output map by clicking on the Gray button next to the "create:" on top of the 4 maps.

Drag the opacity on the right (input maps) to the square with "Gr" in it, choose "the Gray Channel". Rename this map as something similar to that of the Emissive. You can copy-paste the name and simply replace emissive as opacity.

Now go back to the export window, click export.

Now you should have the texture files in the directory you designated.

Import them into UE4. Now it's time to edit the material for this model!


Let's start from the opaque material.

Now, simply drag one of the texture into the material editor. For example, the one named "xxxxxxxx_BaseColor".

You should see a node automatically created as shown above. Connect the RGB pin to the Base Color pin on the material node. Similarly, do the same thing for the other textures.


Save to see the effect. It already looks good, but the transparent parts are still black.


Now let's do the same for the transparent material. Specially first of all, change the material blend mode from Opaque to Translucent, on the left "Detail" Panel. Otherwise there won't be the opacity pin on the material node.

Now let's go back to see the effect.

All right, it looks good! The remaing works is just to do some minor adjustment. For example, you might think this blue tube looks a bit "too transparent". Let's lower down it's opacity by simply multiplying the opacity by a factor. The left-bottom corner node is a "Constant" node. (Search for constant, the first will be this).

And inputting a value larger than 1 will lower down the transparency of the material, as desired.


And these are so much of the basics about the material editor of UE4.

17 views0 comments

Recent Posts

See All

Comments


bottom of page