Hi, I see a lot of thread about topic like this, but there’s none about the problem that I try to solve, I have a simple model with a material with a texture in .png format in blender 2.59 (the models in blender 2.63 i can’t import from JME3), when I try to import in JME3 with the button “Import Model”, it display a message, “Can’t import this file”. If I remove the texture, the import work fine. I need to import the .blend file model with material and textures in JME3. Can anybody help me?
I’ve never had problems with importing models from blender to jme so i can only tell you the way i do it:
-create model in blender(2.63)
-create uv mappings
-pain uv in photoshop
-copy .blend and png file in the assets folder and dubbleklick them in the IDE/right klick convert to j3o
(if you need help with UV mapping have a look at http://cgcookie.com/blender/2010/04/29/modeling-feathery-wings/ ~20:00min)
I only use 1 map (no alpha) for my models unlike in the video. Im not sure wether it will work the same way.
you may also want to have a look at the ogre exporter for blender.
if i good remember, if you use “Import Model”, then texture need to be in the same folder where .blend file is.
myself i don’t use “Import Model”, just past files to assets and convert ogre->j3o or blend->j3o and apply j3m file there.
Thanks for all, I have success to import models from JME3, but I must make the models in Blender 2.59, the models that I make in blender 2.63 I can’t import from JME3, I don’t know why.
probably you need to update to the nightly because 2.63 uses BMesh’s. You should be able to use 2.61/2.62 fine though
Hi, thanks you for all, I modeling in blender 2.59, in 2.6 I can’t import in JME, I currently have a new problem, let me show some images
In Blender
Importing in JME
http://img3.uploadhouse.com/fileuploads/16587/1658715376608c610bf47d109966fdb5d0aed0a2.png
JME Proyect running
http://img5.uploadhouse.com/fileuploads/16587/16587162481e32785ed95dc2d8c66d8895f93e83.png
The code that I using is this
[java]
public class Main extends SimpleApplication {
private Spatial com1;
public static void main(String[] args) {
Main app = new Main();
app.setShowSettings(false);
app.start();
}
@Override
public void initialize() {
super.initialize();
settings.setTitle(“Com 1”);
}
@Override
public void simpleInitApp() {
settings.setFullscreen(true);
com1 = assetManager.loadModel(“Models/Monkey3/Monkey3.j3o”);
DirectionalLight sun = new DirectionalLight();
com1.rotate(0.1f, 0.001f, 0.01f);
rootNode.attachChild(com1);
sun.setDirection(new Vector3f(-1.0f,0,1.5f).normalizeLocal());
sun.setColor(ColorRGBA.White);
rootNode.addLight(sun);
}
@Override
public void simpleUpdate(float tpf) {
com1.rotate(0.001f, 0.001f, 0.001f);
}
@Override
public void simpleRender(RenderManager rm) {
//TODO: add render code
}
}
[/java]
What the model not show correctly? What should I do so that the material is loaded into the model and looks like in blender? Do I need additional code?
some idea?
Thanks
Bye.
@proteo1903 , try to convert to Ogre, then to j3o.
Also, you can try my character model with normal maps from here:
http://code.google.com/p/jme-glsl-shaders/
Also, if you use JME Lighting Material, so possibly you will need to invert Green channel of your normal map texture.