How to write a Material File

From Iris2

Jump to: navigation, search
(Templates)
(Import the materia-templates.material)
 
Line 8: Line 8:
-
<code>import * from "material-templates.material"</code>
+
<pre>import * from "material-templates.material"</pre>
Line 14: Line 14:
==Defining the Template and Texture==
==Defining the Template and Texture==
-
 
Then type this and replace the "diffuse_template" with your chosen template and "tex_basefloortile.png" with the texture which you want to use.
Then type this and replace the "diffuse_template" with your chosen template and "tex_basefloortile.png" with the texture which you want to use.
-
 
+
<pre>
-
<code>
+
material basefloortile : diffuse_template
material basefloortile : diffuse_template
-
 
{  
{  
-
 
+
  set_texture_alias ambient_tex tex_basefloortile.png
-
set_texture_alias ambient_tex tex_basefloortile.png
+
  set_texture_alias diffuse_tex tex_basefloortile.png
-
 
+
-
set_texture_alias diffuse_tex tex_basefloortile.png
+
-
 
+
}
}
-
 
+
</pre>
-
</code>
+
Diffuse is the texture for normal light and ambient is what happens if there is no light.
Diffuse is the texture for normal light and ambient is what happens if there is no light.
Line 43: Line 36:
This is good for tiles with transparent textures but still having shadows.
This is good for tiles with transparent textures but still having shadows.
 +
 +
:Advantage: Does not need a lot of performance
 +
:Disadvantage Not so nice frames and is good for everything with transparency
==diffuse_template_sceneblend==
==diffuse_template_sceneblend==
Line 48: Line 44:
You can take that if the object should not have shadows but still is alpha transparent.
You can take that if the object should not have shadows but still is alpha transparent.
-
: Adavantage: sehr schöne Ränder (z.b. für Grass) This is good for flowers blossoms or lilypads working with basefloortiles. Because it has very nice frames on grasses for example.
+
: Advantage: It has very nice frames. Good for grasses.
: Disadvantage: No real "Tiefensortierung". It is only apparent if you look at it and another mesh also having sceneblend.
: Disadvantage: No real "Tiefensortierung". It is only apparent if you look at it and another mesh also having sceneblend.
==diffuse_template_foliage==
==diffuse_template_foliage==
-
For leaves, trees and plants
+
For objects having models and is alpha transparent.
 +
: Advantage: Object has shadows
 +
: Disadvantage: Object unfortunately does not have nice frames. Good for flowers and trees.Objekt hat nicht so schöne Ränder (geeignet für Blumen oder Bäume)
-
Material Tips:
+
=Beware=
-
* "diffuse_template_foliage"
+
To test the meshes, material and texture by taking a look on it with the help of [http://www.ogre3d.org/tikiwiki/Ogre+Meshy Ogre Meshy]. You have to copy the "material-templates.material" in the same folder.
-
:: nehmen wenn Schatten vom Objekt geworfen werden soll, und das Objekt Alpha-Transparenz hat
+
-
:: Vorteil: Objekt wirft Schatten
+
-
:: Nachteil: Objekt hat nicht so schöne Ränder (geeignet für Blumen oder Bäume)
+
-
* "diffuse_template_alpha"
+
-
: für Objekte nehmen die Schatten werfen sollen und Alpha-Transparenz haben
+
-
:: Vorteil: nicht so rechenintensiv
+
-
:: Nachteil: nicht so schöne Ränder (daher für alles geeignet das transparenz hat)
+
-
* Tutorial für Materials => http://www.ogre3d.org/tikiwiki/Materials
+
=Links=
-
=Beware=
+
[http://www.ogre3d.org/tikiwiki/Materials Tutorials]
-
 
+
-
To test the meshes, material and texture by taking a look on it with the help of [http://www.ogre3d.org/tikiwiki/Ogre+Meshy Ogre Meshy]. You have to copy the "material-templates.material" in the same folder.
+

Current revision as of 16:01, 19 December 2011

Personal tools