Material Girl, in a material world

Well… getting a little frustrated with materials…



I created a .j3m file and loaded it as suggested on the tutorial



//something like so

myGeometry.setMaterial(assetManager.loadMaterial(“Materials/SimpleBump.j3m”));



this is what i get

com.jme3.asset.AssetLoadException: An exception has occured while loading asset: Materials/concrete.j3m

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:275)

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:316)

at mygame.Main.simpleInitApp(Main.java:98)

at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:231)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:129)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)

at java.lang.Thread.run(Thread.java:722)

Caused by: java.io.IOException: Material instances must be loaded via MaterialKey



This is bothering me… but really…

I would rather make my materials with blender and import them already on my models but i’m having trouble finding textures that are supported… i have a large structure and i would rather just define a nice stone material with some bump mapping rather than having to UV map all of the buildings and rooms etc, etc…



So if anyone knows about this mysterious “MaterialKey” or has a good way to do textures from blender into JME that doesn’t involve intense amounts of UV mapping i would greatly appreciate it…

jme doesn’t have Materials/concrete.j3m are you trying to create a custom shader and don’t know how to import it ?

i made concrete .j3m using the material editor

Given your stack trace:

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:316)

at mygame.Main.simpleInitApp(Main.java:98)



It seems you are calling loadAsset() instead of loadMaterial()… which is the problem.

1 Like

i’m officially retarded… that is all