Hello, I know I posted the same problem yesterday.
but I did not get any solution for my problem, please help me I’m stack with this problem for 3 days now.
some of you have asked me to put a fully working demo, so I did.
here is the full program, I put it into one java file and remove all the extra stuff.
It will work if you just copy and paste the everything into Main.java file, but you’ll need a texture to test it, you can use your own texture but, I have got my texture from :
http://freestocktextures.com/texture/id/593
It’s in very high resolution. Here is a 250x250 and 50x50 version :
code:
[java]import com.jme3.app.SimpleApplication;
import com.jme3.light.DirectionalLight;
import com.jme3.material.Material;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.math.;
public class Main extends SimpleApplication {
public static void main(String[] args) {
Main app = new Main();
app.start();
}
@Override
public void simpleInitApp() {
float size = 0.5f; // the size of each box
float space = 2.5f; // the space between the boxes minimum 2
for(int i=0; i<10; i++) {
for(int j=0; j<10; j++) {
// Creating the box and setting its location
Geometry geomtry = new Geometry(“number”+i+j, new Box(size,size/10,size));
geomtry.setLocalTranslation(isizespace, 0.0f, jsize*space);
Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);
mat.setTexture(“ColorMap”, assetManager.loadTexture(“Textures/d250.jpg”)); // You comment this line out and see what happens the black fog is no more but no textures
geomtry.setMaterial(mat);
rootNode.attachChild(geomtry);
}
}
// If I did not add the light samething happens
// I know how to use light in jmonkey, I just added to prov it deos’t work even with lights
DirectionalLight sun = new DirectionalLight();
sun.setDirection(new Vector3f(1,0,-2).normalizeLocal());
sun.setColor(ColorRGBA.White);
rootNode.addLight(sun);
// move the camera up some you get better view
cam.setLocation(new Vector3f(0,5,0));
cam.setRotation(new Quaternion().fromAngleAxis(FastMath.PI/2, new Vector3f(2,0,0)));
}
}[/java]
as you will see from the fowling images that the more I increaser the texture resolution the more the black fog.
and if I remove the texture it also remove the black fog.
I want have texture without black fog, please help.
Please, don’t post twice for the same issue, you could have posted this in the old thread.
Please consider doing this next time.
I tested your code, and I can’t reproduce the issue, here is what I’ve got
This means it’s not a code issue.
Could you try to update your graphic card drivers? maybe you have old ones…
It’s a very strange issue
sorry for posting twice on the same issue.
tank you very much.
Now I know that it’s my video card
I have an ati X1800, ati discontented support for this card
I also tested your code and I also have no problem with it…
Is there a software render that I can test for JmonkeyEngine?
If not, how can I use Mesa3D instead of openGL as software render.
Is there any article about this.
If not, what if I use JmonkeyEngine 2, I heard that it needs openGL 1.1 minimal instead of JmonkeyEngine 3 s openGL 2.0
I’m kind of new to Jmonkey, I’ve used for a week now. it has too many bugs in textures code
Tanks