Particle Emitter Sample Code: Null Mesh

Hey guys,

Just running the smoke particle emitter example (

Seems like something’s missing / has changed as it keeps on throwing a java.lang.NullPointerException: Geometry: MyEmitter Emitter has null mesh exception.

Thought I’d let you know.

EDIT: Same for the “Hello Effects” tutorials.

But the TestExplosionEffect doesn’t crash?

It seems other people have this issue as well, I added it to the issue tracker:

1 Like

Thanks Momoko.

No, it doesn’t crash. Just throws this exception (and of course the effect isn’t rendered).

Hi Momoko,

Issue 237: Particles do not work ( appears is marked as fixed. However using the latest nightly build, I’m still getting the same exception. Anything that I should do differently?

[java] ParticleEmitter fire = new ParticleEmitter(“Emitter”, ParticleMesh.Type.Triangle, 30);

Material mat_red = new Material(assetManager, “Common/MatDefs/Misc/Particle.j3md”);

mat_red.setTexture(“m_Texture”, assetManager.loadTexture(“Effects/Explosion/flame.png”));


fire.setImagesX(2); fire.setImagesY(2); // 2x2 texture animation

fire.setEndColor( new ColorRGBA(1f, 0f, 0f, 1f)); // red

fire.setStartColor(new ColorRGBA(1f, 1f, 0f, 0.5f)); // yellow

fire.setStartVel(new Vector3f(0, 2, 0));








ParticleEmitter debris = new ParticleEmitter(“Debris”, ParticleMesh.Type.Triangle, 10);

Material debris_mat = new Material(assetManager, “Common/MatDefs/Misc/Particle.j3md”);

debris_mat.setTexture(“m_Texture”, assetManager.loadTexture(“Effects/Explosion/Debris.png”));


debris.setImagesX(3); debris.setImagesY(3); // 3x3 texture animation



debris.setStartVel(new Vector3f(0, 4, 0));

debris.setStartColor(new ColorRGBA(1f, 1f, 1f, 1f));






I tried this exact code on my PC and it works fine

Works for all builds prior Nov. 5. I suppose there is no way that the latest builds are different to what you are using?

Hi all,

I have this problem too.

I wanted to add the smoke effect, so I think to use the code of,

but when I add it to my class:, this error happens:

java.lang.NullPointerException: Geometry: Emitter has null mesh

at com.jme3.scene.Geometry.updateWorldBound(

at com.jme3.scene.Spatial.updateGeometricState(

at com.jme3.scene.Node.updateGeometricState(

at pueblo.az1.simpleUpdate(

That line is inside this method:

public void simpleUpdate(float tpf) {



I known that doesn´t use the simpleUpdate method,

but i don´t know how can I fix the error in my class.

Any suggestion?

I guess both of you are calling updateGeometricState() inside simpleUpdate()? There’s no solution then, since particles need updateLogicalState() called before that.

Normen should add local updates support to the physics, that might help alleviate the requirement for updateGeometricState()


Its in, theres just some problem with the character node and I dont think its in the physics… Seems like setTransformUpdate() is called somewhere its not needed or something…

“I guess both of you are calling updateGeometricState() inside simpleUpdate()?” - Yup, I am. So, I should just call updateLogicalState() prior to updateGeometricState()?

Then all your animations etc. will run twice as fast. Just try removing the updateGeometricState() line, there were some fixes to local updates lately, maybe you dont need to anymore.


OK, thanks. I will give that a go later on,

Confirmed. Works. Thanks!