Water/Snow/Lava Speed and other settings

Home Forums AR Sandbox Forum Water/Snow/Lava Speed and other settings

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #123978


    I have the Water/Snow/Lava switch working. However, they all seem to move like water. If you right-click, you can set the speed of the liquid simulation. So, I can swap to the Lava texture, and manually change the speed to .5 to get a more realistic flow. However, I’d like to set the speed automatically in the script.

    Is there a command I can use in the script as part of the Case statement? Or change a setting in the .fs shader files to auto-set the speed to .5 for Lava and .01 for Snow?

    For the Lava, it’s too transparent. I’d like it to leave a blackened trail in the wake of it’s flow. I’m guessing I just comment out this line in the SurfaceAddWaterColor.fs file:

    Can I also just reduce the mix? Like apply a 0-1 multiplier somewhere in that line so I can play around with the numbers to get something I like. Or maybe manually change “waterOpacity” to a 0-1 number?

    Besides the Speed and Opacity settings, I’d also like to change the Rain Cloud gesture duration. So for Lava, I’d like to be able to just set a Lava “cloud” over the caldera in the sand and let it run for a minute using the current hand gesture to initiate it, but not have it stop once the hand is removed. Just let it run for a set duration.

    Is there a way to change the duration of the cloud, and maybe even size and volume/second to produce? Again, I’d want to write it as part of the change script.

    Thank you for any information you can provide to help with these settings!


    I’d also like to ask about a few other things, that I’d imagine would be much harder to implement, or might require code changes. As such, I’m putting it below the main post.

    Moving clouds. So, I’d also like to use the hand gesture to create a cloud, then give it movement by moving my hand in a direction. I’d then remove my hand, the cloud would persist and continue moving with the momentum set by the hand movement while the rain was running. If it’s possible to set a duration for clouds to persist, as mentioned with my lava, then I’d be looking to set a momentum too. I’d be fun to watch a rain cloud move over the terrain without your hand shadowing the effect.

    For the Lava, I’d like to change the effect of increase water. Instead of saturating the whole area with lava, I’d like it to detect areas that are above a given elevation, and spawn lava from those points, or the center of that elevation, or detect a caldera (a bowl like structure above a given elevation) and spawn in the low point of that. Then users would be able to hold a button down to create an eruption.

    Thanks again for any help on these more advanced options.


    Okay, I found this forum update: https://arsandbox.ucdavis.edu/forums/topic/minor-software-update/

    Looks like command piping is what I need for some of this.


    I was able to get command piping working (had to use mkfifo… just like the directions said) and now I’m editing water attenuation with the textures. Sweet!


    those sound like amazing add-ons. were you able to achieve any of those script adjustments (caldera, moving clouds,…)? could you share some instructions if they were successful? i am a beginner at this but am working to implement a sandbox in my 8th grade classroom and they would love all those effects.


Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed.