Documentation Home

Materials: Material Types: SC2 Standard

SC2 Standard is the primary material for art assets in the StarCraft II Engine. The vast majority of assets will only need this material type. The material is organized into several layers which are managed by the various shader presets. Using presets reduces the strain on the GPU, and provides predictable results across different graphics settings. SC2 Bitmap or SC2 Color texmaps can be used in all layer slots.

Material Basic Parameters

  1. Preset

    • Specular is the most common setting for environmental models and characters. It provides the simplest, fastest drawing set of layers:

      • Diffuse, Normal, Height, Decal, Specular, Gloss, Emissive, Light Map, Ambient Occ
    • Emissive

      • Diffuse, Normal, Height, Decal, Specular, Gloss, Emissive, Emissive 2, Light Map, Ambient Occ
    • Environment

      • Diffuse, Normal, Height, Decal, Specular, Gloss, Emissive, Environment, Envio Mask, Light Map, Ambient Occ
    • Mask is the most common setting for materials used on SC2 Particle and SC2 Projector nodes. It provides two alpha mask textures that can be used to define transparency.

      • Diffuse, Normal, Height, Decal, Specular, Gloss, Emissive, Alpha Mask, Alpha Mask, Light Map, Ambient Occ
  2. Blend Mode

    • Opaque draws any pixel with an alpha value above Alpha Threshold completely to the screen. These pixels will affect depth based effects such as depth of field, and will have per-pixel sorting.

    • Add renders this material additively onto the scene. This is most often used for fire, energy, and other sorts of bright particle effects.

    • Mod multiplies the material's color against the current color on screen. This will usually yield a darkening effect.

    • Mod2x multiplies the material's color against the current color on screen, and doubles the result. For value darker than 128-grey, this will yield darkening, while brighter values will cause an increase in brightness. This is most often used with special particle effects where additive effects are desired but color saturation is important.

    • Blend uses the resultant alpha values to perform a linear blend of this material onto the scene. Alpha sorting is done on a per-model basis, and there may be sorting issues with this mode. This setting is most often used with smokey particle effects.

  3. Alpha Test Threshold sets the minimum output alpha value for this material, such that it will still draw. If the alpha maps, combined with any external alpha, like particle alpha, or vertex alpha is below this threshold, the pixel will not draw. This will exclude the pixel from all drawing, including shadows.

  4. Priority defines the sorting relationship between this material and other transparent materials in the model file. Within a given model, materials are drawn in order from highest priority value to lowest. Sorting for materials of equal priority is undefined. Priorities have no effect across multiple models.

  5. Depth Blend Falloff extends the distance over which particle effects fade out when they get close to a solid object. To reduce visual clipping artifacts, particle effects in StarCraft II fade out as they get close to another surface. Increasing this value causes the blend to happen over a wider range. Disable Soft (Depth Blend) can bypass this effect when no depth blend is desired.

  6. Hit Test allows the polygons with this material to be used for fine grained per-pixel hit testing. If a polygon does not seem like a physical part of a model, it may be appropriate to turn off this flag.

  7. 2-Sided turns off face culling on the GPU for this material. The back-facing side will show up, but the lighting will be the same as the front-face.

  8. Double Lambert causes the material to use a harsher lighting gradient. Terrain in StarCraft II uses this setting, so for a doodad to blend seamlessly to the terrain, this setting may be necessary.

  9. Unlit turns off shading on this material. The diffuse texture will show through full-bright, and specular will not be calculated.

  10. Accept Splats enlists polygons that use this material for use by SC2 Projector nodes. Projectors, also known as 'splats', will show up on materials with this flag.

  11. Only (Accept Splats) causes the material to not draw, and only be used in splat generation. Splats can sometimes be processor intensive on complex meshes, or the mesh itself may be unsuitable for receiving splats. This option can be used to generate custom splat-only geometry in those cases.

  12. No Fog causes the height based fog on the map to not affect meshes that use this material.

  13. Use Vertex Color multiplies vertex color applied to the mesh vertices against the final output color of the material, tinting towards the defined color.

  14. Use Vertex Alpha multiplies the vertex alpha applied to the mesh vertices against the final output alpha of the material, making the surface more transparent. An export warning will be emitted, and vertex alpha will not be exported unless a vertex color is also defined, though it need not be used by the material.

  15. Export Vertex RGBA exports the vertex color attributes of the mesh, even if the assigned material does not use it. This is useful for cliff meshes where the tileset material may need to use Vertex Alpha for blending. This is also useful for Meshes used as emitters for SC2 Particle nodes, where the Red vertex color channel regulates emission probability.

  16. Receive Shadows causes shadows to show up on this material. This is often disabled for gameplay elements like beacons or additive particle effects.

  17. Disable Soft (Depth Blend) opts out of the softening depth blend for materials that would otherwise use them, like particle effects. For adjusting this effect, rather than disabling it entirely, use Depth Blend Falloff

  18. Specular Highlights selects one of many presets for the size of bright highlights caused by reflected light on the material. This effect is colored by the Specular texture slot. The value of the preset is shown in Exponent (Specular Highlights). If this value is set to Custom the Exponent field can be manually edited.

  19. Exponent (Specular Highlights) either shows the current value of the Specular Highlights preset as a diagnostic, or allows for direct manipulation of the value.

