Documentation Home

Materials: Texmap Types: SC2 Bitmap

SC2 Bitmap is the core texture type for the StarCraft II Art Tools. All textures should be assigned as TGA or DDS files through this bitmap type. Conversion from TGA to game-ready DDS files is handled automatically through the Commit process if necessary. Most numeric fields accept animation. It is important to recognize that StarCraft II models resolve textures by base filename only even across multiple mopaqs. This means that texture names should be unique, unless they are intended to be shared between models, otherwise they will overwrite and conflict with each other.

Coordinates

  1. Mapping specifies the coordinates with which the texture is sampled when drawing. While almost all settings have a use, Explicit UV 1 is by far the most common.

    Explicit UV Types
    • This family of mapping types match up directly with the Map Channel settings in any UV Modifier. Any mesh a material is applied to must provide the selected UV Channel. Explicit UV # corresponds to #:map in the Tools > Channel Info... dialog. There may be errors on some video cards if a non-existent channel is used, or Num Faces for the channel does not match the number for the mesh channel.

      • Explicit UV 1 is the most common mapping channel.

      • Explicit UV 2 is conventionally used for defining Decals in StarCraft II.

      • Explicit UV 3 is an extra UV Channel that can be used when necessary. This channel is often used for warp-in effects or story-mode light maps in StarCraft II.

      • Explicit UV 4 is an extra utility channel. Using too many UV channels can exhaust certain shader resources. Using this channel may not yield valid results on all graphics configurations.

    Environment Types
    • These mapping methods use the surface normal to lookup into either a cube or sphere map. Cube maps should be provided as a DDS file assuming Y-Up and declaring DDSCAPS2_CUBEMAP in the header. These mapping types are only supported on the Environment slot in SC2 Standard Material.

      • Reflective Cubic Env reflects the view vector across the surface normal then uses the result to do a tex3D lookup on the provided texture. This is used to simulate a reflective surface.

      • Reflective Spherical Env reflects the view vector across the surface normal then uses the X and Y components of the resultant vector to do a lookup into the provided texture. This is often used to approximate a simple glossy surface.

      • Cubic Environment uses the surface normal to perform a direct tex3D lookup on the provided cube map. This can be used to seamlessly map a sphere, or present a fall skydome, but carries additional overhead beyond an explicit UV map.

      • Spherical Environment uses the world X (side) and Z (up) coordinates surface normal to perform a direct lookup into the defined texture.

    Projective Types
    • Projective mappings use the mesh's coordinates on the given plane to perform the texture lookup. The mesh does not require any explicit mapping, but there may be streaking when viewed from an unexpected angle. Projective mapping occurs after skinning transforms, so animated meshes may experience warping.

      • Planar Local Z is a top-down mapping that moves along with the origin of the model.

      • Planar World Z is a top-down mapping that is stationary with respect to the world.

      • Planar Local X projects the texture from the Left or Right views in 3ds Max.

      • Planar Local Y projects the texture from the Front or Back views in 3ds Max.

      • Planar World X projects the texture from the side from standard game view.

      • Planar World Y projects the texture along the forward axis from standard game view.

      • Screen Space makes a texture appear stationary with respect to the camera. This is stretched to match the current resolution and aspect ratio.

    Atlas Types
    • Triplanar atlas mappings are special mapping types, used primarily for Cliffs in StarCraft II. The provided texture is queried once for each primary axis. The atlas is provided as two textures, one for both sides, and another for the top. The side texture should have the suffix _00, while the texture for the top should share the same root name, but be suffixed with _01 (eg: SC2_AiurCliff_00.tga and SC2_AiurCliff_01.tga). Triplanar Atlasing is a relatively expensive technique and should be used sparingly. Triplanar mapping occurs after skinning transforms, so animated meshes may experience warping.

      • Tri Planar Local will project local to the origin of the model.

      • Tri Planar World is a stationary projection in world space.

      • Tri Planar World Local Z is the primary mapping method for Cliff materials in StarCraft II. The vertical component of the projection is local to the model. This makes it so that cliffs react properly to changes in the height of the terrain.

  2. Offset (UV) allows positioning or scrolling UV coordinates in relation to the original 0 to 1 space. This offset is independent of tiling parameters. Positive values move the image up and to the right.

  3. Tiling (UV) scales the UV coordinates such that it tiles the defined number of times in relation to the original 0 to 1 UV Space. The origin of the scaling operation is at .5, .5 in UV space.

  4. Tile (UV) defines whether to repeat the texture when querying beyond 0 to 1 space, or to clamp the query to the border pixels of the texture.

  5. Angle (UVW) performs a full rotational transform on the UV space. The W value for the UV plane is assumed to be 1, as currently the W value is not exported. The W field is the most commonly used value, as this visually spins the texture around the center of the default mapping space.

  6. Offset (XYZ) is available only when using Triplanar mapping. This pushes the projections around. For Cliff materials, the Z value normally set to 800, to seat the texture against the bottom of the standard 8 in-game unit high cliffs that line unplayable low ground. This value is a plain addition to the query point, so positive values appear to move the texture downward.

  7. Scale (XYZ) is available only when using Triplanar mapping. These values are most often set to .075 for cliffs so that they tile over a period of approximately 13 in-game units, as most of the tallest cliffs in StarCraft II span 12 units, and this provides some clearance for texture bleeding.

