Skip to main content

Material Editor

Overview

The Material Editor is used to edit materials and modify the static mesh and the surface material properties of the skeletal mesh to achieve expected visual effects.

Material Editor Properties

In the Flexi Editor, click File -> Open Project, then click Browse in My Projects panel. In the pop-up Select Project File window, select test_project under 02_demo, then select flexi.projectinfo and click OK. After that, double-click new_animation_demo under My Levels to open the scene.

image-20230314173505322

Press the shortcut key M to open the Material Editor.

image-20221202104238582

At the top of the Material Editor is the Tool Bar.

image-20221128155305529

Frequently used buttons:

No.ButtonDescription
1AbsorbGet the material information of the selected model in the scene.
2RestoreThe previous modification can be undone with the Restore button before it is saved.
3SaveSave the modification to the material file.

Click the Absorb button on the Tool Bar and select the model to be viewed in the Level panel. Here we select the armor area of this character.

image-20221128160520419

image-20230314173518184

The material information of the selected model will now be displayed in the Material Editor.

image-20230314173526826

PropertyDescription
ModelDisplay the model path. In the case of multiple models, select the model to be viewed in the drop-down list.
Material ListDisplay all the material info of the current model. Select a material in the Material List to see the parameters of this material.
Material FilePath of the material file.
Animation FileMaterial animations simulate material property changes, which are mainly used to create special effects.
Material SelectIncluding settings of Material Name and Shader.
Basic MaterialBlend Type, color of Ambient and Diffuse, Transparency, Alpha Reference, whether to Flip Normal, whether to enable Z-Write Off, and whether to disable Light, etc. can be set in Basic Material.
Diffuse MapDiffuse map.
RoughnessUsed to store Metallic, Roughness and Specular Intensity info of objects.
Normal MapNormal map, which simulates bump effects on the plane in order to save model resources.
Other PropertyProperties of specific functions.

Material Select Settings

Material Select includes settings of Material Name and Shader. Material Name displays the name of the current material. If there are multiple materials, click the image-20221128161101904 button on the right of Material Name to switch to the required material in the drop-down list.

image-20221202105802444

Shader displays the shader template name of the current material. Hold down the Ctrl key and click the image-20221128161316783 button to add or delete parameter options in the pop-up Material Template Edit window.

image-20221202105202306

Viewing Model Materials

There are two ways to view model materials.

  1. Press the shortcut key M to open the Material Editor, then click the Absorb button on the Tool Bar, and select the model in the scene (refer to the method described earlier in section Material Editor Properties). Or select the model in the scene first, and then press the shortcut key M to open the Material Editor.
  2. In Flexi, find the required model file in the Project panel.

image-20230314173540854

Double-click the file to open the Material Editing Window. In the Material panel of Model, you can see the material information of this model.

image-20230314173546519

Importing Models and Setting Materials

Importing Models

Drag the FBX model file to be imported into the Resource Preview Window. Here we use the mat_test.fbx file as an example. Set the import parameters in the pop-up FBX Import Options window, and then click the Import button to finish the process.

image-20221129165811410

image-20221129165804155

image-20221129170245665

After the import is completed, an XMOD file with the same name will be generated in the Resource Preview window.

image-20221129170813380

Setting Materials

Double-click the XMOD file to open the Material Editing window, select Mat_2 in Material Name, then click the image-20221128161128011 button on the right of Shader and select the required Shader template. Here we select Standard.

image-20221202112030568

image-20221202111910641

Under Basic Material, click the Color Bar on the right of Ambient and select the required color in the pop-up Color Picker window. Set the Diffuse color in the same way. Here we select white for both Ambient and Diffuse.

image-20221202112309732

image-20221202112515534

After that, set Diffuse Map, Roughness and Normal Map respectively.

image-20221129172148530

