Ue4 Remove Material Slots

by admin

Creating, setting up, and tweaking standard Materials can be a very time-consuming process in Unreal Engine 4. To help speed up and streamline this process, UE4 offers a special type of Material called a Material Instance. In the following How-To, you will learn to set up and use Material Instances in your projects.

  1. Ue4 Remove Material Slots Games

Material Instancing

Exposing an External Slot for User Created Widgets with a Named Slot. Unreal Engine 4 Documentation Engine Features UMG UI Designer UMG UI Designer User Guide Widget Type Reference Named Slot. Double click on the mesh itself in content browser and you should be in the static mesh editor, look at the material slots section and press the X-button on the right side of the slot name.

Material Instancing is a way to create a parent Material, that can then be used as a base to make a wide variety of different-looking child Materials. To achieve this flexibility Material Instancing uses a concept called inheritance: the properties of the parent are given to its children. Here is an example of Material inheritance in action.

Ue4 remove material slots list

Click for full image.

Step

Description

Material Palette you can find all of the Parameter Nodes that are available. You can then drag and drop these nodes from the Palette to the Material Graph.

Converting a Node

When inside of the Material Graph, you can right-click on a node and the choose the Convert To Parameter option:

You cannot do this for every Material node. If you see the Convert To Parameter option when you right-click on a node, then that node can be converted into a Parameter Node.

Creating a Material Instance

Ue4 Remove Material Slots

We will now create a Material Instance using the methods mentioned above.

Ue4 remove material slots download
  1. We need to create a new Material to work with. Right-click in the Content Browser, then select Create Basic Assets >Material.

  2. Name the new material Material_Master.

  3. Locate it in the Content Browser, then double-click it to open it in the Material Graph. Once opened, search for the following Material Expression nodes in the Palette and add them to the Material Graph.

    • Constant 3 Vector

    • Constant Node

    • Scalar Parameter

  4. Now that the Material Expression nodes have been placed, wire them up to the their respective pins in the main Material Node. For this example, we will be using the following pins.

    • Base Color

    • Metallic

    • Roughness

  5. Once everything has been hooked up, it is now time to convert some of the Material nodes into Parameter nodes so that they can be used in Material Instances . To do this, right-click on the Material node that you want to convert to display the context menu, then select Convert to Parameter.

  6. Now that we have our nodes converted to Parameter nodes, we can label them so that when we use them in a Material Instance, we will know what each node does. To give a Parameter node a name, select the Parameter node in the Material Graph, and under the Parameter Name section, type in the name that you want to use. For this example, we will be using the following names:

    • Base Color

    • Metallic

    • Roughness

    Make sure that the name that you pick for your node matches very closely to what the node actually does. This way you do not have to keep going back and forth between the Material and Material Instance to see what the node actually does.

  7. Compile your Material by pressing the Apply button. If compiled correctly, the button should be grayed out.

  8. Now that the Material has been compiled, make a Material Instance. In the Content Browser, right-click on the Material, then select Create Material Instance.

    Your Material Instance will derive its name from the Material that you are using to create it. You can rename the Material Instance during creation or by selecting the Material and pressing F2 on the keyboard, then entering the new name.

  9. In the Content Browser, double-click the newly created Material Instance to open it. You should see something that looks like this.

  10. Once you have the Material Instance Editor open, you can start to adjust parameters. To adjust a parameter, you need to enable it by clicking on the box that is to the left of the parameter name to enable it. Once a parameter has been enabled, its name will no longer be grayed out and a check mark will be placed in the box to the left of the name.

  11. Now that the parameters have been enabled, you can adjust any of them and see the results in real time, without having to recompile the Material.

The names that you set for parameters inside of the Material reflect the names that you see in your Material Instance. This is why it is important to pick names that correspond to what the parameter actually does.

Material Instances in Action

The full power of the Material Instance system becomes clear when you need to have many Materials that look different but still have similar controls, or if you need to control a Material in a specific way during gameplay. In the following example, we will make three different instanced Materials that are based on the parent Material that was created in the previous steps. We will show how changes to the parent Material will affect the child Materials.

  1. We need to make some more Material Instances using the Material_Master Material that was created above as the parent Material. In the Content Browser, right-click the Material_Master Material, then select Create New Material Instance. Do this two more times until you have a total of three Material Instances.

  2. Open the three additional Material Instances and begin adjusting their parameters. To open a Material Instance, double-click it in the Content Browser. You can now set the Color, Roughness, and Metallic values. For this example, we are using Red, Green, and Blue as the colors. You can see all of the values used for this example in the following image.

    Click for full image.

  3. We can now apply our Material Instances to objects. Let us apply the Material Instances to some basic meshes that can be found in the Shapes folder of the Starter Content.

    Click for full image.

  4. Open Master_Material in the Material Graph. Select one of the Scalar Parameter Nodes and duplicate it by pressing CRTL + W. Now that the node has been duplicated, rename it to Specular and set the default value to 0.5. Connect the output of the Scalar Parameter node to the Specular input pin and then compile the Material.

    Click for full image.

  5. Once the Material has been compiled, you can exit Master_Material and then open the Red Material Instance. Once opened, notice how there is now a new input for Specular. Check the Blue and Green Material Instances. Note how they both have new inputs for Specular. This is where the real power of the Material Instance lies: Changes that you make to the parent Material will always be propagated to their children.

    Click for full image.

Changing the Parent Material of a Material Instance

You can quickly change the Material that is used as a parent Material of a Material Instance by setting a new parent in the Material Instance Editor. Open the Material Instance In the Details panel, under the General section, change the Material in the Parent property. Depending on the options of the new Material, the Material Instance Editor will change to reflect the options of that new Parent Material. The following image shows is a Material Instance that was created using the parent Material shown in the Parent property.

Here is that same Material Instance, but this time with a different parent Material. Notice how there are fewer Texture inputs and some new numeric inputs have been added.

Conclusion

Material Instancing is a powerful tool that can be used across all aspects of your project. From helping to add some variation to weapons and props, to helping artists make better use of available Materials, Material Instances can help to streamline and unify how Materials are created and used in your project.

Ue4 Remove Material Slots Games

Hi Steel. I've faced the same issue a while ago. The point is you can not change material slots in UE4. Unreal creates multiple material slots when you import different meshes as a combined one. The engine literally puts all your materials out of each mesh and then assignes it to your combined model.

I solved this issue by importing each model individually and placing them manually in the world.

There is a function in Blender (and in other 3D software I believe) which allows you to share materal data with multiple meshes and eventually to set up materials across all your models. But I didn't try it, don't know how it works after importing to Unreal.

answered May 21 '18 at 12:06 PM

script526
11136

add new comment(comments are locked)