Skip to content

zCMaterial

Quick Infos

Class Name: zCMaterial
Sources:
β€” spacerhilfedatei.sph
β€” gothic-library.ru

zCMaterial class describes the properties of the game materials.

Danger

zCMaterial objects are only saved in binary .ZEN files.

Class members

Class member overview

defaultMapping

Default material mapping.

name

Material name. In most cases corresponds to the name of the texture map.

matGroup

Sound accompaniment of the material. Must be specified to produce the correct sounds when moving across the specified material.

Accepted values:

  • UNDEF - Undefined.
  • METAL - Metal.
  • STONE - Stone.
  • WOOD - Wood.
  • EARTH - Earth.
  • WATER - Water.
  • SNOW - Snow.

color

Texture replacement color in RGBA format. Polygon is in this color until engine applies the texture.

smoothAngle

Defines the angle of material smoothing between two faces.

texture

Defines the name of the texture file used for the material, which also determines whether the texture is animated or static.

To create animated textures, add a suffix to the file name _A0, e.g., NW_Fire_A0.TGA, NW_Fire_A1.TGA etc. The texture NW_Fire_A0.TGA is the first frame. The game engine will automatically search your hard drive for remaining animation files.

texScale

Defines the scaling along the X and Y axes. Assigns the necessary texture coordinates to polygons.

texAniFPS

Defines the FPS (frames per seconds) of texture animation, but only if the texture is animated (NAME_A0.*).

texAniMapMode

Texture animation mode.

Accepted values:

  • NONE - No texture animation.
  • LINEAR - Linear texture animation.

texAniMapDir

Defines the direction and movement speed of animated textures. The values should be significantly lower than 1 (For example 0.00005).

Danger

The animation movement is only enabled when texAniMapMode is set to LINEAR mode.

noCollDet

Defines if collision detection is disabled.

Accepted values:

  • TRUE - Collisions disabled.
  • FALSE - Collisions enabled.

noLightmap

Defines if light map is disabled.

Accepted values:

  • TRUE - Disable baking of light maps on the material.
  • FALSE - Enable baking of light maps on the material.

lodDontCollapse

If you activate this option, the texture will not degrade when the camera moves away.

Accepted values:

  • TRUE - Disable texture degradation.
  • FALSE - Enable texture degradation.

Note

To prevent the texture from being distorted, you can cancel the creation of a MipMap. It is advisable to use for small objects.

detailObject

An option that allows you to complement the material with an additional texture.

detailObjectScale

Tiling of the overlay image selected in the detailObject property.

Warning

This option is only available in Gothic II (Spacer2).

forceOccluder

No information provided.

Accepted values:

  • TRUE
  • FALSE

Warning

This option is only available in Gothic II (Spacer2).

environmentalMapping

Environment mapping mode. Creates glare on the texture.

Accepted values:

  • TRUE - Enable reflection mode.
  • FALSE - Disable reflection mode.

Warning

This option is only available in Gothic II (Spacer2).

environmentalMappingStrength

The strength of environmental reflection on a model.

Warning

This option is only available in Gothic II (Spacer2).

waveMode

Enable wave simulation mode. For example, AMBIENT_GROUND is used for water textures.

Accepted values:

  • NONE - Wave simulation is disabled.
  • AMBIENT_GROUND - Wave simulation is enabled.
  • GROUND - No information.
  • AMBIENT_WALL - No information.
  • WALL - No information.
  • ENV - No information.
  • AMBIENT_WIND - No information.
  • WIND - No information.

Warning

This option is only available in Gothic II (Spacer2).

waveSpeed

Wave speed.

Accepted values:

  • SLOW - Slow.
  • NORMAL - Normal.
  • FAST - Fast.

Warning

This option is only available in Gothic II (Spacer2).

waveMaxAmplitude

Maximum wave amplitude.

Warning

This option is only available in Gothic II (Spacer2).

waveGridSize

Wave mesh size.

Warning

This option is only available in Gothic II (Spacer2).

ignoreSunLight

Defines if the material ignores sunlight (doesn't cast shadows).

Accepted values:

  • TRUE - Ignore.
  • FALSE - Don't ignore.

Warning

This option is only available in Gothic II (Spacer2).

alphaFunc

Alpha channel blending function.

Accepted values:

  • NONE - None.
  • MAT_DEFAULT - Use texture alpha channel.
  • BLEND - Mixing.
  • SUB - Subtraction.
  • MUL - Multiplication.
  • MUL2 - Multiplication 2.

Warning

This option is only available in Gothic II (Spacer2).