1. Introduction to Material Editing
Material editing controls how the surface of a model responds to light. Tints, highlights, reflections, and overall color are all affected by material editing. If your model has "lighting problems," this is not lighting but actually improper material settings. In addition, some material settings may introduce unwanted color tints to your model.
The above renders in Blender Cycles illustrate the four main contributions to the shading of a model: diffuse, specular, reflections, and fresnel. Diffuse is usually a texture and controls the color of the model. The diffuse color of the hair for characters such as Corrin and Bayonetta is set by material data, however. Specular is the bright highlights on a model. Reflection color in the game uses cubemaps to mimic smooth, metallic reflections. Fresnel is present for most models and lights the edges of the model to make it stand out more from the background.
1.1. RGB Values vs Floating PointThere are two ways to express color information. Depending on the application the RGB values will be integer values from 0-255 or floating point values from 0.0-1.0. Values can be higher than 255 or 1.0, but they should never be negative. Forge uses floating point for all material values. To convert to standard RGB values, multiply by 255. Negative values will cause your model to glow or have other strange errors and are not a convenient way to make the model darker.
1.2. Color ValuesMany of the material values are RGB colors. The first three values of NU_specularColor, for example, correspond to the amount of red, green, and blue, respectively. I mark color values with red, green, and blue text. The fourth value of color values controls the amount of color blending. Color blending tints fresnel, reflection, and specular color to match the diffuse map color. This is most important for textured metal models. A value of 1 for the color blend is a good place to start.
1.3. Param ValuesMaterial parameters (shortened to param) control the properties of the material. These values are constants used in the shader calculations. You won't usually have to edit these values. Not is much is known about params compared to other values, such as specular color.
2. Editing Material Values in Smash Forge
2.1. Smash Forge WikiYou can find a WIP wiki for Smash Forge on the Github page. The wiki will cover the basics of using the program. This guide contains more in depth explanations of how the material properties themselves work.
2.2. Determining What Polygons to Edit
Smash Forge is the easiest and most stable way to edit materials. When you select a model in Forge in the mesh list, the model will have a highlighted outline. This makes it very easy to determine what model's materials you are editing.
3. Material Properties
Different materials have different properties, such as ambient occlusion or specular highlights. You can edit the parameters to control these values. Parameters always begin with "NU_". I cover all of the most important/common values you will need to edit below. The above image shows how all the different material properties combine to create the final appearance of the model. The colors values are all added together, which creates the array of colors in this metallic Rosalina render.
3.1. Diffuse Color
3.1.1. NU_diffuseColor,R,G,B ,Alpha
NU_diffuseColor is one of the more straightforward values and is usually only used for stages. Character model.nuds created with the NUDCreate scripts use this value in the materials. For characters, you're better off using a material preset. NU_diffuseColor is useful for controlling the intensity of the diffuse color for stage materials. Higher values make the model brighter. A value of 0 makes the diffuse completely black. Using different values for red, green, and blue will tint the color of the model.
Color gain is a multiplier for the diffuse map color. For example, a value of 1,1,1 for color gain will add the full brightness of the diffuse map color. A value of 0.5, 0.5, 0.5 will add half the diffuse map brightness. Set color gain to whatever color you want the diffuse color to be. For Bayonneta's hair materials, NU_colorGain acts as a color multiplier for the specular color due to the lack of NU_specularColor or NU_specularColorGain. The flags must be one of the following for color gain to work. The "--" can be anything. FC42--61, FC44--61, 9C61--61. I cover material flags in Part II of this guide.
3.1.3. NU_colorOffset, R,G,BThe color offset value is added to the results of color gain. With Corrin’s hair, for example. Set NU_colorOffset to the overall color you want for the hair. Color offset should be a value between 0-255 for R,G, and B. Try to avoid 255,255,255 when creating white and 0,0,0 when creating black, as these values are too extreme. Color offset is used mainly in combination with color gain to change the contrast of the diffuse map, similar to AOMinGain. The flags must be one of the following for color offset to work. The "--" can be anything. FC42--61, FC44--61, 9C61--61. I cover material flags in Part II of this guide.
3.1.4. NU_softLightingParams, Ambient Saturation, Darken Ambient, Smooth Amount, Param4NU_softLightingParams is usually used with byte2 of 81, which makes the model brighter. Param1 increases the saturation of the ambient color. A value of 0 is no effect, and values greater than 0 make the ambient color more saturated. The second param darkens the ambient color. A value of 0 does not darken the ambient color. The third param controls the smoothness of the transition between the ambient and diffuse color. A value of 0 creates a sharp transition, similar to cel shading. Values greater than 0 create a softer look.
3.1.5. NU_customSoftLightParams, Ambient Saturation, Darken Ambient, Smooth Amount, Param4Functions almost identically to NU_softLightingParams. These parameters are only used for Cloud's fighter model, so use NU_softLightingParams instead.
3.2. Ambient Occlusion
3.2.1. NU_AOMinGain, R,G,B ,Mix Factor
The "AO" in "AOMinGain" stands for ambient occlusion. AOMinGain is usually responsible for color tints when recoloring default models. You can read more about ambient occlusion maps in Smash 4 in another tutorial.
The diffuse map is multiplied by the ambient occlusion map. The RGB values of AOMinGain are added to the ambient occlusion map color. When AOMinGain is set to 0, the diffuse map will be fully multiplied by the AO map. If you want the AO map to have less of a darkening effect, make the AOMinGain color brighter. When the R,G, and B values are equal, the hue and saturation of the model will be unaffected. The AOmap will never be brighter than pure white (1.0 in float or 255 in RGB).
The mix factor controls the amount of AO blending for specular and reflection. The specular highlights and cubemap reflections are multiplied by the ambient occlusion map to add extra detail and prevent lighting shadowed areas. The mix factor is how much the AO map is blended with white before being multiplied with the specular and reflections. A value of 1 means the AO map has no effect on fresnel, specular, etc; a value of 0 is full blending. Note that this value will not affect diffuse.
3.3. FresnelMany surfaces appear more reflective when viewed at a nearly parallel angle. For example, if you look down into a pool of water, the water is clear. When you look at a water in the distance, the water appears less clear and reflects the sky. In terms of models in Smash 4, fresnel reflections brighten the edges of the model to make the model stand out from the background. This is a "rim light" effect rather than actual fresnel reflections.
3.3.1. NU_fresnelColor, R,G,B,color blend
Fresnel color, as the name implies, determines the color and brightness of the fresnel contribution. The value is added to the base color, so a brightness of zero will create no fresnel reflections. Values of a different hue than the base color will create hue shifts. For example, a yellow fresnel color on a red model will make the edges of the model appear orange. If the fresnel color is 0, the model will appear flat. If the fresnel color is too high, this will trigger bloom and make the edges of the model glow.
The first value of NU_fresnelParams controls the steepness of the fresnel effect. Higher values create a tighter "rim light" around the edges of the model. Values tend to range between 0 and 5.0 (1275 in RGB). The above rendered image shows the effect of increasing the exponent of NU_fresnelParams .
3.4. Specular HighlightsSpecular color simulates the highlights that appear on shiny surfaces. Materials such as metals and hair have strong specular highlights. The intensity of the specular reflection is based on the angle of the light and also the viewing angle.
3.4.1. NU_specularColor, R,G,B,color blend
The specular color affects the color of the bright highlights on the model. The value is added to the color below, so the resulting color will always be brighter and may shift the hue/saturation. The brighter the value, the more of the color will be added to the base color. If you make the value too low, the model will appear “flat”. If you make the value too high, the model will have blown out highlights and appear to glow. In the rendered comparison, you can see how the specular color becomes more saturated as the alpha value increases.
3.4.2. NU_specularColorGain, R,G,BThe specular color is multiplied by NU_specularColorGain. This value is only used for models colored by NU_colorGain and NU_colorOffset. The flags must be one of the following for specular color gain to work. The "--" can be anything. FC42--61, FC44--61, 9C61--61. I cover material flags in Part II of this guide.
3.4.3. NU_reflectionParams,Cubemap Intensity,Param2,Anisotropic Width,Anisotropic Height
NU_reflectionParams can be used as an alternative to NU_specularParams for controlling the specular falloff. Params 3 and 4 control the width and height of the highlight, respectively. This effect is known as anisotropy (non symmetrical highlights) and can be observed in hair, brushed metal, and some fabrics. The effect is difficult to describe, but the effect can easily be seen with Forge's material lighting. Use values between 0 and 1. Values can be as small as 0.01 and still have a noticeable impact in game. For most cases, use mats with specularParams instead.
The second param of NU_specularParams controls the exponent of the specular highlight. A higher value results in a steeper falloff, so the specular will be smaller and more focused. A lower value results in a shallower falloff. Values are often very high for shiny surfaces, so you may see values as high as 80.0 (20400 in RGB).
3.5. Cubemap Reflections
Specular and fresnel reflections are good approximations for how a surface reflects light, but they don't accurately simulate glossy reflections. The smooth, highly reflective surfaces of mirrors, glass, metal, etc look "shiny" because they reflect the objects in their environment.
3.5.1. NU_reflectionColor, R,G,B,color blend
NU_reflectionColor controls the intensity and color of the cubemap reflections. A higher value results in a brighter reflection color. Keep in mind that reflections will be most apparent with a dark diffuse map (color texture). Chrome, for example, is nearly black but has very intense reflections. Metal models use a value of 3.0 in float (765 in RGB) for the red, green, and blue value.
3.5.2. Stage Cube Maps
Cube maps simulate the environment of a stage by mapping textures to six images, representing the six faces of a cube. The cube map texture is multiplied by NU_reflectionColor to calculate the final reflection color. Each stage is different, so materials using reflections will appear vary drastically in appearance on different stages.
3.6. Miscellaneous Material PropertiesThese material properties don't fit well into any of the above categories. These values are more situational, so only use them if you have a specific effect that can't be done with traditional values.
3.6.1. NU_angleFadeParams,Blend Amount at 0 Degrees,Blend Amount at 90 Degrees, Param3, Param4NU_angleFadeParams is used for Olimar's helmet and the background for some trophy models. Higher values decrease the opacity. The first value controls the intensity of the fade when the angle between the camera and the normal is 0 (should be center of the model). The second value controls the fade at grazing angles (should be the edge of the model). The values smoothly transition as the angle between the camera and the normal changes, similar to fresnel.
3.6.2. NU_zOffset,zOffset,Param2,Param3,Param4The first param is used to offset the object's depth. This allows you to change the order that objects are rendered. This value is used heavily for trophies, so it's uses for regular mods are few.
3.6.3. NU_normalParams,Normal Map Intensity,Param2,UV Distortion IntensityNU_normalParams is used mainly for stage materials. The first param controls the intensity of normal maps. 0 means that normal maps have no effect, 1 is full effect, and values greater than 1 increase the effect. The third param controls a UV distortion effect similar to du dv maps. A value of 0 has no effect. Values greater than 0 shift the UV coordinates based on the normal map directions.
3.6.4. NU_alphaBlendParams,Alpha Offset,Param2,Param3,Specular IntensityThe first value is added to the alpha value. A value of 1 disables alpha blending. The other params control hair shading effects for Bayonetta and are still being researched. The fourth param controls the specular intensity for Bayonetta's hair.
3.6.5. NU_effColorGain,R,G,B,AlphaA color multiplier used for effect materials. Effect materials start with a "B" for the material type in the flags. The final RGBA values are multiplied by NU_effColorGain.
3.6.6. NU_finalColorGain,R,G,B,AlphaA color multiplier used for regular materials. The final RGBA values are multiplied by NU_finalColorGain. Ganondorf's chest uses this value. It functions similar to NU_diffuseColor, but it is used for character materials.
3.6.7. NU_effUniverseParam,U ScaleOnly the first param is used, which controls the horizontal scale of the projection texture. The texture is projected from the camera onto the model rather than using UVs. Values greater than 1 will cause the texture to repeat more times horizontally.
4. Metal Mods
The process for creating metal mods is similar to material editing for regular models. There are a few limitations, however. The metal materials apply to the entire model, and the diffuse texture is best left at the default dark grey.
4.1. Creating the metal modelDefault Characters
The default characters will already have a metal.nud you can edit in Forge. The process for using a metal box model of a character as the default model is simple. Rename the "metal.nud" to "model.nud". The main model is now replaced by the metal one.
In Smash Forge, you can right click the Model 0 and select "Make Metal" to override all the materials with the metal box material. You will have to fix the Tex ID's in the texture tab of the material editor after doing this. Now you can right click Model 0 and save as "metal.nud."
4.2. Material Editing Metallic ColorsMetal recolors are in some ways much simpler than normal material editing. The three main values to edit are reflectionColor, aoMinGain, and fresnelColor.
4.2.1. NU_AOMinGain, R,G,B,Mix FactorAmbient occlusion can be colored to change the base color of the model. This should usually be dark so the reflections stand out. Typically, you only need to change the hue/saturation for this value.
4.2.2. NU_reflectionColor, R,G,B,color blendThe reflection color affects the color and intensity of the glossy reflections that give the model its distinctive metallic sheen. Metals are very reflective, so the values should be very high. The only exception would be very dark metallic objects, such as black chrome, which would require a lower value.
4.2.3. NU_fresnelColor, R,G,B,color blendFresnelColor works the same as normal, affecting the color and intensity of the rim lighting effect. Typically, the fresnel color will be identical to the reflection color. The effect of fresnel color is more subtle, so it isn't as important as reflection color.
5. Effect of Stage LightingStage lighting can have a big impact on the way a model appears in game. Different stages have different intensities and color tints for diffuse, fresnel, specular, and reflections. Each stage also has a unique cubemap, so metal materials will look vastly different on different stages. Keep this in mind when editing materials and use a neutrally colored stage for testing mods. In the following examples, Cosmic Spirit Rosalina will show the effects of color tints, and the metallic sphere will show the different cubemaps.
5.1. Neutral Lighting
Stages with neutral lighting are ideal for testing mods. You can preview the effects of material/texture edits without significant color shifts from the stage lighting. Good examples are Miiverse and Wii Fit Studio. Keep in mind that whites that look fine on other stages may appear too bright on stages like Miiverse. Forge's Material lighting uses a desaturated cubemap from Miiverse.
Dark stages still have fresnel, specular, and reflection, but the intensity is quite low. Final Destination for example, is quite dark. Make sure your mod is not so dark that the detail is barely visible on darker stages.
Many of the stages in Smash 4 have bright lighting, mimicking daylight. The intensities are quite high. Color tints are present but usually very subtle. The above example is from Hyrule Temple.
Halberd's lighting is darker than most stages. Fresnel is not present, so models with fresnelColor will appear very "flat".
Stages set at sunset or filled with lava have bright, warm lighting. Cosmic Spirit Rosalina has cyan fresnel, so the warm color tint of Bridge of Eldin makes the model appear green. I don't recommend testing your mods or taking all of your screenshots on these stages due to the strong color tints.
5.6. Space & Intense Fresnel
Certain stages have very high intensities for fresnel. Mario Galaxy, for example, causes Cosmic Spirit Rosalina to have a very bright cyan glow. The effect is less pronounced on most characters, but keep this in mind when getting screenshots from these stages. Most of the outer space stages and some regular stages have similar lighting but not as intense as Mario Galaxy.