# Slowly showing a low lying fog by animating position of emitter

**URL:** <https://forum.babylonjs.com/t/slowly-showing-a-low-lying-fog-by-animating-position-of-emitter/28662>\
**Category:** Questions\
**Tags:** partial-system, emitter\
**Created:** [March 22, 2022, 11:33pm UTC](https://forum.babylonjs.com/t/slowly-showing-a-low-lying-fog-by-animating-position-of-emitter/28662 "2022-03-22T23:33:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ajp/32/9504_2.png) [@ajp](https://forum.babylonjs.com/u/ajp)\
**Post date:** [March 22, 2022, 11:33pm UTC](https://forum.babylonjs.com/t/slowly-showing-a-low-lying-fog-by-animating-position-of-emitter/28662/1 "2022-03-22T23:33:56Z")

</div>

Based of [this awesome answer](https://forum.babylonjs.com/t/general-volumetric-fog/6202/11) I am trying to get a low lying fog to smoothly move up above the ground. I can’t yet get it to move with the emitter and I suspect it’s a complex intersection of settings like emitBox, minLifeTime, etc:

[https://www.babylonjs-playground.com/#BHNVUE#58](https://www.babylonjs-playground.com/#BHNVUE#58) 😁

If you disable the `particleSystem.manualEmitCount` and the `particleSystem.minLifeTime` then it “works” but not smoothly: [https://www.babylonjs-playground.com/#BHNVUE#59](https://www.babylonjs-playground.com/#BHNVUE#59)

Of course I am open to other ways of achieving this, such as animating the opacity / visibility of the fog 🙂

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [March 23, 2022, 12:11pm UTC](https://forum.babylonjs.com/t/slowly-showing-a-low-lying-fog-by-animating-position-of-emitter/28662/2 "2022-03-23T12:11:10Z")

</div>

Hi! What about having a positive gravity? [Low Lying Fog | Babylon.js Playground (babylonjs-playground.com)](https://www.babylonjs-playground.com/#BHNVUE#60) 🙂

---

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ajp/32/9504_2.png) [@ajp](https://forum.babylonjs.com/u/ajp)\
**Post date:** [March 23, 2022, 8:30pm UTC](https://forum.babylonjs.com/t/slowly-showing-a-low-lying-fog-by-animating-position-of-emitter/28662/3 "2022-03-23T20:30:14Z")

</div>

Nice idea! I tried putting a setTimeout that, after a second, sets the gravity to 0. But it looks like the particles still have some momentum as shown by this: [https://www.babylonjs-playground.com/#BHNVUE#61](https://www.babylonjs-playground.com/#BHNVUE#61)

I’ve also tried expertimenting with `particleSystem.reset` and `particleSystem.rebuild` but can’t get them to work.

---

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ajp/32/9504_2.png) [@ajp](https://forum.babylonjs.com/u/ajp)\
**Post date:** [March 23, 2022, 9:32pm UTC](https://forum.babylonjs.com/t/slowly-showing-a-low-lying-fog-by-animating-position-of-emitter/28662/4 "2022-03-23T21:32:51Z")

</div>

It’s a bit hacky but this is a first pass that both moves the fog upwards and increases it’s opacity using a [custom updateFunction](https://doc.babylonjs.com/divingDeeper/particles/particle_system/customizingParticles#direct): [https://www.babylonjs-playground.com/#BHNVUE#62](https://www.babylonjs-playground.com/#BHNVUE#62)

NOTE: this does not seem to work for GPUParticleSystem. Which makes sense.
