Model textures not rendering

I have successfully created my first animated model with blender and exported it. I tried to load the model into the SDK it does not show up in the preview but says it loaded. However , nothing is ported into my project. As a workaround I just copied the files into my scene folder. When I click the preview on my mesh and both the scene file the model shows with the textures. However when I load the model into my app it appears and animates but the entire model is red.

The output from blender is producing


It looks like all of my files are there. The only thing I can think of is I do not have the diffuse and normal maps correct. I’m not sure how to do that in blender. Anyone know how to fix this.

Not sure if multiple materials for one mesh is supported.

Either way I believe the material name should be the same as the mesh it refers to.
Otherwise try converting it to j3o and see what happens.

Or try using the blender loader for jme.

Where can one find this loader and why is the exporter producing multiple textures ?

<cite>@jojoofu said:</cite> Where can one find this loader and why is the exporter producing multiple textures ?

Well if you indeed only have one material the regular ogre exporter will work fine.

What you need to do is open up blender, go into material tab and delete the materials you arent using.
Then rename the material you use to have the same name as the geometry, in your case cowthing.

I’m using three different textures. Can I combine them into one using blender ?

Don’t export everything at once using blender.

In blender, export the textures separately (after uv mapping of course, which I see you’ve already done)
Export the mesh separately

In jme, double click to convert to j3o.

Make a j3m material and attach it to your j3o file.
Note: j3m allows you to take multiple mappings and combine them into one (if that’s what you’re looking for)

Oh yeah, make sure to generate tangents. (Right click your object, tools, gen tan)

had the same problem, models appeared red, but only in linux, in windows they were textured

When I convert the mesh to j3o I get the warning "no material found a file named cowthing.material should be in the same folder. However , blender is making material files for me but none of them share the model name. This is starting to get frustrating.

I have managed to import and convert .obj files with multiple textures into my project and they render properly. It seems to be something with the exports from Blender. I’m using blender 2.6 if that helps.

I believe I found the problem.

Here is the output from my .obj file conversion to j3o. This is the same model I based the blender animation on…

a a a & BrownEyeRedOutline²´¸ ¹ ³?ù¤>(ov>)Sò ¼"
ã>`¢>ægt µ¶·  "Common/MatDefs/Light/Lighting.j3mdSpecularaAmbientaDiffuse
DiffuseMapUseMaterialColorsParallaxHeight GlowColor Shininessº¼¾ÀÃÄÅÇ + aVector4SpecularMaterialSpecular» ? ? ? ?€ ) aVector4aAmbientMaterialAmbient½ ?LÌÍ?LÌÍ?LÌÍ?€ ) aVector4aDiffuseMaterialDiffuse¿ ????€ ! Texture2D
DiffuseMapÁ Á C Scenes/BrownEyeRedOutline.jpg TrilinearRepeatRepeat " Scenes/BrownEyeRedOutline.jpg aBooleanUseMaterialColors FloatParallaxHeight=LÌÍ aVector4 GlowColorÆ ?€ - Float ShininessMaterialShininessAH $ CowBlackandWhiteÉËÏ ›Ð Ê?aYÖ@è@ᜠ¼Ký<
˜¿¡| ÌÍÎ  "Common/MatDefs/Light/Lighting.j3mdSpecularaAmbientaDiffuse
DiffuseMapUseMaterialColorsParallaxHeight GlowColor ShininessÑÓÕ×ÚÛÜÞ + aVector4SpecularMaterialSpecularÒ ) aVector4aAmbientMaterialAmbientÔ ) aVector4aDiffuseMaterialDiffuseÖ ! Texture2D
DiffuseMapØ Ø A eScenes/CowBlackandWhite.jpgÙ TrilinearRepeatRepeat eScenes/CowBlackandWhite.jpg aVector4 GlowColorÝ greyàâæ ¦ç á?=³? è1?%˜] ¼)!f¿P9¦ÀXÆ ãäå  "Common/MatDefs/Light/Lighting.j3mdSpecularaAmbientaDiffuse
DiffuseMapUseMaterialColorsParallaxHeight GlowColor Shininessèêìîñòóõ + aVector4SpecularMaterialSpecularé ) aVector4aAmbientMaterialAmbientë ) aVector4aDiffuseMaterialDiffuseí ! Texture2D
DiffuseMapï ï 5 Scenes/grey.jpgð TrilinearRepeatRepeat Scenes/grey.jpg aVector4 GlowColorô Lamp÷û

As you can see (Despite the binary format lol) The texture and diffuse settings where converted over.

The same output from the conversion of this model from the mesh.xml file to mesh.j3o.

BrownEyeRedOutline“— k˜ ”•– 4 !Common/MatDefs/Misc/Unshaded.j3mdColor™ aVector4ColorColorš
?€ ?€ ! CowBlackandWhiteœ x¡ žŸ 4 !Common/MatDefs/Misc/Unshaded.j3mdColor¢ grey¤¨ …© ¥¦§ 4 !Common/MatDefs/Misc/Unshaded.j3mdColorª

It seems to be using an unshaded material and only a color format.

or could it be my file is vexed by the devil :>

<sharedgeometry vertexcount="666>

Same suggestion as in the other thread, you mess about with the assetmanager seemingly not knowing how it works.