Map size and Light source

Hi i made some huge map and now i notice i get no light ,its actually pretty simple

//viewPort.setBackgroundColor(ColorRGBA.LightGray);
initKeys();
DirectionalLight dl = new DirectionalLight();
  AmbientLight amb =new AmbientLight();
dl.setDirection(new Vector3f(0, -5, 0).normalizeLocal());
amb.setColor(ColorRGBA.Orange);

Material mat1 = new Material(assetManager,  // Create new material and...
"Common/MatDefs/Misc/Unshaded.j3md");
mat1.setColor("Color", ColorRGBA.White);
Material mat2 = new Material(assetManager,  // Create new material and...
"Common/MatDefs/Misc/Unshaded.j3md");
mat2.setColor("Color", ColorRGBA.Red);


rootNode.addLight(amb);
rootNode.addLight(dl);
player = (Node) assetManager.loadModel("Models/Oto/Oto.mesh.xml");
player.setMaterial(mat1);
player.setLocalScale(0.5f);
rootNode.attachChild(player);
control = player.getControl(AnimControl.class);
player.setLocalTranslation(500,3,500);
control.addListener(this);
channel = control.createChannel();
channel.setAnim("stand");
viewPort.setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f));


Box box = new Box(1,1,1);
refer = new Geometry("Item", box);
refer.setLocalScale(1, 3, 1);
refer.setMaterial(mat2);

rootNode.attachChild(refer);
refer.setLocalTranslation(500, 1, 520);


Box floorBox = new Box(1,1,1);
floor = new Geometry("Item", floorBox);
  Material mat = new Material(assetManager,  // Create new material and...
"Common/MatDefs/Misc/Unshaded.j3md");
floor.setMaterial(mat);
mat.setColor("Color", ColorRGBA.Yellow);
floor.setLocalScale(1000, 0.1f, 1000);
floor.setLocalTranslation(1000, -100, 1000);
rootNode.attachChild(floor);
  


  // Disable the default flyby cam

flyCam.setEnabled(false);
//create the camera Node
camNode = new CameraNode(“Camera Node”, cam);
//This mode means that camera copies the movements of the target:
camNode.setControlDir(CameraControl.ControlDirection.SpatialToCamera);
//Attach the camNode to the target:
player.attachChild(camNode);
//Move camNode, e.g. behind and above the target:
camNode.setLocalTranslation(new Vector3f(player.getLocalTranslation().getX(),player.getLocalTranslation().getY()+ 10,player.getLocalTranslation().getZ() -20));
//Rotate the camNode to look at the target:
camNode.setLocalRotation(player.getLocalRotation());
//camNode.lookAt(player.getLocalTranslation(), player.getLocalTranslation());

Note: “Unshaded” is not a lit material… it’s unshaded.

wait a sec ,it was a camera just noticed…i may spend a day in fixing it ,then post it here and notice what i messed a second later eeeh sorry

Still im pretty sad for camera get drunk on camNode.lookAt(player.getLocalTranslation(), player.getLocalTranslation()); and dont know how to quick fix it,but its no soo important,i worked around it

Well, when you just use random nonsense for the second parameter then you are bound to get strange results.

http://javadoc.jmonkeyengine.org/com/jme3/scene/Spatial.html#lookAt-com.jme3.math.Vector3f-com.jme3.math.Vector3f-