com.jme3.material
package contains classes for manipulating
jMonkeyEngine materials.See: Description
Class | Description |
---|---|
Material |
Material describes the rendering style for a given
Geometry . |
MaterialDef |
Describes a J3MD (Material definition).
|
MaterialList |
A map from material name to a material.
|
MaterialMatParamTest |
Validates
MatParam s. |
MaterialProcessor | |
Materials |
This class is to provide some constants materials.
|
MaterialTest | |
MatParam |
Describes a material parameter.
|
MatParamOverride |
MatParamOverride is a mechanism by which
material parameters can be overridden on the scene graph. |
MatParamTexture | |
RenderState |
RenderState specifies material rendering properties that cannot
be controlled by a shader on a Material . |
ShaderGenerationInfo |
this class is basically a struct that contains the ShaderNodes informations
in an appropriate way to ease the shader generation process and make it
faster.
|
Technique |
Represents a technique instance.
|
TechniqueDef |
Describes a technique definition.
|
com.jme3.material
package contains classes for manipulating
jMonkeyEngine materials.
Materials are applied to geometries
in 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
See RenderState
.
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
mat.setTexture("ColorMap", tex);