Blender 2.78c to JME 3.1, export and light problems [SOLVED]

Dear experts, I export now my model from blender into JME and am stuck with three issues:

  1. When converting blend file in JME to j3o, I get this error in JME console for every texture I use:

The texture BedroomFloor has linear color space, but the material parameter DiffuseMap specifies no color space requirement, this may lead to unexpected behavior.
Check if the image was not set to another material parameter with a linear color space, or that you did not set the ColorSpace to Linear using texture.getImage.setColorSpace().

  1. Then, when I open the scene by “Edit in Scene Composer”, and press button “Camera light”,
    scene is displayed almost ideally (in blender I use ambient light):

    The only problems is the garage texture which is displayed with something ike waves over it. If you know the reason, please let me know, but this one is minor problem (worst I redo the texture completely):

  2. But if I add Ambient Light to the scene in blender, all objects look either mid dark, or very overlighted.

    I tried to change Ambient Light settings, but using following code:
    AmbientLight ambient = new AmbientLight(ColorRGBA.White.mult((increase or decrease floating value here)));
    app.getRootNode().addLight(ambient);

But it also did not help…
If needed, I can upload the blend file as well…

P.S. could it be that the last issue is mainly for the textures without UV maps?
Are standard blender textures not supported or I miss some settings?
(or there is completely different reason?)

(though I see UV mappped textures on the floor are in the last image also at least slightly overlighted)

Update: Dear JME experts, thanks a lot for your advices! I found in the end the reason to main questions,
and it was as usually own wrong application:

  1. AmbientLight - casts no shadows at all, that is why if applying only this light, or applying this light stronger as others, it was blending the scene, showing all as unshaded.
  2. My light vector was wrong, I though of vector as position in 3d space, but not as a real vector.
    Here, I oversee “Math for Dummies” link in the forum. But now I am better armed
  3. I added directional light, with the same direction as the camera has, plus added a far less brighter backlight, to make shadows softer, and this looks perfect now.

two cents: I recently exported exactly from 2.78c and had another issue: the point light was always positioned at origin despite set at some other point in blender. So I gave up in the end, and just added light programmatically (considering it’s even more versatile this way). Maybe format had been adjusted, dunno.

I provide convenient tools to work with lights in a scene in the my editor :slight_smile:

2 Likes

Hi Javasabr,

thanks for the tool.
I tried to use it, now the textures are not loaded at all :smiley:
And there is also problem with light:
If I look at the model in SSE, and add there light with relatively dark color, then model looks fine.
Then I save and open same in JME Scene editor, and there the scene is completely black.

I think I will have to start from very beginning, trying to load any small object, but to see what is in the material or light with causes the whole issue. I wonder if I am the only one who has it

This seems to be a bug specific to converting or Blender importing. It shows up as soon as you pack an image in blender. Using Ogre export will eliminate the warning.
Install the 0.6.0 Ogre script found here,
https://jmonkeyengine.github.io/wiki/jme3/advanced/ogrecompatibility.html
not the one in the SDK. The one in the SDK is bugged.

For some help on settings,
https://jmonkeyengine.github.io/wiki/jme3/advanced/3d_models.html#creating-models-and-scenes

No idea what the wave is from.

I found that a Directional light with a very low Ambient light setting like .02 or so gives a better light.
https://jmonkeyengine.github.io/wiki/jme3/advanced/light_and_shadow.html#directionallight

1 Like