Digging for water

Home Forums AR Sandbox Forum Digging for water

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #101108
    SudoQ
    Participant

    Hello!

    Is it possible to set a fixed sea level at which water spawns automatically?
    I want to be able to dig in the sand and find water below a certain sand level, without using the rain functionallity.

    If this is not possible in the current version, do you have any thoughts of which parts of the code I need to modify?

    I have tried to set a minimum water height in Water2BathymetryUpdateShader.fs. It worked partially but resulted in a massive bug that flooded the whole sandbox with water when leaning over the edge of the sandbox. I am now thinking about adding additional shaders to alter the quantity texture but I decided to post this question here before I proceeded any further.

    Cheers!

    #101116
    SudoQ
    Participant

    I have managed fix the bug and got it working.

    The solution was to restrict the water spawn area so It could not be generated near the borders of the sandbox, which previously caused a flood of water.

    • This reply was modified 5 years, 3 months ago by SudoQ.
    #101118
    scruffyjoe
    Participant

    I’m interested in this. Could be a possible demonstration of the water table in the natural environment.

    Good work.

    #101310
    Anonymous
    Inactive

    How did you restrick the water spawn area ? i realy need that to…

    #101391
    INTPTT
    Participant

    This is something I’d love to learn more about too. We’ve discussed this for educational purposes. Please share more SudoQ!

    #101409
    SudoQ
    Participant

    Hey!
    I encountered this issue during the development of a modification of the current project. The objective of the project was to add a vegetation simulation around water sources and to enable digging for water. So by digging in the sand, new water sources arise and vegetation starts to grow and expand over time.

    The digging part was solved by modifying the file Water2BathymetryUpdateShader.fs(link). I added a float uniform called baseWaterLevel in order to change the water level from the main program. I fixed the flooding bug by introducing two if-checks to check the boundary. The project is currently only running at one exhibition (that I know of) and so there are probably undiscovered bugs and defects, but it seem to be running fine.

    If you are interested to take a closer look, it is available at: https://github.com/SudoQ/gARden

    • This reply was modified 4 years, 11 months ago by SudoQ.
    #101420
    INTPTT
    Participant

    Awesome! Thanks for sharing. We’ll give it a go – kids should love this!

    Before I do any research or test it out myself, I’m going to be lazy and ask. =) Any way to easily toggle this on and off without having to reload? Wasn’t sure if it could be loaded like the liquid shaders (see ours here) or if it was a command line type thing.

    #102979
    Nickelberry
    Participant

    So it looks like this was made to work with version 1.5, is there anyway to implement this into the current version?
    Pic of my setup for inspiration
    My Sandbox

    • This reply was modified 3 years, 8 months ago by Nickelberry.
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Comments are closed.