Can't Solve HelloEffect Tutorial Bug

Hi,

I am having a weird bug with the fire example from the HelloEffect Tutorial. This is what shows up in my world:

http://img545.imageshack.us/img545/2636/08pk.png

Code from my IDE:

[java] ParticleEmitter fire = new ParticleEmitter(“Emitter”, ParticleMesh.Type.Triangle, 30);
Material mat_red = new Material(assetManager, “Common/MatDefs/Misc/Particle.j3md”);
mat_red.setTexture(“Texture”, assetManager.loadTexture(“Effects/Explosion/flame.png”));
//mat_red.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
fire.setMaterial(mat_red);
fire.setImagesX(2);
fire.setImagesY(2); // 2x2 texture animation
fire.setEndColor( new ColorRGBA(1f, 0.4f, 0.05f, 1f)); // red
fire.setStartColor(new ColorRGBA(0.4f, 0.22f, 0.12f, 0.5f)); // yellow
fire.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 2, 0));
fire.getParticleInfluencer().setVelocityVariation(1f);
fire.setStartSize(1.5f);
fire.setEndSize(0.1f);
fire.setGravity(0, 0, 0);
fire.setLowLife(1f);
fire.setHighLife(3f);
fire.getParticleInfluencer().setVelocityVariation(0.3f);
fire.setLocalTranslation(0, 3, -20);
rootNode.attachChild(fire);[/java]

This code is copied directly from the tutorial, with some changes to the colors, and a translation. It is called in simpleInitApp(). I have included the jME3 Test Data Library. This is on my Nvidia GTX 670M, and I am running Windows 7. I have updated my graphics card drivers, and have checked the Device Manager for any missing drivers. When I run this code on my friends computer,the fire shows up like normal. If you need more information, please let me know. Does anyone have any ideas to solve this? Thanks in advance!

That’s pretty strange.
Do you notice the same issue in the tutorial original code?

Yes I did notice the same issue with just the tutorial code. I created a new project just to test it. I fixed it somehow. I found that if I set the OpenGL version:

[java] AppSettings settings = new AppSettings(true);
settings.setRenderer(AppSettings.LWJGL_OPENGL2);
Main app = new Main();
app.setDisplayStatView(false);
app.setSettings(settings);
app.start();[/java]

It would show the fire like normal, but now it shows up fine when I run the code with what I had before:

[java]Main app = new Main();
app.setDisplayStatView(false);
app.start();[/java]

How did running it once with a set OpenGL version make it work without specifying the version? I would like to know why this fixed it, if anyone could provide some insight.

Set depth write to false in your material?

I am not sure. I can’t recreate the problem I was having now. I had the exact code that I used to generate the picture in my first post on a flash drive, and it works fine now.

@PT376 said: How did running it once with a set OpenGL version make it work without specifying the version? I would like to know why this fixed it, if anyone could provide some insight.
The settings are saved and reused on each launch