Textures in blender importer

@mifth: Thanks. So it seems really like a little issue.

@mifth

Your model has no texture added to the material. I have no idea why you have the texture when importing the model from Ogre.



@ceipheren

Could you upload the model of the ship ?? And please pack the texture in the blender file - it would be easier for me to have one file :wink:

@Kaelthas I assigned a j3m Material with the texture. Try to assign any texture to a converted blender model and you will get the same issue as we have. If you want I can make a video.

Hmm I never tried this way.

I’ll need to check this out.

@Kaelthas: here you go:



http://www.file-upload.net/download-4347540/ship.zip.html



I’m not familiar with including textures into blender so I’ve added a snippet that demonstrates how I import that model.



greetz



ceiprhen

In the file you gave me, the ship had no material applied at all.

I have added the material and applied ypur texture.

Everything loaded fine then.

So do I need at least a default material in the blender?



Because I want to change the materials sometimes. That’s why I’m using code like the snippet mentioned in the zip-file.

I guess that means UV coordinates are not loaded if the model has no material. But many users assign materials to the models manually and missing UV will cause the model to render incorrectly.

Yeah, I suppose something is with UV too. As I said 10 posts above. :slight_smile:

Thanks, I created a new issue for this:

http://code.google.com/p/jmonkeyengine/issues/detail?id=495



@Kaelthas: I strongly recommend taking a look at our current issue list for Blender before adding new features. Remember that fixing bugs is more important than feature additions. Currently there are two high-priority bugs on the list, is there any chance you can take a look at them?

You can use this link to view issues assigned to you. I’ve sorted them by priority for your convenience.

http://code.google.com/p/jmonkeyengine/issues/list?can=2&q=label:Product-jME3%20owner:Kaelthas_Spellsinger@o2.pl&sort=priority

I made a fix today that will add the UV coordinates to the model even if the material is not applied and the default one is used.



The model is being loaded correctly with the change. Please guys check out if you can now set yur own texture :slight_smile:

If not then we’ll search further :wink:

2 Likes

Thumbs up. Works fine.

Thanks a lot!

@Kaelthas , sorry for a long delay. I have the same issue still. With latest nightlies.



http://i.imgur.com/2UEwg.png



I load models with such a way:

[java]

Spatial char_boy = assetManager.loadModel(“Models/LightBlow/jme_lightblow.blend”);

Material mat = assetManager.loadMaterial(“Materials/LightBlow/Shading_System/LightBlow_ibl.j3m”);

char_boy.setMaterial(mat);

FixedTangentBinormalGenerator.generate(char_boy);

rootNode.attachChild(char_boy);

[/java]



Textures should be like here: http://dl.dropbox.com/u/26887202/123/ShaderBlow_03.jpg

Can u provide me with the blend file and j3m file?

I think this one needs debugging.

@Kaelthas , ok i did an example project.



http://dl.dropbox.com/u/26887202/123/jme_blender/Blender_model.zip

@Kaelthas , is there any news about the issue for blender UVs?

Sorry,

I barely had time recently to do much in this subject.



But I have loaded the model. It beaves strange. The textures appear or disappear depending on the camera position. When I go far from the model it turns black like the textures were there but when I get close again it returns to its normal grey colors.



Maybe there are some rendering settings that need to be set ?

I’ll try to move the issue as soon as possible but please be patient. Recently I have been working even during the weekend so very few time was left to do anything.



But I’m sure there is a solution to this problem :wink:

Thank you man! I just checked that you did not forget it.

I’m patient. :slight_smile: But i’m asking because i use blender models in production.



Edited: I did not make any additional rendering settings. Everything worked with these settings.