Can't load texture from 3dsmax (render to texture) correctly

Hi I have a problem with loading textures from 3ds max (Rendering/render to texture) to my models







here is my first try :slight_smile: i can see my texture but it’s not the desired solution :x



and here is the code: [java]<ul>Spatial house = assetManager.loadModel(“Models/Buildings/Middleagehouse/obj0.mesh.j3o”);

Material mat = new Material(assetManager, “Common/MatDefs/Misc/ColoredTextured.j3md”);

mat.setTexture(“m_Color”, assetManager.loadTexture(“Models/Buildings/Middleagehouse/obj0.mesh.png”));

house.setMaterial(mat);

//house.scale(1.05f, 1.05f, 1.05f);

house.rotate(0.0f, -3.0f, 0.0f);

house.setLocalTranslation(0.0f, 6.0f, -2.0f);

rootNode.attachChild(house);</ul>[/java]



please help me to find a solution for my problem :slight_smile:

OK I have found a solution

hi! may i know what solution you have had found? thanks :slight_smile:

Hi if you have a full textured model in your CAD (ex. blender, 3dsmax), then you have to export with ogre exporter, you get a file in xml format, with textures. So it’s no need to export the textures from CAD manually. I can give you an example in 3dsmax how to export it correctly and for blender I found one in jme-tutorials:

https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B9hhZie2D-fENDBlZDU5MzgtNzlkYi00YmQzLTliNTQtNzZhYTJhYjEzNWNk&hl=en_US

1 Like