Newbie with particles - is it possible to get an effect like this one?

Hello, I’m really newbie with particles, I’ve did some experiments but I’m not still able to manage their life, size, color, position, etc, with functions.
I’d like to realize something like this

(yeah, Christmas is coming… :roll_eyes: :grinning_face_with_smiling_eyes: )

So, In my mind I’ve splitted the project in several aspects:

  1. Move particle emitter along a spline
    → easy

  2. Let particles keep the movement direction of the emitter
    → for me not easy at all, but it could be faked with a camera rotation

  3. Keep the particles not too sparse, to define the shape of the three while the emitter is moving along the path, and then “explode” them
    → I think I could change the min/max emit power when the animation is not playing anymore, but I don’t know how to update ALL the particles, when I do this only the new emitted particles have the new speed.
    I’ve worked a bit with PCS, and with them there’s a pcs.setParticles() function.
    Is there something like that with standard particles too?
    I’ve looked in the docs, but it only talk about “animation of the texture of a particle rather than any movement or the particle itself”
    Animating Particles | Babylon.js Documentation

  4. Have some particles that quickly move to the camera, and get DOF effect
    → For the movement I think I should create a 2nd emitter, with a direction to the camera
    → For the DOF effect, I have no idea, since all my test with DOF (with particles or not) always gave me bad results (everything is blurred, nothing in focus, poor quality)

  5. “Dispose” the mesh emitter at the end of the animation
    → I know how to change the emitter mesh, but I don’t know how to dispose it

  6. Create these nice shine effect for the emitter
    → It doesn’t seem to me there’s a PostProcess “Shine” effect, is there maybe some trick to realize it?

  7. Create these subtle shine effects for the particles
    → Again, I don’t know if and how it could be realized. Using just a “shine” texture for sure would not be nice

This is my (poor) demo
https://playground.babylonjs.com/#IQPBS4#6

Many thanks!!

1 Like

Hello!!

Let see how I can help:

  1. Yes easy: you control the emitter position: Babylon.js Playground (babylonjs-playground.com)
  2. Not sure what you need here: In your video the particles are following the emitter direction they got at their creation. This can be done with custom functions: Customizing Particles | Babylon.js Documentation (babylonjs.com). You can define each particle direction (by getting it from your emitter) with startDirectionFunction
  3. You have full control over the updateFunction (for all particles): Customizing Particles | Babylon.js Documentation (babylonjs.com)
  4. For fake DOF the idea is to change the particle texture to get one which is more out of focus (@PatrickRyan also shared a similar idea back in time)
  5. Once change, simply call emitter.dispose() if your emitter is disposable
  6. Not sure to understand what you mean by shine. Maybe bloom? Babylon.js - Postprocess Bloom demo (babylonjs.com)
  7. This could be done with custom shader for particles: Node Material Particle Shaders | Babylon.js Documentation (babylonjs.com)

Hope this helps!

3 Likes

Hello Deltakosh
thank-you for your reply!
About 1) please note that my emitter should follow a path, quite hard to define just by a function, that’s why I’m using an imported mesh with animation
I’ll check the documentation for point 2) and 3)
About 4) should I use a sprite sheet to change the texture? If so, is there any doc on it?
About 6) I attach a picture to better show what I mean. The colorful light streaks on the emitter.
I think I can’t use an image (it would be too static, and I guess I would have z-depth issues with the particles)
Cattura

You may use here the second particle system with different emitter texture, but position it in the same position as the main emitter.

For 4: Animating Particles | Babylon.js Documentation (babylonjs.com)

1 Like