= Material Definition Properties :revnumber: 2.1 :revdate: 2020/07/24 :keywords: material, texture, MatDefs, light, culling, RenderStates, documentation In jMonkeyEngine 3, colors and textures are represented as Material objects. * All Geometries must have Materials. To improve performance, reuse Materials for similar models, don't create a new Material object for every Geometry. (E.g. use one bark Material for several tree models.) * Each Material is based on one of jme3's default Material Definitions (.j3md files) that are included in the engine. Advanced users can create additional custom Material Definitions (see how it's done in the xref:ROOT:getting-started/build_from_sources.adoc[jme3 sources]). [TIP] ==== Find out quickly xref:material/how_to_use_materials.adoc[How to Use Materials], including the most commonly used code samples and RenderStates. + Or find more background info on xref:material/material_definitions.adoc[How to use Material Definitions]. ==== == All Materials Definition Properties The following Materials table shows the Material Definitions that jMonkeyEngine 3 supports. [TIP] ==== Looks confusing? + 1) Start learning about `Unshaded.j3md` and `Lighting.j3md`, they cover 90% of the cases. + 2) Use xref:sdk:material_editing.adoc[the SDK's visual material editor] to try out and save material settings easily. + 3) The xref:sdk:code_editor.adoc[SDK's Palette] contains drag&drop code snippets for loading materials. ==== Most Material parameters are optional. For example, it is okay to specify solely the `DiffuseMap` and `NormalMap` when using `Lighting.j3md`, and leave the other texture maps empty. In this case, you are only using a subset of the possible features, but that's fine if it already makes in the material look the way that you want. You can always add more texture maps later. === Unshaded Coloring and Textures jMonkeyEngine supports illuminated and unshaded Material Definitions. * Phong Illuminated materials look more naturalistic. * Unshaded materials look more abstract. "`Unshaded`" materials look somewhat abstract because they ignore lighting and shading. Unshaded Materials work even if the scene does not include a light source. These Materials can be single-colored or textured. For example, they are used for cards and tiles, for the sky, billboards and UI elements, for toon-style games, or for testing. [cols="20,30,50", options="header"] .Standard Unshaded |=== a| Material Definition a| Usage