Color Operations

  1. Channel selects which channels of the texture to use. This allows for packing of multiple types of textures in a single map, or reusing channels as necessary. SC2 Bitmap always returns a 4-component RGBA color. For single-channel values, it is as-if their single value is replicated for all 4 channels. This behavior is notable because certain layers expect a single mask value, and these are generally pulled from the resulting A channel. For example, for the Diffuse layer, or an Emissive layer set to Team Color Add, the alpha channel is used to control the amount of Team Color that should show.

    • Use RGB delivers the basic color channels of the texture. The A channel is assumed to be 1.

    • Use RGBA returns all four channels of the texture exactly as authored.

    • Use R uses only the red channel of the texture.

    • Use G uses only the green channel. For simple single-channel masks, G is commonly used because texture compressors often favor fidelity in the green channel. It is less likely to see compression artifacts.

    • Use B uses only the blue channel.

    • Use A uses only the alpha channel.

  2. Invert performs the math operation 1-color before delivering the result to shader. This happens before the multiply, add, and clamp operations but after Team Color is applied.

  3. Clamp restrains the result values to the 0 to 1 range, and prevents negative or overbright values. This occurs after invert, multiply, and add operations, but before any Fresnel operations.

  4. RGB Multiply applies a direct multiplication on the color values. This occurs after inversion but before add and clamp.

  5. RGB Add offsets the color value by the specified value. This occurs after inversion and multiplication, but before clamp.

Bitmap Parameters

  1. Bitmap selects and displays the filepath to the currently assigned texture. This texture should either be in TGA or DDS format. OGG Theora videos may also be used, but this is processor-intensive, and should be used sparingly, because it negatively affects low-performance computers. The 3ds Max bitmap-path resolution rules are honored by SC2 Bitmap, so images in the same folder as the max file should still be valid, even if the path is invalid. However, it is strongly recommended that the target of texture path always be a valid texture. Images dimensions should be a power-of-two size; eg: 128, 256, 512, 1024, and 2048.

  2. Reload forcibly refreshes the 3ds Max view of the image. This should occur automatically most of the time on a texture change.

  3. View opens a window to preview the image within 3ds Max.

  4. Render-to-texture source specifies a channel to receive a texture generated by the game. If the game provides a texture in this channel, it will override the texture provided by Bitmap. These channels can be set up in either the Cutscene Editor, or Triggers. They are most often used for video panels and similar effects in StarCraft II.

Fresnel

