aWeirdo Posted November 11, 2017 Share Posted November 11, 2017 A simple demo displaying the power of the ParticleSystem by creating a low-hanging fog. https://www.babylonjs-playground.com/#BHNVUE#1 Thanks to @Wingnut for finding the PG used as base for this demo. Have a nice saturday NasimiAsl, JohnK, Wingnut and 10 others 13 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 11, 2017 Share Posted November 11, 2017 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!" PhilT 1 Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted November 11, 2017 Author Share Posted November 11, 2017 @Wingnut I appreciate the kind words I liked your idea, genious.. so i gave it a go, without clusters through. https://www.babylonjs-playground.com/#KBI6QI#1 jerome, MarianG, PhilT and 6 others 9 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 11, 2017 Share Posted November 11, 2017 Oh man! That is VERY cool! OMG! hahaha. Fantastic! You're gonna get a "WOOT" from @Deltakosh for this one, maybe. (Deltakosh WOOTS are not easy to earn, but you're certainly in the vicinity, here.) Quote Link to comment Share on other sites More sharing options...
jerome Posted November 11, 2017 Share Posted November 11, 2017 if you want to test simply if the particle should be set over a certain altitude only : http://doc.babylonjs.com/classes/3.1/groundmesh#getheightatcoordinates-x-z-rarr-number Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 11, 2017 Share Posted November 11, 2017 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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2017 Share Posted November 13, 2017 WOOT! this is genius! Do you want me to add it to the features demo of the website? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted November 13, 2017 Author Share Posted November 13, 2017 @Deltakosh Sure! that would be awesome Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2017 Share Posted November 13, 2017 need a title, a desc and a 800x500 image Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted November 13, 2017 Author Share Posted November 13, 2017 On 13/11/2017 at 8:31 PM, Deltakosh said: need a title, a desc and a 800x500 image Title: Low lying fog Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted November 15, 2017 Share Posted November 15, 2017 Wow! I am looking for fog like that! Thanks a lot man! Check your fog in my game! -> https://streamable.com/x8nkv aWeirdo, jerome and Boz 3 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 15, 2017 Share Posted November 15, 2017 Creepy as hell!! Love it Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted November 16, 2017 Author Share Posted November 16, 2017 PG is currently down, whoever hosted the original smoke texture have removed it from their dropbox.working on a solution. will update shortly. Update; Thanks to Unity Technologies and their CC0 ( public domain ) particle's pack, the PG is now working again. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted March 24, 2018 Author Share Posted March 24, 2018 Update; Added demo option to use GPU particles. https://www.babylonjs-playground.com/#BHNVUE#1 I may have borrowed Deltakosh's UI from his GPU particles demo. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.