Loading materials for .blend models

Ok after playing around with ogre and .blend loader for several days. I found right click and converting the .blend to j3o is the best way to go. I have managed to load the model and animations correctly with out having to do anything special which is great. But now I’m stuck at the next step…

loading the material an texture. even though i created a new material in blender and added a image texture to the material. It does not seem to come up when i loaded it jme3. Do i need to load the texture a different way?

DO i need to link the texture to the j30 file somehow?

any help would be greatly appreciated…

thanks

I had similar problems and found the process worked with a little fiddling in Blender first. I didn’t have animations just a very simple model but understanding the coordinate systems seemed to have helped a bit. The process I found to work was to

1 - orient my model and set the centre of the object to a bottom corner. (by orient I mean understand the next step better and orient accordingly)

2 - Export my model (to assets/Textures folder) to a .obj selecting the correct plane directions (I think it was y up/ x forward for me) Initially I removed all other objects from the file but later discovered that this was not necessary.

3 - Texture you are using is in the same folder as above (I found it didn’t need to be named the same as the .obj )

4 - Load the model and create the material/texture and attach to model Should work now

For me I think the issue was that I wasn’t getting the orientation of the model correct which was upsetting the material when loaded. My symptoms were material only visible from one direction at a time with lighting based material but looked acceptable with ambient lighting. All this info is in the tutorials but I skipped over it thinking defaults would work fine.

I hope this helps in some way.

How have you textured the model in blender? From experience I know it makes a difference.

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:intermediate:multi-media_asset_pipeline#create_textures_and_materials

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender

Hi pspeed
I went in to the material tab for the object and added a new material .
under Suface tab i selected Diffuse BSDF and color i set to image Texture and then selected the packed image file i created in the UV editor
now if i go in to the texture tab its automatically got image texture selected with same packed image i selected before
the model looks great in blender including in rendered mode

however i save the file, copy it to my jme3 project Models folder then right click and convert to j3o, when i look at it now i don’t see any of the textures…
So should i be applying the texture differently in blender?
Or do i need to do something in jme3 to add the texture?

Interestingly if i export the model using ogre exporter i do get the texture but I have problems with animations which i don’t get with using the .blend file directly

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:intermediate:multi-media_asset_pipeline#create_textures_and_materials !!