Jump to content

Particles are love, particles are life, particles are low hanging fog.


aWeirdo
 Share

Recommended Posts

BEAUTIFUL!  I need to bookmark that a few hundred times.  Nice use of a wide and flat emitBox, and low update speeds. 

I HAD TO see it on a heightMap.  https://www.babylonjs-playground.com/#1DZUBR#30

Yep... lookin' good (a bit like flying above the clouds in an airplane) 

Your demo might be the best low-fog I've seen so far.  With a "rolling hills" heightMap, it would do a nice "pool in the valleys" effect, even though there's no particle pooling/swarming forces in-use.  COOL!   Thx, aW!

A guy COULD... umm...  get aweird.  https://www.babylonjs-playground.com/#1CMD3G#18

Quick tour... line 139 installs a "custom start-position function" on the particleSystem.  The custom particle-starting-position-func... is at line 44.  It simply changes the emit location to a new vector3... every time a particle is born/recycled.  It could be 3 lines of code, but instead, I chose to use 50 lines.  :)

What if someone gathered an array of all vector3 heightMap positionKind which had a Y-value LOWER THAN fog-top?  (do it early, when scene initializes)

Then, in the fast-running custom start-poz func, use those "valley vectors" as the emitters for the fog-particles.  Generate fog ONLY in the valleys, and emitted from the heightMap's (lower-) positionKind data (the valley vectors). 

In simpler words, gather the locations of the valleys, and only use THOSE AREAS as particle-emit locations.  hmm. 

And then, what if... you generate MORE particles for REAL LOW valley-vectors, and less particles... in NOT-SO-LOW valley vectors.  WOW!  Smart-fog!

Aweirdo's Fog-Enhanced HeightMaps, INC.  "For ALL of your self-fogging-terrain needs!" :)

Link to comment
Share on other sites

Oh yeah... on-the-fly testing within customStart func... instead of pre-gathering?  Yep, yep, yep.  Thx J.

errr... maybe.  I need think-time on this.  aWeirdo is a much better coder than I, so he/she already understands completely.

I'll catch up in a couple hours.  :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...