Hi @nehon
Here my test case, just zoom in out using your mouse wheel in this angel and you will see the artefacts. Best thing I could reproduce the issue on the same distance from zero position than in my room without any special texture or object.
package mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.input.ChaseCamera;
import com.jme3.light.PointLight;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.FastMath;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.renderer.queue.RenderQueue;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.shadow.CompareMode;
import com.jme3.shadow.PointLightShadowRenderer;
/**
* test
*
* @author normenhansen
*/
public class Main extends SimpleApplication {
public static void main(String[] args) {
Main app = new Main();
app.start();
}
@Override
public void simpleInitApp() {
Box b = new Box(1, 1, 1);
Geometry geom = new Geometry("Box", b);
Material mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
geom.setMaterial(mat);
mat.setColor("Diffuse", ColorRGBA.White);
mat.setColor("Specular", ColorRGBA.White);
mat.setFloat("Shininess", 64f);
geom.setMaterial(mat);
geom.setLocalTranslation(-12, 0, 5);
geom.setShadowMode(RenderQueue.ShadowMode.CastAndReceive);
rootNode.attachChild(geom);
b = new Box(1, 1, 1);
geom = new Geometry("Box", b);
mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
geom.setMaterial(mat);
mat.setColor("Diffuse", ColorRGBA.White);
mat.setColor("Specular", ColorRGBA.White);
mat.setFloat("Shininess", 64f);
geom.setMaterial(mat);
geom.setLocalTranslation(-8, 0, 5);
geom.setShadowMode(RenderQueue.ShadowMode.CastAndReceive);
rootNode.attachChild(geom);
b = new Box(0.25f, 1, 0.25f);
geom = new Geometry("Box", b);
mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
geom.setMaterial(mat);
mat.setColor("Diffuse", ColorRGBA.White);
mat.setColor("Specular", ColorRGBA.White);
mat.setFloat("Shininess", 64f);
geom.setMaterial(mat);
geom.setLocalTranslation(-9.5f, 0, 5);
geom.setShadowMode(RenderQueue.ShadowMode.CastAndReceive);
rootNode.attachChild(geom);
ChaseCamera camera = new ChaseCamera(getCamera(), geom, getInputManager());
camera.setRotationSpeed(3);
camera.setDefaultHorizontalRotation(-40 * FastMath.DEG_TO_RAD);
camera.setDefaultVerticalRotation(25 * FastMath.DEG_TO_RAD);
camera.setMinDistance(4);
camera.setDefaultDistance(4.5f);
camera.setMaxVerticalRotation(90 * FastMath.DEG_TO_RAD);
camera.setMinVerticalRotation(-90 * FastMath.DEG_TO_RAD);
PointLight light = new PointLight();
light.setRadius(10);
PointLightShadowRenderer pointLightShadow
= new PointLightShadowRenderer(getAssetManager(), 512);
pointLightShadow.setLight(light);
pointLightShadow.setShadowIntensity(1f);
pointLightShadow.setShadowCompareMode(CompareMode.Hardware);
getViewPort().addProcessor(pointLightShadow);
light.setPosition(new Vector3f(-10f, 0, 5));
getRootNode().addLight(light);
}
@Override
public void simpleUpdate(float tpf) {
//TODO: add update code
}
@Override
public void simpleRender(RenderManager rm) {
//TODO: add render code
}
}
I hope you see the same, else hmmmm, yeah no clue then⦠I have it on my laptop and on my desktop. And yeah a orbiting camera as usual to make your life little easier to inspect it.
EDIT: If you short the āthinā object to letās say 0.5f then you see as well that this small object between the two bigger cubes is the one which produce those artefacts on the surface, as the artefacts do have the same height. Hope you understand what I mean.