Three map properties:

  1. Diffuse Map

    PropertyDescription
    Diffuse MapDiffuse map.
    Diffuse Map GlossinessWhether the diffuse Alpha channel contains glossiness.
    Diffuse Map IntensityDiffuse map intensity.
    Sample PointWhether the sampling mode of the map uses point sampling mode.
  2. Roughness

    PropertyDescription
    MetallicMetallic.
    Specular IntensitySpecular intensity.
    RoughnessRoughness.
    Enable AOWhether to enable AO data in the material.
    Mix MapMix map (3 or 4 channels: Metallic, Roughness, Specular Intensity and AO).
  3. Normal Map

    PropertyDescription
    Normal IntensityNormal intensity.
    Normal MapNormal map.

There are two ways to apply a map.

  1. Find the required map in the Resource Preview window and drag it into the corresponding slot in the Material Editor.

image-20221130141113470

Or enter the map path into the box on the right of the corresponding slot to apply the map.

image-20221130141936395

  1. Click the image-20221129175916854 button on the right of each slot to find the required map.

image-20221130142438527

image-20221202110214434

After applying maps, click the Save button on the Tool Bar to complete the material settings. The effect after setting is shown below:

image-20221202112917484

Creating and Editing Material Files

Creating Material Files

In some cases during the game production process, the producer wants to create external materials that can be applied to different models. Right-click on a blank space in the Resource Preview window and select Material in the pop-up menu to create a Material file.

image-20221128171434560

Editing Material Files

You can rename the newly created material file, modify the material name and parameters as needed.

Right-click the newly created material file and select Rename in the pop-up menu to rename the file. Here we change the file name to wall_material.

image-20221129111607681

image-20221129111936678

Double-click wall_material.mtl to open the Material Editor. Right-click the material ball to be renamed in the Material List and select Rename. Enter the new name in the pop-up Rename window and click the OK button.

image-20230321132807112

After renaming:

image-20230321132547126

Modify the Diffuse property under Basic Material as described in the previous section Setting Materials. Here we select blue. When finished, click the Save button.

image-20230321153752710

Creating, Deleting and Copying Materials

Creating Materials

Double-click the material file to open the Material Editor, right-click on the blank space of the Material List, and select Create Material in the pop-up menu.

image-20221128172907014

The newly created material will be placed at the end of the material list, which is shown below:

image-20221128171954316

Deleting Materials

In the Material List, right-click the material to be deleted and select Delete Material in the pop-up menu.

image-20230321131124452

Copying Materials

Overrides the data from one material to another. This is performed in two steps.

  1. Right-click the material to be copied in the Material List, then select Copy Material to copy the selected material in the pop-up menu.

  2. Right-click the material to be overridden in the Material List and select Paste to override the current material.

image-20230321112458616

image-20230321130825204

After copying successfully, the effect is as shown below:

image-20230321130834840

Using Material Files

Material files can be used in two ways:

  1. Public Materials: Apply the material file to the XMOD file, which will affect all instances of the model in the scene.

  2. Private Materials: Apply the material file to a specific model instance in the scene, which will not affect other model instances in the scene.

The following describes the two ways to use materials separately.

Public Materials

  1. In the Hierarchy panel of animation_demo, you can see two objects named back_ground_mesh. Click to select one of them.

image-20221128174931361

  1. Press the shortcut key M to bring up the Material Editor, then drag wall_material from the Resource Preview window to the input box on the right of Material File and click the Save button.

image-20221202125956074

Now both walls in the scene will change to the color of the new material.

image-20221202120925716

Private Materials

  1. Create a new material named special_wall using the method described in the Creating and Editing Material Files section. Then set the Diffuse property to orange and save it.

    image-20221202122350891

    image-20221202130434693

  2. Select the back_ground_mesh that needs to be set as a private material in the Hierarchy panel, and select StaticMenshComponent0(Inherited) in the Inspector panel. In Visual Base, click File -> Private Materials, and drag special_wall into the slot on the right of Material File.

    image-20230321153218594

Now you can see that in the scene, the color of the instance applying special_wall has changed, and the other instance remains the same color as before.

image-20221202121009927