Can't convert blend to j3o

Hi,



my blender model doesn’t convert in j3o object, and I absolutely don’t know why.

It contains a normal map with a texture.

If I import the model without these two textures all goes fine.

Here’s the blend if someone can check: http://dl.free.fr/rAHgwicYX



Thanks

Some error output would be interesting. The textures have to be in the same or a sub folder of the model folder if you use the Model Import Tool. Best way is to first put all assets in the assets folder and then edit the models directly in that folder, referencing textures from that folder and also saving the blend file there (it will be excluded on distribution) This way you make sure all textures can be read and all assets are available.

Try to remove a material in your model and convert it.

Also, remove the light and the camera.

@mifth said:
Try to remove a material in your model and convert it.
Also, remove the light and the camera.

.. stop confusing him, from your model conveyer thingy I know you also didn't understand this bit :P

heeeyyy… I saw his model. It contains a camera and some textures. I just said my opinion. :slight_smile:

Thanks for your replies,



sorry for the error output, with the blend of the link above there’s an error with the mapping coordinates that must be set to UV.

Once this error fixed I got this error:



Trying to save asset that has not been loaded before or does not support saving!

Could not locate saved file.



So I putted the blend and the textures in one asset directory edited my model in blender from there, even removed the camera and the lamp.

I always get the error mentionned earlier.



Edit: if I remove the material as suggested, there’s no more textures.

try to make a new “j3m” material and set it to your j3o model.

It sounds like you have a synch error with this issue


Trying to save asset that has not been loaded before or does not support saving!


I've had this happen when using blender and .blend files while the SDK was opened...

Also some types of generated textures are not supported in JME... Although you did say you UV mapped them

i save my blend models to j3o. no problems. Give us your log, please.



My example:

[java]

Node test = (Node) assetManager.loadModel("Models/Etest.blend");



// Write to j3o

String str = new String("assets/Models/Etest.j3o");

str.replaceAll("/", File.separator);

File MaFile = new File(str);

MaFile.setWritable(true);

MaFile.canWrite();

MaFile.canRead();





try {

BinaryExporter.getInstance().save(test, MaFile);



} catch (IOException ex) {

System.out.println("Baddddd");



}

[/java]

@kbender88 said:
I've had this happen when using blender and .blend files while the SDK was opened...

Yeah, this is most likely a file locking issue, windows 7 has become stricter in that respect (multiple applications accessing one file).

Hi there and thank you all,



I’m now able to convert the blend when I edit it from the asset directory without mifth’s code but I don’t know why it didn’t works sooner.



I ran into another problem, I can’t apply a normal map + texture, here’s the log:



Loading obejct: Cube.001

Importing mesh.

Reading texture from file: //…mine_uvmap.png

Reading texture from file: //…mine_uvmap.png

… Many many times the same line…

Reading texture from file: //…mine_uvmap.png

Loading material.

Reading texture from file: //mine_uvmap.png

Materials name: {0}

Attetion! Many textures found for material: Material.001. Only the first of each supported mapping types will be used!

Child (Cube.0011) attached to this node (Cube.001)

Cube.001: (0.0, 0.0, -0.0)–> null

Child (Cube.001) attached to this node (Models/Spaceships/spacemine2.blend)



Where mine_uvmap.png is actually the normal map.



I can only apply 1 texture and without normal mapping it looks a little too much… squary

I went down this road, and the answer i got was to use j3m materials…

@kbender88 said:
I went down this road, and the answer i got was to use j3m materials...


Yeah, I had to conver too to use jME Materials, I couldn't use directly the materials referenced.

As the blender importer tries to support many options in blender, wrong options can lead to no results. Maybe @Kaelthas can shed some light on the ideal texture settings in blender to make sure the model gets exported correctly (with diffuse, normal and specular maps). Also make sure to read the wiki page on the blender exporter.

Even with material wizard I can’t get it working.

My model is still black (in the scene composer as well).

I can, both from blender and with a j3m :stuck_out_tongue:

With my model?