Material

ZGameEditor

Documentation

Community

Edit sidebar

Material

Material

A definition of material properties for rendered objects.

See also: UseMaterial

Properties

Texture

If set to a Bitmap then the material will use the bitmap for texturing.

Texture2

If set to a Bitmap and your graphics card supports multitexturing then the material will use the bitmap for texturing.

Texture3

If set to a Bitmap and your graphics card supports multitexturing then the material will use the bitmap for texturing.

TextureScale

When texturing is used, this value controls scaling of the texture. 1.0 is the default value for normal scale. 0.5 is half scale, 2.0 is double scale. You can specify a separate scale for the X and Y axis.

TextureX / TextureY

When texturing is used, this values controls the texture offset in X and Y axis. Animate the values to "move" the texture over the rendered object.

TextureRotate

When texturing is used, this value controls rotation of the texture.

TextureWrapMode

When texturing is used, this values controls how the texture will repeated over the mesh surface:

  • Mirror - The texture is repeated with every other repetition mirrored (flipped).
  • Tile - The texture is repeated normally.
  • Clamp - No repetition, pixels outside the texture will hold the same color as the textures edges.

WireframeWidth

The width of lines in wireframe-mode. Default value is 4.

Shading

The style of shading that this material will use. Can have one of the following values:

  • Smooth - Smooth shading
  • Flat - Flat shading
  • Wireframe - Wireframe.

Default is Smooth.

Color

The color of the material. See also RenderSetColor for an alternative of setting individual colors to models using the same material.

Light

If set then the material will be lit.

Blend

Controls the blending mode used. Can have one of the following values:

  • None
  • Alpha/OneMinusSourceAlpha
  • Alpha/One
  • Color/OneMinusSourceColor
  • AlphaSaturate/One

See external link: Transparency, Translucency, and Blending (OpenGL.org).

TexCoords

When texturing is used, this value controls how texture coordinates are fetched.

  • Generated - Material will use automatically generated texture coordinates.
  • ModelDefined - Texture coordinates supplied with the model will be used. Set this value when using the RenderSprite-component.

Default is Generated.

ZBuffer

Material will use Z-buffer when rendering. Default is set.

DrawBackFace

If this value is set then surfaces turned away from the camera will be rendered. Set this value when rendereing transparent surfaces. Default is off.

Font

Set to a Font and then use RenderText to display text using the font.

Shader

If set to a Shader then the material will use the shader for fragment (pixel) and vertex processing.

Recent Changes (All) | Edit SideBar Page last modified on October 22, 2008, at 03:54 PM Edit Page | Page History
Powered by PmWiki