How can I make my particle effects look less.... Blocky?

Hi all,

I am trying to get a particle effect out of my plane, a bit like a (somewhat unrealistic) jet engine. I have tried a few different things:



However, the problem has always been the same with them: They all look like a ton of blocky particles coming out of the jet engine. Whereas, I would like to to look like a single “trail” of the jet engine.

Part of the problem here is particle transparency. I am creating the particle in a J3M and J3O file, and currently it has a black border around it as pixels with a low alpha are not discarded:

I was at one point using alpha blending, which hid this issue, but then the particle colour depended on the colour behind it, which is of course another issue…

I guess the question is, how can I make these effects look less blocky and more realistic, using the material editor and the SceneComposer?

For light effects (fire etc) use additive blending option. In our project we use Color instead. Torch fire is black and white texture of fire.

   MaterialParameters {
        Texture : Flip Repeat Models FireAndEffecs/emCOL.png
        GlowColor : 0.0 0.0 0 1.0
        NumSamplesDepth : 0
        Quadratic : 0.0
    }
    AdditionalRenderState {
      FaceCull Off
      Wireframe Off
      DepthWrite Off
      AlphaTestFalloff 0.0
      PointSprite Off
      ColorWrite On
      DepthTest On
      Blend Color
    }
}

Effect here:
Image

If I remember , for solving this transparency issue i used Unshaded.j3md as Material Definition instead of Particle.j3md and I set Blend mode to alpha .

Your texture doesn’t seem to have an alpha channel. The black area are supposed to be the transparent ones. In that case you shoudl use the Additive blend mode. (color are added together, so a black value 0,0,0 doesn’t have any contribution).
However the darker the opaque area are, the more trasparent tey will be, and it’s usually not what you want.

So the solution is to use Alpha, as a blend mode sure, as @Ali_RS pointed, but also your texture shoudl have an alpha channel (you have to edit de file to make the dark areas transparent)

1 Like

Yes, alpha channel missing. Can easily be added via Gimp: Color → transparency from color → (click either the white or the black area) → adds an alpha channel for you → you have now a gray+alpha .png ( File → export → .png)

That’s also what I’m using when I scan and colorize the comics and 2d images that I draw with pencils. Only a few more extra steps are needed (but that’s quite off topic).

1 Like

You have to choose which blending mode to use for the particles.

  • Use Additive for ‘glowy’ particles like fire, magic, etc. Use AdditiveAlpha if the opacity is in the alpha channel.
  • Use Alpha for ‘matter’ particles like smoke, dust, shrapnel, etc.
1 Like

This is because the particleEmitter also use vertex color and that the default start color has an alpha of 0.5.
If you set the start color to opaque white in the ParticleEmitter you’ll have the exact same render.

1 Like

Thanks @nehon
I had forgot to set Alpha to1.
Now I have the same render.

Alright, so I noticed that I had set the particles end colour to be an alpha of 0.0. So, I changed it to 1.0.

Then, I noticed that the blockiness still existed:

So, I disabled DepthWrite. This seemed to solve the problem:

However, the particle trail disappears when the background is the sky. Take a look at this GIF:

Ignoring the jumpiness (which was caused by the GIF creator), you can quite obviously see that when the particle background is sky, the particles cannot be seen. Whereas, if the ground is behind, you can see it.

Both the sky and the ParticleEmitter are in the translucent bucket filter. I cannot change either of them or else I will cause problems elsewhere in my game.

Also, if I go in front of a white background, the particles seem to disappear as well:

Is this just because the background looks a similar colour to the particle, or is there some wizardry going on here that I’m not aware of?

If you are using the WaterFilter, you must use the TranslucentBucketFilter.

But it could also be that your colors are too similar to the sky (additve applied to white background doesn’t change anything). I would never use Additive blending for particles - even for flames or magic sparcles. Additive is bad and looks odd (like not adding anything if already white as background - “feels” just wrong to me).

I already said that I was doing that though. The water isn’t the problem at all, and the trail renders fine with water.

I’m using the “Color” blend type at the moment. Is there a different blend type that you would recommend?

To be honest, I think I prefer the extra “see-through-i-ness” with particle.j3md, as unshaded seems to make the individual particles much more noticeable.

I don’t think the material is the problem now, I think it’s transparency and that sort of thing.

Disable DepthTest, not DepthWrite

If I do that, I see the particles rendered on top of the plane, which obviously looks wrong:

mhh right…
I wonder if it’s rendered but we can’t see it or if it’s not rendered. Could you try with a dark sky?

The problem is that the sky is rendered in the translucent bucket, to avoid being overwritten by the FogFilter. I believe the likely issue is that the sky is rendering after the particles, somehow removing them.

So yes, without the Sky and just with fog, the issue disappears:

And by “disappears”, I mean that the trail does not disappear or get rendered over. That said, the trail does fade, because of the white-ness behind it, which is another issue that I still have not solved.

And so yes, without the FogFilter or a skybox, the issue is completely gone:

Except of course, for the issue where the trail on a white background (aka snowy mountains), where the trail still fades.

Edit: Just to confirm, the issue with the trails fading in white, and the issue with the sky, are two different issues. If I render with NO blending, the white mountains no longer become an issue (indicating blending is the issue here), but particles are still over-written if the background is the sky.

Just to confirm, you could disable both the WaterFilter and the TranslucentBucketFilter and see if sky is a problem in that case.

The problem with yellow particle on white background is the ‘additive’ blending with particles - additive (often used for translucent) means that it adds to the color channels - and white is already added everything to the maximum - so it won’t change if you add yellow to it).

So I have a problem: I want the particles to “add up”, so that multiple particles look whiter, as if it’s hotter in the centre of the stream.

On the other hand, I don’t want background objects (like white hills) to affect that.

What should I do?

Disabling the translucent bucket means that the only thing I can see is the skybox, because the skybox is in the translucent bucket.

And, disabling the water filter does absolutely nothing, except removing water.

I don’t understand.

Shouldn’t the sky be in the QueueBucket.Sky bucket?

I experienced strange artifacts after using the WaterFilter and/or TranslucentBucketFilter, because these post processing things are messing with how I’m used to handle 3D graphics in games.
There is an answer to this problem which I will be using soon - it’s the old jME 2 water made by MrCoder and ported to jME 3 by someone else. Instead of using post processing filters it uses a mesh for the body of water.