Skip to main content

Material

class Material

Material gives shader to any object. You can select colors, textures to be applied to the renderization of the model There are a lot of shaders to be selected, you can change the shader of the material using ItsMagic properties panel.


public class Material

— Constructors (1) —

ConstructorDescription
Material()Creates a new Material.

— Methods (48) —

NameDescription
String getShader()Return the name of the current selected shader.
void setShader(String shaderName)Set the name of the current selected shader.
Color getColor(String entryName)Return the Color passing its name as an argument.
Color findColor(String entryName)Return the Color passing its name as an argument.
void setColor(String entryName, Color color)Set the Color passing its name and a Color as an argument.
[JAVARuntime.Vector2] getVector2(String entryName)Return the Vector2 passing its name as an argument.
[JAVARuntime.Vector2] findVector2(String entryName)Return the Vector2, passing its name as an argument.
void setVector2(String entryName, [JAVARuntime.Vector2] vector2)Set the Vector2 passing its name and a Vector2 as an argument.
[Texture] getTexture(String entryName)Return the [Texture] passing its name as an argument.
[Texture] findTexture(String entryName)Return the [Texture] passing its name as an argument.
void setTexture(String entryName, [Texture] texture)Set the [Texture] passing its name and a [Texture] as an argument.
void setTextureFile(String entryName, [TextureFile] textureFile)Set the [TextureFile] passing its name and a [TextureFile] as an argument.
void setDiffuse(Color color)Sets the Material Diffuse.
boolean getBoolean(String entryName)Returns a boolean with the name defined to be the argument.
boolean findBoolean(String entryName)Returns a boolean with the name defined to be the argument.
void setBoolean(String entryName, boolean value)Sets a boolean for the shader of the Material with name defined to be the argument.
void setReceiveLight(boolean value)Defines whether the Material will receive light or not.
float getFloat(String entryName)Returns a float with a name defined to be the argument.
float findFloat(String entryName)Returns a float with a name defined to be the argument.
void setFloat(String entryName, float value)Sets a float for the shader of the Material with name defined to be the argument.
void setMinimalAlphaIntensity(float value)Sets the minimum opacity strength of the Material.
void setHeightIntensity(float value)Defines the intensity of the "Height" of the Material.
void setUvSize(float value)Defines the "UV" size of the Material.
void setAlphaCutout(float value)Sets the opacity of the Material texture clipping.
void setSpecular(float value)Defines the intensity of the "Specular" of the Material.
[Texture] getTexture(String entryName)Returns the texture of the Material with name defined in the argument.
[Texture] findTexture(String entryName)Returns the texture of the Material with name defined in the argument.
void setTexture(String entryName, [Texture] texture)Sets the texture of the Material with name and texture defined to be the arguments.
void setTextureFile(String entryName, [TextureFile] textureFile)Sets the Material texture file with name and texture file defined to be the arguments.
void setAlbedo([Texture] texture)Defines the "Albedo" texture of the Material.
void setAlbedo([TextureFile] textureFile)Defines Material "Albedo" texture file.
void setNormalMap([Texture] texture)Sets the "Normal" texture of the Material.
void setNormalMap([TextureFile] textureFile)Sets the "Normal" texture file of the the Material.
void setRoughness([Texture] texture)Defines the texture "Metallic" of the Material.
void setRoughness([TextureFile] textureFile)Sets the Material "Roughness" texture file.
void setMetallic([Texture] texture)Sets the Material "Metallic" texture.
void setMetallic([TextureFile] textureFile)Sets the texture file "Metallic" of the Material.
void setAoMap([Texture] texture)Sets the texture "Ao" of the Material.
void setAoMap([TextureFile] textureFile)Sets the texture file "Ao" of the Material.
void setHeightMap([Texture] texture)Sets the texture "Height" of the Material.
void setHeightMap([TextureFile] textureFile)Sets the Material "Height" texture file.
void setEmissiveMap([Texture] texture)Defines the "Emissive" texture of the Material.
void setEmissiveMap([TextureFile] textureFile)Sets the Material "Emissive" texture file.
void setAlphaMap([Texture] texture)Sets the "Alpha" texture of the Material.
void setAlphaMap([TextureFile] textureFile)Sets the Material "Alpha" texture file.
void reloadEntries()Reload all colors, textures, etc of the Material.
String toJson()Return a JSON data containing all information required to load the material.
Material loadFile(MaterialFile materialFile)Return the MaterialFile passing its MaterialFile as an argument.