Fresnel settings control the appearance of the texture based on the normal direction of the surface.

  1. Fresnel mode

    • None disables the effect. All the parameters in this rollout become unused.

    • Standard makes the texture favor surfaces pointing perpendicular to the camera direction. This has a visual effect of highlighting the outer edges of a model.

    • Inverted masks the texture so it is most visible when the surface normal is directly facing the camera. This has a visual effect of highlighting the core of a model.

    • Constant Standard calculates the mask by using the surface normal and a single arbitrary axis. By default this is the world Z axis, but it can be reoriented using the Rotation field. This favors surfaces pointing perpendicular the defined axis.

    • Constant Inverted calculates the mask by using the surface normal and a single arbitrary axis. By default this is the world Z axis, but it can be reoriented using the Rotation field. The texture appears on surfaces facing towards the defined axis.

  2. Fresnel exponent controls the falloff of the fresnel effect by applying a power curve. This occurs before min and max operations, and as such, the values of Fresnel Min and Fresnel Max may be relative to a non-linear term. Changing this field, may change their apparent values.

  3. Fresnel min may have two different meetings depending on the value of the Clamp Position parameter. When Clamp Position is enabled, this value represents the point along the fresnel falloff where the texture will no longer be visible. When clamping is disabled, this value represents the minimum brightness of the texture after the fresnel term.

  4. Fresnel max may have two different meetings depending on the value of the Clamp Position parameter. When Clamp Position is enabled, this value represents the point along the fresnel falloff where the texture will be fully visible. When clamping is disabled, this value represents the maximum brightness of the texture after the fresnel term.

  5. Clamp position changes the behavior of the fresnel effect's brightness. When disabled, the texture fades from a minimum intensity to a maximum intensity, as defined by Fresnel Min and Fresnel Max. When enabled, the texture is instead faded in from 0 to 1 from the points where the fresnel brightness would have been clamped by the same values. Enabling clamp is useful when the texture is intended to disappear completely from certain angles.

  6. Do not mirror prevents the effect from showing up on both sides of the mesh. While this is not usually noticeable on a view-aligned fresnel effect, it can be an undesirable artifact on the Constant variants.

  7. Local transform makes the fresnel effect occur in local space. The Rotation and Mask effects are rotated with the model. This can be useful if the effect, for example, should be aligned with a cylinder, no matter which way the cylinder is rotated.

  8. Rotation realigns the vector used to calculate the fresnel effect. For the Constant fresnel variants the default vector is facing along the Z axis. In relation to the default view, the first parameter yaws the effect left and right. The second parameter pitches the effect up and down.

  9. Mask restricts movement of a non-constant fresnel vector along certain axes. For example, a value of 1.0 in the third component would completely prevent the fresnel effect from moving up and down as the camera angle changes.

Animation

Textures can be animated using one of two methods. The user can provide either an OGG Theora video in the Bitmap slot, which will enable the AVI parameters of this rollout. Full video processing can be very expensive, and should be used sparingly. Alternately a "flipbook" TGA providing a regular grid of animated images can be used. For the TGA, the first frame is in the top left, and the order continues from left to right, top to bottom.

  1. Play (AVI) causes the video to progress forward when enabled. When disabled, the video will pause, but not return to the Start frame. This parameter can be animated. Unlike flipbooks, AVIs are fire and forget. They progress on their own and the current frame cannot be explicitly chosen.

  2. Restart (AVI) will, when transitioning from unchecked to checked, cause the video to return the Start frame.

  3. SyncTiming (AVI) makes the video progress forward one frame per frame of animation in the model. Normally the video attempts to progress in real time.

  4. Framerate (AVI) sets how many frames per second the video is intended to play at.

  5. Start frame (AVI) specifies the first frame of the video to use when playing back. This is also the destination frame after a Restart (AVI).

  6. Stop frame (AVI) specifies the frame on which the Loop action should occur. A value of -1 here will use the last frame of the video.

  7. Loop (AVI) determines what action should be done when the video reaches its last frame. A value of Loop will restart at Start frame (AVI). A value of Hold will present the frame defined by Stop frame (avi) until explicitly restarted.

  8. Current frame (Flipbook) sets the frame to display. This parameter is almost always animated when used. The total number of frames is defined by Rows (Flipbook) multiplied by Columns (Flipbook). When this number exceeds the total number of frames in the flipbook, it will loop back to the first frame, provided that the Tile parameters of the bitmap are enabled.

  9. Rows (Flipbook) defines the number of images that appear vertically in a flipbook texture.

  10. Columns (Flipbook) defines the number of images that appear horizontally in a flipbook texture.

  11. Use Particle Flipbooks (Flipbook) enables the Flipbook rollout of an SC2 Particle System. Without this flag, particle flipbooks will not function properly.