i dont get it,
after investigating a bit, i noticed the proble occurs is i change my light setup
this is working, having the same bumpiness on each faces of a cube
[java]
Vector3f lightDir2 = new Vector3f(0.5f, -1.0f, -0.5f).normalizeLocal();
DirectionalLight sun2 = new DirectionalLight();
sun2.setColor(ColorRGBA.Gray);
sun2.setDirection(lightDir2);
main.getSceneNode().addLight(sun2);
Vector3f lightDir3 = new Vector3f(-0.5f, -1.0f, 0.5f).normalizeLocal();
DirectionalLight sun3 = new DirectionalLight();
sun3.setColor(ColorRGBA.Gray);
sun3.setDirection(lightDir3);
main.getSceneNode().addLight(sun3);
[/java]
this ain’t
[java]
lightDir = new Vector3f(-0.5f, -1.0f, -0.5f).normalizeLocal();
sun = new DirectionalLight();
sun.setColor(ColorRGBA.Gray);
sun.setDirection(lightDir);
main.getSceneNode().addLight(sun);
Vector3f lightDir2 = new Vector3f(0.5f, -1.0f, -0.5f).normalizeLocal();
DirectionalLight sun2 = new DirectionalLight();
sun2.setColor(ColorRGBA.Gray);
sun2.setDirection(lightDir2);
main.getSceneNode().addLight(sun2);
Vector3f lightDir3 = new Vector3f(0.5f, 1.0f, 0.5f).normalizeLocal();
DirectionalLight sun3 = new DirectionalLight();
sun3.setColor(ColorRGBA.Gray);
sun3.setDirection(lightDir3);
main.getSceneNode().addLight(sun3);
Vector3f lightDir4 = new Vector3f(-0.5f, 1.0f, 0.5f).normalizeLocal();
DirectionalLight sun4 = new DirectionalLight();
sun4.setColor(ColorRGBA.Gray);
sun4.setDirection(lightDir4);
main.getSceneNode().addLight(sun4);
[/java]
i have created a test case project to download here :
NormalMapTest.zip
i understand that 4 lights the way i set up would lead to lack of nuances in the normal map,
but so much, that it would be inverted on some faces and invisible on others… seems strange to me
can someone enlight me why it is not working with 4 lights ?
thx