Hello all,
I am using Directional light with a common lighting material.
Ambiant works fine but directional is not showing at all.
I am using 3.1 beta. Is directional light even supported on android?
(works fine on desktop)
Box b = new Box(1, 1, 1);
Geometry geom = new Geometry("Box", b);
Material mat = this.assetManager.loadMaterial("Materials/blueOre.j3m");
geom.setMaterial(mat);
rootNode.attachChild(geom);
DirectionalLight l = new DirectionalLight();
l.setColor(ColorRGBA.White.mult(3));
l.setDirection(new Vector3f(0.5973172f, -0.16583486f, 0.7846725f).normalizeLocal().negate());
//l.setDirection(new Vector3f(-1, -1, -1));
rootNode.addLight(l);
AmbientLight al = new AmbientLight();
al.setColor(ColorRGBA.White.mult(6));
rootNode.addLight(al);
And the material:
Material MyMaterial : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters {
Specular : 1.0 1.0 1.0 1.0
Diffuse : 1.0 1.0 1.0 1.0
UseMaterialColors : true
ParallaxHeight : 0.05
Ambient : 0.2 0.2 0.2 1.0
Shininess : 30.0
DiffuseMap : Flip Repeat Textures/Blue Ore/12529-diffuse.jpg
SeparateTexCoord : false
VertexLighting : false
EnvMapAsSphereMap : false
SteepParallax : false
NormalMap : Flip Repeat Textures/Blue Ore/12529-normal.jpg
SpecularMap : Flip Repeat Textures/Blue Ore/12529-specstrength.jpg
}
AdditionalRenderState {
FaceCull Back
Wireframe Off
DepthWrite On
PolyOffset 0.0 0.0
AlphaTestFalloff 0.0
Blend Off
PointSprite Off
ColorWrite On
DepthTest On
}
}