Skip navigation links

Package com.jme3.scene.plugins.ogre.matext

com.jme3.scene.plugins.ogre.matext allows loading of more advanced Ogre3D materials that use "base" materials to abstract functionality.

See: Description

Package com.jme3.scene.plugins.ogre.matext Description

com.jme3.scene.plugins.ogre.matext allows loading of more advanced Ogre3D materials that use "base" materials to abstract functionality.

E.g. example of an Ogre3D material instance:
import * from "materials/baselighting.material" material MyMaterial : BaseLightingMaterial { set_texture_alias MyTexture textures/mytex.png }

Usage

Example code of loading the above material:
MaterialExtensionSet matExts = new MaterialExtensionSet();
MaterialExtension baseLightExt = new MaterialExtension("BaseLightingMaterial",
"Common/MatDefs/Light/Lighting.j3md");
baseLightExt.setTextureMapping("MyTexture", "m_DiffuseMap");
matExts.addMaterialExtension(baseLightExt);

OgreMaterialKey matKey = new OgreMaterialKey("materials/mymaterial.material");
matKey.setMaterialExtensionSet(matExts);
MaterialList ogreMats = assetManager.loadAsset(matKey);

Skip navigation links