Materials

From Yage3D Wiki

Jump to: navigation, search

In Yage, a material defines how objects are rendered. Materials can be applied quite a few places throughout the engine. They can be applied to 3D models, sprites, terrains, user-interface components, and more.

Materials are divided into layers. Each layer is rendered in a separate pass and has many properties to control its appearnace. Layers are further broken down into textures and shaders.

Materials can either be defined in an xml file and loaded at runtime, or created using Yage's material API. This second method also allows modifying materials at runtime.

Example of an xml material file:

<material>
  <layer ambient="888888" blend="add">
    <texture src="rocks.jpg" filter="bilinnear"/>
  </layer>
</material>

[edit] Layers

This article is still in-pogress.

Personal tools