How to write a Material File

From Iris2

Jump to: navigation, search
Line 1: Line 1:
-
Material Templates
+
Writing the Material File
Open a file and rename it to the name of the material in your mesh file. For example basefloortile.material for the respective basefloortile.mesh.
Open a file and rename it to the name of the material in your mesh file. For example basefloortile.material for the respective basefloortile.mesh.
Line 5: Line 5:
Begin the file with the following file without the slashes. The slashes are normally for comments.
Begin the file with the following file without the slashes. The slashes are normally for comments.
-
// import * from "material-templates.material"
+
 
 +
----
 +
 
 +
import * from "material-templates.material"
 +
 
 +
----
This will import the templates and the artist does not have to type very much.
This will import the templates and the artist does not have to type very much.
 +
 +
Then type this and replace the "diffuse_template" with your chosen template and "tex_basefloortile.png" with the texture which you want to use.
 +
 +
 +
----
 +
 +
material basefloortile : diffuse_template
 +
{
 +
set_texture_alias ambient_tex tex_basefloortile.png
 +
set_texture_alias diffuse_tex tex_basefloortile.png
 +
}
 +
 +
----

Revision as of 09:19, 3 December 2011

Personal tools