This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Material: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
m formatting
Changed parameters to property list
Line 24: Line 24:
|}
|}
Valid parameters for a Material are:
Valid parameters for a Material are:
*'''name''': name for reference
<properties>
*'''texture''': set the texture (don't use PNG extension)
name=name for reference
*'''addtexture''': add a texture (again, no PNG extension)
texture=set the texture (don't use PNG extension)
*'''notextures''': don't use textures.
addtexture=add a texture (again, no PNG extension)
*'''notexcolor''': don't apply the color to the texture
notextures=don't use textures.
*'''notexalpha''': don't use the texture's alpha channel
notexcolor=don't apply the color to the texture
*'''texmat''': specify a texture matrix. -1 for no texture matrix.
notexalpha=don't use the texture's alpha channel
*'''dyncol''': specify a dynamic color. -1 for no dynamic color.
texmat=specify a texture matrix. -1 for no texture matrix.
*'''ambient''': ambient color
dyncol=specify a dynamic color. -1 for no dynamic color.
*'''diffuse''': diffuse (main) color
ambient=ambient color
*'''color''': synonym for diffuse
diffuse=diffuse (main) color
*'''specular''': specular color
color=synonym for diffuse
*'''emission''': emission color
specular=specular color
*'''shininess''': shiny!
emission=emission color
*'''resetmat''': restore default values
shininess=shiny!
 
resetmat=restore default values
</properties>
To actually apply a texture, you must use some sort of reference in an object, like so:
To actually apply a texture, you must use some sort of reference in an object, like so:
{|
{|

Revision as of 19:51, 16 April 2007

A material is used in a BZFlag world to define a new look for otherwise regular objects, such as meshboxes.

Code

To put a material in your map, first it must be defined:

material
 name example_material
 texture filename
 addtexture filename
 notextures
 notexcolor
 notexalpha
 texmat -1
 dyncol -1
 ambient 0.0 0.0 0.0 1.0
 diffuse 1.0 1.0 1.0 1.0
 color 1.0 1.0 1.0 1.0
 specular 0.0 0.0 0.0 1.0
 emission 0.0 0.0 0.0 1.0
 shininess 0.0
 resetmat
end

Valid parameters for a Material are: <properties> name=name for reference texture=set the texture (don't use PNG extension) addtexture=add a texture (again, no PNG extension) notextures=don't use textures. notexcolor=don't apply the color to the texture notexalpha=don't use the texture's alpha channel texmat=specify a texture matrix. -1 for no texture matrix. dyncol=specify a dynamic color. -1 for no dynamic color. ambient=ambient color diffuse=diffuse (main) color color=synonym for diffuse specular=specular color emission=emission color shininess=shiny! resetmat=restore default values </properties> To actually apply a texture, you must use some sort of reference in an object, like so:

meshbox
 position 0 0 10
 rotation 0
 size 10 10 5
 matref example_material
end

History

Materials were added in BZFlag 2.0.0.

Editor Support

Materials are supported in Blender with BZWTools, pyBZEdit, and Wings3D with the BZW Exporter for Wings3D. Materials are NOT supported in BZEdit or BZFed.