obi48
August 23, 2011, 6:35pm
1
Hi I have a problem with loading textures from 3ds max (Rendering/render to texture) to my models
here is my first try
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
obi48
August 25, 2011, 5:37pm
2
OK I have found a solution
chacha
February 1, 2012, 8:28am
3
hi! may i know what solution you have had found? thanks
obi48
February 1, 2012, 3:24pm
4
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