No Possibility to create gpu particle system via node particle editor

Hey guys,

Am i right that we don’t have any way to create gpu particle system via NodeParticleSystemSet.ParseFromFileAsync ? it doesn’t have gpu parameter as ParticleHelper.ParseFromFileAsync

So it means that node particle editor is for cpu particles only? or there is some way to create gpu particle system?

Thanks!

cc @AlitarSemiramis

This is true. NPE cannot run GPU particle as of now. The nodes generate CPU code and this will be super tricky to port to GPU.

the problem here is that i tried to use cpu. but i noticed that between 8.3 and 8.44( i migrated my project) there is significant drop in fps because of particles.

i have a complex scene with a mess of meshes(it’s a test project where i test things before i will add them to the actual game project) i tried to create particle system for some skill effect. then during migration to new vestion i noticed that fps dropped from 144 to 100! i tried to find some specific version where it happens but it seems that it drops slowly through versions. i double checked with absolute fps and got next results

         8.3     8.44

with particle ~162 fps ~95 fps

without particle ~233 fps ~220 fps

while gpu particles looks like doesn’t have such problems

i can’t create playground for specific versions they are not available. so i decided to move to gpu particles but it seems i need to write code in game ( i can’t just import file) to use them. so it means i will need to write code for each effect in my game.

Adding @Evgeni_Popov to check the perf issue
@TooCalm can you share a PG we can use to test?

as i said i have a complex scene with bunch of meshes but as you can see in table above there is not much changes between versions when there is no particle in scene. so i expect problem is in particle. so i created scene with particle only in playground. Babylon.js Playground

I still see a difference even without particles in your numbers

Adding also @AlitarSemiramis for the particle perf difference

1 Like

it’s impossible to reimplement all this mess on the scene in playground. but i tried to compare all parameters of the scene and got strange difference in active meshes number. both screens with particles

case when no particles. hope it will help

Oh boy!! We need to understand that difference in active meshes

I will review the particles part and investigate.

i’ve found version where active mesh difference happens

Since 8.24.1, active meshes now take into account meshes displayed in object renderers. See:

This is therefore only a difference in counting; there should be no difference in processing between version 8.44 and version 8.3.

I’m not sure I understand this: the “without particle” case should be independent of CPU/GPU particles and reproduce all the time?

If you can set up two live links (you can send the links privately if you wish) that show the difference in terms of fps, that would be great. In the meantime, I’ll compare some PGs in version 8.0.0 and in the latest version, but it’s a bit like shooting in the dark…

without particle means that there is no any particles in scene (i removed them for that test)

initially i tested with particles and got fps drop ~40. i found that it was because of particles, because if test without them there was fps drop only 10 fps(230→220) and i thought it’s ok(as there much new code introduced etc), but @Deltakosh said that it’s not, when i sent table with results, so i found where exactly (which version) it(10 fps drop) happens

UPD: well technically i looked for active meshes change. may be i should recheck fps change between versions more carefully

1 Like

@TooCalm How do you create the particle systems in your project?

You provided a test PG that uses NodeParticleSystemSet, but this class is faily new and doesn’t exist in 8.3.0, so I wonder in which version you got 162fps? I’m going to perform some tests with regular particle systems and compare performance between 8.0.0 and latest version.

hey i’m creating them as code when i’m comparing performance between 8.3 and 8.44.

But i have recreated that particle in npe as well. so i used it to create PG. That npe particle have the same fps as manual code particle (~100 fps). So i assumed it has the same problem.

ANYWAY. i was tried to reproduce it with more clear steps. I raised particle capacity and emitRate to high values and got even more fps drop. moreover i created PG where you can see this.

My PC shows ~59 fps for 7.54.2 version and ~28 fps for 8.51.1

this time for fps values i use fps block in bottom right of the screen of PG(not absolute values like previously)

UPD. 6.49.0 version shows ~78 fps

1 Like

I am looking at this, the regression happens between 8.37.0 and 8.37.1, still searching for the exact problem.

1 Like

This seems related to a V8 optimization that can’t handle objects when they are too big, and particles just went over the limit of properties.

Addressing it here:

Moving properties to an extra object to avoid V8 de-optimization by VicenteCartas · Pull Request #17904 · BabylonJS/Babylon.js

1 Like

i started new topic about 10 fps drop for case without particles as it seems a different issue. 10 fps drop between big babylon versions