A material is used in a BZFlag world to define a new look for otherwise regular objects, such as meshboxes.
To put a material in your map, first it must be defined:
material name example_material texture filename # set the texture (don't use PNG extension) addtexture filename # 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 -1 # specify a texture matrix. -1 for no texture matrix. dyncol -1 # specify a dynamic color. -1 for no dynamic color. ambient 0.0 0.0 0.0 1.0 # ambient color diffuse 1.0 1.0 1.0 1.0 # diffuse (main) color color 1.0 1.0 1.0 1.0 # synonym for diffuse specular 0.0 0.0 0.0 1.0 # specular color emission 0.0 0.0 0.0 1.0 # emission color shininess 0.0 # shiny! resetmat # restore default values end
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
Materials were added in BZFlag 2.0.0.