All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jme3.scene.plugins.ogre.matext.package.html Maven / Gradle / Ivy

The newest version!









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);





© 2015 - 2024 Weber Informatics LLC | Privacy Policy