Passes

  1. Draw Geometry causes the geometry to be drawn in the main scene pass. If this flag is not checked, then it will be drawn normally. This is used at times in StarCraft II for defining mesh emitters for SC2 Particle nodes, or creating shadow-casting-only geometry.

  2. Z Fill Pass causes the geometry to be drawn in a special pass that happens after Opaque objects are drawn, but before transparencies. This writes to the depth buffer without writing color, and will cull any transparencies behind it. This can make a complex transparent mesh appear more "solid".

  3. Cast Shadows writes all pixels of the material with an output alpha value higher than Alpha Test Threshold to the shadow buffer. These shadows will appear on all materials marked to Receive Shadows.

  4. Transparent Shadows writes the output of this material to the translucent shadows buffer. This tints the color of shadows cast by this material. This is only enabled on Ultra settings and above. The effects can be seen on the shadows of minerals and the crystal on top of the Protoss Nexus. It is valid for a material to cast transparent shadows but not regular shadows if it is visually appropriate.

Material Texture Parameters

  1. Diffuse defines the main color of the material. The RGB channels of this map control the Lambertian response to any lights that touch the surface. For models that use Team Color, the alpha channel is used to control where Team Color is present. Black in the Alpha channel results in the surface appearing with full Team Color.

  2. Normal provides a tangent-space normal map for per-pixel lighting. If a DDS is provided in this slot, it must be compressed using the BC3N (DXT5N) format. Any TGA file in this slot will compress using BC3N automatically when using Commit.

  3. Height map provides a single-channel height map for parallax occlusion. This is only active on Ultra settings. It provides per-pixel depth offsets, and is used in particular special effects, such as the Nuke. This is a costly effect and is used only in cases where it has a large impact.

  4. Parallax height scales the intensity of the map defined in Height Map.

  5. Decal provides a secondary diffuse map that is composited over the first diffuse map. The alpha channel is used to control the blending operation. By convention, in StarCraft II this layer is used for faction decals. These textures will be named in the format (Replacement Token)_(Race)_(Decal ID Number)_(Decal Variant). EG: Decal_Terran_0000_01.

  6. Alpha (Decal) adjusts the opacity of the texture provided by Decal.

  7. Specular colors per pixel reflective light, as controlled by Specular Highlights.

  8. Gloss allows for a single-channel texture to define the size of Specular Highlights per-pixel. White values will result in the specular highlight size defined. Darker values will allow for a progressively wider highlight. It is unlikely that any pixel in this map should yield pure black, as that will result in a degenerate specular highlight.

  9. Emissive introduces a color into the material that is unaffected by shading. This is used for parts of the surface that should appear as if they are casting light. This texture will be amplified by Emissive Multiplier.

  10. Alpha (Emissive) adjusts the opacity of the texture provided by Emissive.

  11. Blend Mode (Emissive)

    • Add composites the layer additively, resulting in a brighter result.

    • Blend composites the layer using linear interpolation, replacing the original color with the target color.

    • Team Color Add uses a single channel layer color to determine the amount of Team Color to blend in additively.

    • Mod multiplies the resulting color and the previous layer color, likely darkening it.

    • Mod2x multiplies and the resulting color and the previous layer color, then doubles the brightness. Values darker then 128-grey in the source texture will result in a darkening effect. Brighter values will result in a lightening effect.

  12. Emissive 2 introduces a color into the material that is unaffected by shading. This is used for parts of the surface that should appear as if they are casting light. This texture will be amplified by Emissive Multiplier.

  13. Alpha (Emissive 2) adjusts the opacity of the texture provided by Emissive 2.

  14. Blend Mode (Emissive 2)

    • Add composites the layer additively, resulting in a brighter result.

    • Blend composites the layer using linear interpolation, replacing the original color with the target color.

    • Team Color Add uses a single channel layer color to determine the amount of Team Color to blend in additively.

    • Mod multiplies the resulting color and the previous layer color, likely darkening it.

    • Mod2x multiplies and the resulting color and the previous layer color, then doubles the brightness. Values darker then 128-grey in the source texture will result in a darkening effect. Brighter values will result in a lightening effect.

  15. Environment allows the definition of an environment lighting texture. This layer requires an Environment Type Mapping in the provided SC2 Bitmap. This feature is typically used for semi-reflective surfaces.

  16. Alpha (Enviroment) reduces the brightness of Environment.

  17. Envio Mask allows for a single-channel mask to reduce the intensity of Environment per-pixel.

  18. Blend Mode (Environment)

    • Add composites the layer additively, resulting in a brighter result.

    • Blend composites the layer using linear interpolation, replacing the original color with the target color.

    • Mod multiplies the resulting color and the previous layer color, likely darkening it.

    • Mod2x multiplies and the resulting color and the previous layer color, then doubles the brightness. Values darker then 128-grey in the source texture will result in a darkening effect. Brighter values will result in a lightening effect.

  19. Alpha Mask defines a map to control the opacity of the material. If the alpha value from this slot, multiplied by the alpha value from the Alpha Mask 2 slot, and any other alpha sources, such as vertex alpha results in a value lower than Alpha Threshold, the pixel will not be drawn.

  20. Alpha Mask 2 defines a map to control the opacity of the material. If the alpha value from this slot, multiplied by the alpha value from the Alpha Mask slot, and any other alpha sources, such as vertex alpha results in a value lower than Alpha Threshold, the pixel will not be drawn. Note that for performance reasons, the cloaking shader does not consider this map when determining its alpha.

  21. Lightmap defines alternate baked lighting for Low settings. This most often used on storymode sets.

  22. Ambient Occ defines a single channel ambient occlusion value to be used on High and above graphics settings.

