com.jme3.materialpackage contains classes for manipulating jMonkeyEngine materials.
Describes a J3MD (Material definition).
A map from material name to a material.
This class is to provide some constants materials.
Describes a material parameter.
This class is basically a struct that contains the ShaderNodes information in an appropriate way to ease the shader generation process and make it faster.
Represents a technique instance.
Describes a technique definition.
Describes light rendering mode.
Define in what space the light data should be sent to the shader.
com.jme3.materialpackage contains classes for manipulating jMonkeyEngine materials. Materials are applied to
geometriesin the scene. Each geometry has a single material which is used to render that geometry.
Materials (also known as material instances) are extended from material definitions.
Material definitions provide the "logic" for the material. Usually a shader that will handle drawing the object, and corresponding parameters that allow configuration of the shader. Material definitions can be created through J3MD files. The J3MD file abstracts the shader and its configuration away from the user, allowing a simple interface where one can simply set a few parameters on the material to change its appearance and the way its handled.
Techniques specify a specific way of rendering a material. Typically a technique is used to implement the same material for each configuration of the system. For GPUs that do not support shaders, a "fixed function pipeline" technique could exist to take care of rendering for that configuration
Creating a textured material
// Create a material instance
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
// Load the texture.
Texture tex = assetManager.loadTexture("Textures/Test/Test.jpg");
// Set the parameters