.obj file textures

I’ve had the same problem with JME3 for almost a year now. I cant seem to install ogreXML for blender even using the JME3 plugin so i’ve given up on that. I am trying to load .obj objects and set their textures directly using java code (this will suit my purpose better anyways). I would like to kno if this is possible at all and if not, what model format do i have to use in order to set textures.

here is a sample code of my most recent failed attempt:

Material mat_default = new Material(

assetManager, “Common/MatDefs/Misc/ShowNormals.j3md”);

mat_default.setTexture(“m_Color”, assetManager.loadTexture(“Textures/Sports_equipment/soccerFootball.jpg”));

this is part of the error I get:

Material parameter is not defined: m_Color.

Please i could really use some help on this and it will be greatly appreciated



mat_default.setTexture("ColorMap", texture);


where texture is the Texture resource that you get from loadTexture.

check this link also:


your material definition ShowNormals is for debugging and has no parameters.

instead of


try using this for unlit material


and assign your texture to the “ColorMap” parameter

or for a properly lit material


and assign your texture to the “DiffuseMap” parameter



Material mat_default = new Material(

assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);

mat_default.setTexture(“ColorMap”, assetManager.loadTexture(“Textures/Sports_equipment/soccerFootball.jpg”));


Thanks for the quick reply guys. Although I have not been able to solve the problem, the information as been really helpful. am going to be working on something else and come back to this problem later. thanks for the help.