gMotorMaterial

Each object exported to the game must have a Multi/Sub Material assigned to it. Each SubMaterial must be of the gMaterial type. Here we document the gMotorMaterials or gMats.

Ensure to name the multi sub and gMotorMaterials appropriately by following Naming Conventions.

gMotorMaterial Roll Out

General Parameters

Source Blend / Dest Blend

This allows us to set the blend options for the material. There are many options here to provide different effects. The usually used options are as follows:

  • One / Zero: No transparency.
  • Src Alpha / Inv Src Alpha: Alpha blend transparency.
  • One / One: Additive
  • Inv Dst Color / One: Soft Additive
  • Dst Color / Zero: Multiplication
  • Dst Color / Src Color: 2x Multiplication


Anti Aliased Alpha Test is available by setting One / Zero as the blend option and then configuring Chroma Blend / Pixels in the gMotorTexture for the first map in the shader.

Reflection Mapper

Select a reflection mapper for this material. This is used to assign a specific live mapper to any Cube Map texture stages which have Live Mapper selected. This is commonly used to enable wet weather reflections on roads. 

Lighting Masks

There are lighting colour masks available for Ambient, Diffuse, Emmisive and Specular components. 

Please note that the Ambient, Diffuse and Specular masks have been deprecated for IBL shaders.

Material Alpha

This is a multiplier for Vertex Alpha for the entire Material.

This has been deprecated.

Specular Settings

There are various specular power and fresnel min, max and exponent settings.

These are not required for IBL Shaders.

No Z Buffer

This ensures an object is the last to be rendered. This is rarely used now. It was typically used for static horizon meshes in the distance which are actually not the real size.

Two Sided

This disables rear face culling. However this does not create inverted normals for the rear faces shown so this is rarely used.

Sorted

This setting applies to alpha materials only.  This setting is used to create an alpha material that renders as if it were an opaque material.  Alpha materials with this attribute will:

  1. Be sorted back-to-front (just as regular alpha materials)
  2. Render after opaque materials, but before regular alpha materials
  3. Write to the z buffer (unlike regular alpha materials, which do not write to the z buffer)

Use this attribute to solve sorting problems on isolated alpha meshes, or on meshes that contain mostly opaque materials, and one or two alpha materials.  Don’t use on alpha meshes that are surrounded by other alpha meshes, as the sorting will probably be worse.

The offset option adjusts the ordering of that sorting. However the working nature of this is unconfirmed.

User A and User B

These allow the setting of custom data for the shader.

The current working state of this function is unconfirmed.

Shader

The drop down here allows you to chose the shader to assign to this material. A brief description is shown of the selected shader however an indepth definitions of commonly used shaders for Track Art can be found here.

Textures

After choosing the shader you wish to use, the Texture slots will populate. You then need to assign textures and potentially configure their options.

The list shows the function of each texture under Type and Blend headings. However the Type options are quite limited and may not give full details. 

At time of writing, IBL Shaders are all assigned Color and Bump types to ensure the correct sRGB or Linear functioning. By using 3ds Max Material Library you can copy in templates which have gTextures named appropriately with their function.