Particle emitter problem

Hi,



The scenario is like so:

Camera is in the middle and particle emitter orbits the camera, rotates around the pivot.

The problem is that the emitter dissapeares when it gets behind me.



So let’s say it moves in circular path around me, 0-180 degrees on the path I can see it, the rest of the 180-360 degrees I can’t see it.



Does anyone know the solution to this one?



Thanks :slight_smile:

If the emitter is behind you, you can’t see it

Emitter coming from the side:





Emitter in front of me:

But the emitter is supposed to face you at all times? I don’t understand whats going on.

Maybe you can provide a test case that shows this issue?



When I disable rotating around pivot, then I can fly around the emitter and it doesn't dissapear.
But I need it to rotate around pivot and I need it not to dissapear like that.

Ah I see, you’re rotating it around a node.

It should be fixed in SVN now

That’s good to hear thanks :slight_smile:

Hello again.



I just installed nightly build of JME3 and I ran my program, and instead of that yellow thing in the sky, displayed in the images above, I see this:



It’s cool, but not what I need :slight_smile:

Does someone know what’s going on?

Here is the code:

[java]

ParticleEmitter fire = new ParticleEmitter(“fireball”,

ParticleMesh.Type.Triangle, 20);

Sphere sphere = new Sphere(50, 50, radius);

fire.setMesh(sphere);

Material mat_red = new Material(assetManager,

“Common/MatDefs/Misc/Particle.j3md”);

mat_red.setTexture(“m_Texture”,

assetManager.loadTexture(“Effects/Explosions/flame.png”));

fire.setMaterial(mat_red);

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.setInitialVelocity(new Vector3f(0, 0, 0));

fire.setStartSize(normalizedRadius1.5f);

fire.setEndSize(normalizedRadius
1.5f);

fire.setGravity(0);

fire.setLowLife(100f);

fire.setHighLife(100f);

fire.setVelocityVariation(0f);

fire.setRotateSpeed(5f);

[/java]

Okay I got it fixed,

it didn’t like that I used

[java]

Sphere sphere = new Sphere(50, 50, radius);

fire.setMesh(sphere);

[/java]



I probably did it because I tried to get the fireball translucent.



So my question is, does anyone know how can I make my fireball translucent, so I could not see other objects trough it and it still would look like a fireball?

Sphere sphere = new Sphere(50, 50, radius);

fire.setMesh(sphere);



means that you are emmiting Spheres as far as I understand it.

You can set the start and end color of the emitter, so just set its alpha to a low value like .1 - .4 that would make it transparent enough

Actually the thing is I want the emitter not to be transparent at all, haven’t figured that one out yet.

Okay then set alpha to 1 for both start and end color …

Alpha 1 on both start and end color didn’t solve it:

Haha … Okay I see. This is due to the additive blending, because your particles are pure yellow (which is unnatural), they never sum up to make white color, so whatever is white and behind it “leaks” through.



You will have to change the material on the particle, try to enable alpha blending instead of additive:

[java]

mat_red.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);

[/java]

Now I got some dark matter hehe: