Hello,
I'm experiencing some strange flickering / noise on a plane loaded from a 3ds. I'm using the following code:
package papirgutt.tests;
import papirgutt.Level;
import com.jme.app.SimpleGame;
import com.jme.light.LightNode;
import com.jme.light.PointLight;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;
import com.jmex.physics.util.SimplePhysicsGame;
public class TestLevel extends SimplePhysicsGame {
private Level level;
@Override
protected void simpleInitGame() {
// TODO Auto-generated method stub
try {
level = new Level("Demo", "demo2", "mountain", new Vector3f(57f, 6f, 38f), 5, getPhysicsSpace());
rootNode.attachChild(level);
} catch (Exception e) {
System.out.println("Could not load level: " + e.getMessage());
System.exit(1);
}
}
protected void simpleUpdate()
{
level.getSkybox().setLocalTranslation(cam.getLocation());
}
public static void main(String[] args)
{
TestLevel app = new TestLevel();
app.start();
}
}
The code for loading the 3ds file (from papirgutt.Level) is pretty straight forward:
/**
* Load the map Spatial
*
* @throws IOException
*/
private void loadMap() throws IOException
{
URL mapLoc = Level.class.getClassLoader().getResource(MAP_LOC + "/" + mapfile + ".3ds");
URL texLoc = Level.class.getClassLoader().getResource(TEX_LOC);
ByteArrayOutputStream mapStream = new ByteArrayOutputStream();
MaxToJme maxToJmeConverter = new MaxToJme();
maxToJmeConverter.setProperty("texurl" , texLoc);
maxToJmeConverter.convert(new BufferedInputStream(mapLoc.openStream()), mapStream);
map = (Spatial)BinaryImporter.getInstance().load(new ByteArrayInputStream(mapStream.toByteArray()));
// Rotate to the correct pos
map.getLocalRotation().fromAngleAxis(FastMath.PI * -.5f, new Vector3f(1,0,0));
map.setModelBound(new BoundingBox());
map.updateModelBound();
attachChild(map);
setModelBound(new BoundingBox());
updateModelBound();
}
Here's a screenshot of what happens:

The gray plane in question is untextured and should come out white. If I turn off lighting with L it renders correctly (but without lights ofcourse)... Also, the noise "updates" itself only when I move the camera...
I'm sure someone has experienced this before? I've experienced something similar on other models and it seems the problem occurs on triangles which are facing directly up against the positive y-axis or against the positive z-axis. Might also affect triangles facing the positive x-axis...
Thanks,
joh