GPUParticleSystem, EmitPower and CustomParticleEmitter (SOLVED)

minEmitPower and maxEmitPower has no function when using GPUParticleSystem and CustomParticleEmitter.

Example is here: Babylon.js Playground and Babylon.js Playground

Is this by design ? any workaround ?

I found a workaround, I removed CustomParticleEmitter and redefined the emitter property with a ‘get’ and ‘set’ property and Voila it works :slight_smile:

Here is the code I used:

Object.defineProperty(particleSystem, "emitter", {
    get: function() {       return new BABYLON.Vector3(x,y,z);    },
    set: function(_newValue) {    }});

1 Like

Yup in custom mode for GPU particle everything should be control in both functions to speed up the GPU operations.

For your information:

Some of the “Gradient” methods can be used with customparticleemitter and gpuparticle.

Example “addSizeGradient” method works as expected, but “addDragGradient” does not have any effect.

yup most of the setup one are, but I understand it might feel weird @Deltakosh any thoughts ?

1 Like

Bragging Image from my game, now added fog, gas, flames using GPUParticleSystem. In this scene i’m using 100k+ particles :slight_smile:

Many thanks Babylon!


Well if they are not supported it is mostly because of GPU limitation (the absence of a random function is 99% of the time the culprit)

1 Like

aha! Many thanks for the update!