HDR

For some parts of the StarCraft II graphics pipeline, it can be important to define overbright values. These values have significant contributions to bloom effects and other parts of the final image. These HDR multipliers help increase the intensity of the final output colors for channels that benefit from this control.

  1. Specular Multiplier can be used to increase or reduce the final output value for Specular Lighting. This has no effect for settings that do not use specular lighting.

  2. Emissive Multiplier can be used to increase or reduce the final output value for Emissive values. This value is often used to increase the intensity of particle effects.

Misc

  1. Decal Lighting causes a material to draw in a special pass after opaque objects. This will write to a special buffer, so that SC2 Omni and SC2 Spot light types treat it as if it is part of the opaque objects behind it. This is a cheaper alternative to Enable local lights on transparencies when the object is extremely close to the surface, such as with SC2 Projector nodes.

  2. Transparency affects depth-based effects turns on depth writes for a transparent material. Normally, these materials do not write to depth, because it can cause visual artifacts. However, in some cases, transparent objects should affect phenomena such as Depth of Field. This option is useful in such cases.

  3. Enable local lights on transparencies allows transparencies to accept light contribution from SC2 Omni and SC2 Spot lights. Under normal circumstances, transparencies only receive the global lights from the map.

  4. Hair layer sorting *unsupported*. At one time in StarCraft II, polygons for hair were exported in a certain order, so that there were fewer sorting errors. This method was dropped in favor of more opaque hair, and explicit control of sort order using Priority. This option exists for legacy purposes, but should not be used.

  5. Exclude from highlighting prevents a mesh from being highlighted, even if it is part of a model that is highlighted. This is used often in story mode, where a point of interest may be part of a larger model.

  6. Background object hints to the renderer that this model is intended to be drawn behind all other objects. This may yield performance improvements. This flag can be set on all opaque meshes in a model by declaring it to be a Skybox model in the Data Editor.

  7. Clamp output prevents overbright and negative color outputs from the shader. This may have adverse effects on values that should have a high dynamic range, but can prevent some visual artifacts.

Compatibility

  1. Decal required on low end forces the decal layer to show even on Low settings, where it may be turned off for performance reasons. This should be used when seeing the decal layer is critical to gameplay.

  2. Emissive required on low end forces the emissive layer to show even on Low settings, where it may be turned off for performance reasons. This should be used when seeing the emissive layer is critical to gameplay, such as being the sole provider of Team Color.

  3. Specular required on low end *unused*. Reserved as a suggestion that low end machines should still use the Specular layer. This is, however, currently unused in an effort to protect the framerate of lower end machines.

  4. Z-fill required on low end forces the material to still draw in the Z-fill pass, even on Low settings. Using this pass incurs extra overhead, so it is preferable to avoid it. However, in cases where gameplay would be affected, or the visual artifact is too egregious, this flag should be enabled.