Adding assigned water keys when other modifications are already present

Home Forums AR Sandbox Forum Adding assigned water keys when other modifications are already present

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2411
    FOCW
    Participant

    Hello!

    Our sandbox is now running with water simulation. The previous users had already set it up to autorun with fullscreen on boot, as well as set up a desktop icon for double-click launching. To this I would like to add permanent rain/drain keys. I did a search of the archived forum, which led me back to the current Installation page, Step 15, as the most up to date instructions for this. However, the instructions are for adding multiple enhancements in a single go. I don’t want to mess up what was already done, so I wanted to check that the code I’m adding is correct and going in the correct place.

    The original post had the code and I think that’s what got it stuck in moderation. If this posts successfully I will add more info in a reply.

    #2412
    FOCW
    Participant

    Below is the code in the shell script in the desktop icon (i.e. what you get when you right-click the icon and open with text editor). Could someone explain what the syntax is telling the computer to do here, and what I need to add to make it reference SARndbox.cfg?

    #!/usr/bin/env bash
    
    if [[ $1 -ne 0 ]]; then
        sleep $1
    fi
    
    ~/src/SARndbox-2.3/bin/SARndbox -mergeConfig ~/src/Vrui.cfg -uhm -fpv
    

    I did a file search on our system and SARndbox.cfg exists and contains the following:

    # Configuration file for SARndbox application
    # Copyright (c) 2016 Oliver Kreylos
    
    section SARndbox
        section Camera
            # Configuration parameters for Kinect v1
            compressDepthFrames true
            smoothDepthFrames false
        endsection
    endsection
    #2414
    FOCW
    Participant

    Looking at Step 15 in the instructions, it looks like I would add only the following to SARndbox.cfg:

    section Tools
                section DefaultTools
                    # Bind a global rain/dry tool to the "1" and "2" keys:
                    section WaterTool
                        toolClass GlobalWaterTool
                        bindings ((Mouse, 1, 2))

    And then with the endsections adjusted the file would look like this?

       section SARndbox
        section Camera
            # Configuration parameters for Kinect v1
            compressDepthFrames true
            smoothDepthFrames false  
            endsection         
            section Tools
                section DefaultTools
                    # Bind a global rain/dry tool to the "1" and "2" keys:
                    section WaterTool
                        toolClass GlobalWaterTool
                        bindings ((Mouse, 1, 2))
                    endsection
                endsection
            endsection
        endsection

    According to Step 17 in the instructions, once I add the correct reference to the startup icon script, the autorun will reference it and I should be all set.

    #2415
    FOCW
    Participant

    Bonus round: I think I read something about changing the drain/evaporation rate somewhere on the forum, but can’t find it now. Is there a setting for this, or would it require another script addition? The installation is primarily for school-age children, so a faster or even instant drain rate would help with keeping their attention.

    #2416
    Sean Robinson
    Participant

    I suspect there are several versions of Vrui, Kinect, and SARndbox simultaneously installed on your sandbox. While this is not a problem for the software, it can lead to confusion for the person maintaining the sandbox. As an example, the desktop icon shell script seems to be running SARndbox v2.3, but the latest version is 2.8. If you run ls -ld ~/src/* in a terminal window, it should show all the versions currently installed.

    Your changes to SARndbox.cfg look generally good. I don’t know enough about your specific sandbox configuration to say whether this will definitely add water tools.

    Bonus round

    Run the sandbox from a terminal window with the -h option to see a list of all options and their defaults. One option is -evr to set a constant evaporation rate.

    IIRC, draining happens just as fast as raining. They’re the same absolute magnitude, but opposite signs.

    If you want to have a button press for a faster drain, I think it could be done with some pre-build patches and more scripting with the control pipe.

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