Can’t load texture from 3dsmax (render to texture) correctly (4 posts)

  • Profile picture of obi48 obi48 said 9 months ago:

    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:

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

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

  • Profile picture of obi48 obi48 said 9 months ago:

    OK I have found a solution

  • Profile picture of chacha chacha said 3 months, 2 weeks ago:

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

  • Profile picture of obi48 obi48 said 3 months, 2 weeks ago:

    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