-
Notifications
You must be signed in to change notification settings - Fork 5
Matl Editor
The Matl Editor edits the data stored in .numatb files like model.numatb. The model.numatb contains materials that assign textures and control other visual parameters of a mesh. Additional .numatb files can also be edited like metamon_model.numatb, but these files can usually be left as is.
The numatb file is split into multiple material entries. The left panel selects a material to display its values in the right panel. Delete entries by right clicking the material and clicking "Delete". Add new entries by clicking Material > Add New Material. Reorder entries by dragging and dropping the handles to the new location in the list.
Each entry is identified by its material label, which can be edited in the right panel. The material labels should match up with entries in the model.numdlb in the Modl Editor. When editing material labels, make sure to save both the numatb and numdlb file.
The right panel edits the values for the selected material and is broken down into different sections. For a brief description of what each parameter does, see material parameters.
Checking advanced settings allows for manually editing texture paths rather than selecting one of the loaded nutexb files or known default textures.
SSBH Editor ships with a number of preset materials. These materials can be applied to the current material by clicking Material > Apply Preset. This overrides all the current material's settings except the material label. Presets can be edited using the material preset editor or by editing the presets.json
file manually in a text editor. Check the application log on startup for any formatting errors when manually editing the JSON file.
The shader label determines what material parameters and mesh attributes are required to render a material. Copy the shader label from the source material to the clipboard and paste it on the shader label of the target material. This will likely result in the current material parameters not matching up with the new shader. Click the buttons that pop up to add any missing parameters and remove parameters that aren't used by the shader. SSBH Editor will try to fill in reasonable defaults that won't drastically change the model's appearance for the new parameters. Added textures will typically need to be assigned after changing the shader.
Materials and meshes need to match up with the assigned shader's requirements to avoid issues in game. If a required input is missing, the game won't be able to render the mesh. If the shader label in the material doesn't correspond to a supported shader in game, SSBH Editor will render the material with the in game red checkerboard. Copy the shader label from an existing material in game and ensure that the render pass is correct.
Another common error is if the mesh is missing some vertex attributes required by the shader. Missing vertex attributes result in a yellow checkerboard error in SSBH Editor and in game. This error can be fixed by using a different shader or adding the required attributes to the model.numshb in the Mesh Editor.
SSBH Editor provides the option to edit all vector parameters as RGBA colors for convenience. Not all vector parameters are actually treated as colors in game like CustomVector47 that functions as PRM texture values. Vector color parameters like CustomVector13 for diffuse color are stored as floating point values in the numatb like (1.0, 1.0, 1.0, 1.0). These float values are read directly by the shaders in game without any gamma correction applied.
The color picker widget shows the color as either RGB integers or floating point values. The RGB values in the color picker use sRGB gamma like most colors and images on the web. The floating point values in the color picker are linear. If unsure, please refer to the floating point values in the Matl Editor itself as these are the values that will be written to the .numatb file and used in game.