Black textures after loading model into game, although they look good in preview window

Hi everyone,

I created a simple character model in Blender with UV-mapped texture. It also imports correctly into the JMonkeyEngine, with warnings, however:

Unsupported pass directive: alpha_to_coverage
Unsupported pass directive: colour_write
Unsupported pass directive: depth_check
Unsupported pass directive: depth_func
Unsupported pass directive: depth_write
Unsupported pass directive: illumination_stage
Unsupported pass directive: light_clip_planes
Unsupported pass directive: light_scissor
Unsupported pass directive: normalise_normals
Unsupported pass directive: polygon_mode
Unsupported pass directive: scene_blend_op
Unsupported pass directive: shading
Unsupported pass directive: transparent_sorting
Unsupported texture_unit directive: scale
Unsupported texture_unit directive: colour_op

But in the preview window of the JME IDE the model’s texture is correct.
In the game the models then have a black texture, which is lighted (model is not completely black like a black whole).
I’m using the latest stable library (2014-06-12) and Eclipse (if that matters).

Other models I imported with a simple material look ok.

Does anyone have a hint?


Look on:

  1. there is any ligth on your scene ?
  2. is the node of this light attached also attaching your model ?
  3. try to build your own materials based on the material you exported, you will always get better results.

Yes, there is a light. The other model I loaded worked. Basically, I just exchanged the code that loads the model and the code that triggers animations cause they have other names. And the character is not pitch black, instead it has a black, illuminated material.


Ok, I now got a workaround: Instead of loading the .j3o file, I’m loading the .mesh.xml file of the output of the blender orgre exporter (and I think I changed the name of the material as well). However, the correct texture shows up now.


The model importer window has a bug where it doesn’t clear the cache, it might be that this is your issue - you still see an older version of the model in the importer window. Maybe you made a change in the blend file which causes the issue. When you export via ogre the exporter changes the output to be compatible to live rendering (as far as possible), possibly dropping those changes - which might be why your model works then.

I’m rather sure that I worked with the same version of the blend file. Indeed I noticed that I have to restart the IDE sometimes to see the current model. Or do I have to delete all the imported files and import them again to be sure that the window displays the correct model version?


No, the cache only refers to the imported model in the import window.

Was this bug fixed in 3.1 ?