How to create a water source?

Home Forums AR Sandbox Forum How to create a water source?

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2595
    Leonardo16
    Participant

    Hey guys, I saw some videos about the sandbox, and I’m wondering If It is possível to make a water source, like, some point where I set and the water keeps going out of that point. I Will use It to make some rivers or whatever to teach about watersheds.

    #2596
    Sean Robinson
    Participant

    One possible way to do this is to cut out a hand silohuette. Just as a trial, I once cut out a trace of my hand on cardboard and stood it over the sand with a short PVC pipe. It worked to make an artesian well on the sand.

    We do not use the hand silohuette because part of the fun is the interactivity and group effort. Assign a student to make the rain hand shape. Rotate student helpers as arms become tired.

    Another way is to use the “Manage Water Locally” tool. Place the mouse cursor where you want the rain/spring and press the assigned key to add water at that spot. I believe this could be automated with xdotool (for Xorg or the similar ydotool for Wayland) to place the mouse pointer and virtually press the “Manage Water Locally” hot key. I think it would be possible to assign a command key in SARndbox to run a script for a local water source. I have not tried this.

    #2597
    Leonardo16
    Participant

    Hey Sean, I was meaning to do something different, like a water spring, because I need 3 or 4 point of water to make watersheds, with the manage water locally se can’t make It in more points. I saw a Brazilian project that made a program based on the original sandbox software, they made water springs but I can’t talk with the creators, I Will drop a link If you wanna see It.

    Thanks for the help 🙂

    #2602
    Sean Robinson
    Participant

    Thank you for sharing the video. I had not seen the Universidade Regional de Blumenau (FURB) project before.

    …I can’t talk with the creators…

    Is it a language issue or are they not responding?

    I see two possible ways to accomplish multiple springs. I’ll split the ideas across posts in case I have to fight the spam filters.

    #2603
    Sean Robinson
    Participant

    The first idea, and immediately workable, is to use xdotool. With xdotool:

    1- move the mouse to a spring source
    2- press the local water key
    3- wait some time
    4- release the key

    Repeat this in a loop (in a script) with several spring sources.

    As an example, here are xdotool commands to add water at three locations, each for a tenth of a second. (This assumes the ‘r’ key has been assigned to “Manage Local Water” in SARndbox.)

    search --name "^SARndbox$"
    windowactivate %1
    mousemove --window %1 --polar 0 200
    keydown 'r'
    sleep 0.1
    keyup 'r'
    mousemove --window %1 --polar 90 200
    keydown 'r'
    sleep 0.1
    keyup 'r'
    mousemove --window %1 --polar 270 200
    keydown 'r'
    sleep 0.1
    keyup 'r'

    If there is not enough water from each spring, increase the rain strength with the -rs argument or patch your SARndbox to add the rainStrength pipe command.

    #2604
    Sean Robinson
    Participant

    I have not tried the FURB software (Caixa and custom SARndbox), but it looks like it could be made to work with the newer sandbox software. The second idea is to add the Caixa water spring changes to the latest SARndbox.

    I’ll add my notes in case someone wants to try porting the spring sources to SARndbox 2.x. Below here are my speculations from watching the video, reading the source code for the various components in Caixa, and their source changes to SARndbox v1.6.

    There are two parts: 1) measurement of the target (black-top-surface hemispheres) coordinates with Caixa; and 2) modifications to SARndbox to read the measured points from a file and add local water at those points.

    The modified SARndbox reads the spring coordinates and uses a modified Sandbox::LocalWaterTool::addWater to add water to several “S” points. Sandbox::LocalWaterTool gains a ::registerPoint helper function to add “S” points.

    If someone wants to work on this feature, I’d be happy to advise.

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