Skip to content

Materials

Hephaestus-Dev edited this page Jan 7, 2021 · 1 revision

Material files define the different materials your mesh uses. They should use (but don't require) the .mtl file extension. Material files support comments, with the # comment specifier.

Each entry in your material file must have at least the following entries

Keywords Effect
newmtl The name of the material
Used by the .obj files associated with it
texture, map_Kd Changes the texture of the material

Below is a full list of the different material flags and their effects:

Keywords Default Values Effect
blend_mode SOLID DEFAULT, SOLID, CUTOUT_MIPPED, CUTOUT, TRANSLUCENT Allows per-material control of the render layer used
DEFAULT uses the render layer registered for the block in Java code
See the JMX wiki for an in-depth description of each option
emission, emissive false bool Enables or disables the rendering of this material with full brightness
Kd1 1.0 1.0 1.0 float float float Sets the diffuse color of the material
Backwards compatible with the standard .mtl definition
color, diffuse_color1 0xFFFFFF int Sets the diffuse color of the material
color_index true bool Enables/disabled the use of diffuse color for this material
tintindex, tint_index int Associates the material with a color provider
Equivalent to vanilla's tintindex
ambient_occlusion, ambientocclusion ao true bool Enables or disables ambient occlusion
Equivalent to vanilla's ambientocclusion
diffuse_shading true bool Enables or disables diffuse lighting
uvlock false bool Enables or disabled uv locking
Equivalent to vanilla's uvlock
cull, cullface DOWN, UP, NORTH, SOUTH, WEST, EAST Sets the cullface for this material
Equivalent to vanilla's cullface

1 Diffuse colors do not work with item models, and will cause the quads using that material to be invisible.

Clone this wiki locally