Effekseer integration and alpha blended meshes issue

Hi all,

I’ve been working on a hobby game dev project for a while and I’m doing battle scene animations using Babylon.
I’ve integrated Effekseer particle systems through sharing the gl context between Babylon and the Effekseer js client and this works reasonably well. (Ex.: Particle System Animation Test 1 - YouTube)

Now the one issue I have run into is that if any alpha blended meshes are in the scene, the effekseer effect will always be rendered on top of those meshes. With alpha tested meshes there are no depth issues, but it might be handy to be able to use alpha blended meshes for overlay effects and it would probably make things less confusing for my users as well.

I’m not really familiar with the inner workings of 3D engines so I’m not sure if what I’m trying to do here is possible at all.

Any input would be appreciated.

P.S.: I tried to make a representative playground but I ran into CORS issues trying to get effekseer demo assets to load there.

You could try to set needDepthPrePass on your meshes materials ?

Ah, I should have mentioned I have tried this setting already.
It causes another rendering issue when enabled where anything rendered through Effekseer is not visible through the transparent parts of the mesh.
Example Imgur: The magic of the Internet
The example mesh is a simple plane with a standard material that has useAlphaFromDiffuseTexture and needDepthPrePass enabled.

You could try running the particles first if they write to the depth buffer ?

Scratch that you will have the same issue if they are not transparent :slight_smile:

Why not relying on babylon particles ? Tou should be able to achieve similar effects ?

The main reason is that I’m trying(and probably failing, but hey) to make this editor usable by users that are less technically inclined. For the workflow with Effekseer users never need to lay eyes on a single line of code, which I don’t believe is the case for native Babylon particles. Though I might be wrong on that part as I have less experience using those.

To the issue at hand, one idea I had was to get the Effekseer particles to render at the same time in the render process as native particles do but I don’t believe the standard Babylon build supports that, and I’m honestly not sure if it would help or would be possible for that matter.

Did you check this The Particle Editor | Babylon.js Documentation ?

As I think @PatrickRyan is doing most of it in editor

I’m going to give native particles another shake.
I also realized it’d be nice if I can cut an external dependency from the project by switching to native particles.

As the native particle systems will almost assuredly not have this issue, I suppose this can considered resolved.

1 Like

@TShadowKnight, while I have made my particle systems in code, it’s just easier to open my PG and right click on the particle systems inspector entry:


Then you can set up the particles through the inline editor and save to a snippet server or to json to be pasted in the PG:

If you look at this PG (spacebar emits particles) you can see on line 73 that I’ve just pasted the saved json into the PG. Now this isn’t a completely code free path to making particles as you still need some code to run the particle system, but from the standpoint of what we used to have to do to make a particle system, this is much faster for iteration and updates.