Tools

Home Forums AR Sandbox Forum Tools

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #2069
    Lithop
    Participant

    Hello i have recently finished making my ar sandbox for my school and im having trouble finding some tools ive heard about in a video such as turning the water to lava and overlaying an actually area that you can build onto the sand if I could get some help with this and possibly some explanations of what some other tools do i would greatly appreciate it thank you for reading

    #2071
    okreylos
    Keymaster

    Let me dig up information about the DEM mode (where the sandbox guides you towards re-creating a 3D terrain model) and the water/lava/etc. shader magic from the old forum that went down.

    In the meantime, here’s a list of AR Sandbox functionality that I may elaborate on in later posts:

    1. Basic topography mode (elevation colors, contour lines, etc.)
      • Change elevation color map
      • Change contour interval (vertical distance between contour lines)
      • Change topography update latency
      • Pause terrain updates
      • DEM mode (load elevation model; visualize difference between sand and model)
      • Save current sand surface as elevation model
    2. Water mode
      • Global rain via key
      • Global evaporation via key
      • Mouse-driven rain/evaporation
      • Rain through hand gesture
      • Water simluation speed factor
      • Change attenuation (roughly viscosity)
      • Change water shader for different visual effects
    3. Geology visualization
      • Draw sub-surface layer with arbitrary strike, pitch, elevation, and thickness
    #2072
    Playnetary
    Participant

    Hello Oliver.

    Thanks a thousand times for the creation and distribution of the ARSandbox. Brilliant stuff. It keeps amazing every soul that get near it!

    Now I am having difficulties with loading DEM files. The ‘Show DEM’ process does open up a dialog box from which I choose my custom DEM file, but the terrain projected on the sand looks dead flat, whatever the scaling factor I use to exaggerate the Z-direction in the DEM file. I suspect this is related to an issue also reported here, where the manual loading of DEM files seems to be somehow broken.
    The former support forum contained quite a bit of help in handling DEM files in the ARSandbox but this unfortunately disappeared. Any chance you can get me (and others) going with the DEM handling, either manually via the ‘Show DEM’ menu or even through configuration files or command line arguments?
    Thanks a bunch.

    #2088
    Playnetary
    Participant

    I found the answer to my questions above (see the extract below from Matt Wilkie):

    To load a DEM.grid file into the AR Sandbox, press any key while it’s running, and select “Show DEM” from the tool selection menu. In the file selection box that appears, select a DEM file. If the file could be read correctly, pressing the same key afterwards will toggle the AR Sandbox into DEM mode, where blue indicates an excess of sand, and red indicates a lack of sand. Move sand from the blue to the red areas until everything is white (ideally). Pressing the bound key again will toggle back to regular mode.

    The DEM mapping tool can be configured to adjust the DEM’s vertical level (to make the DEM match the total amount of sand in the box), its vertical exaggeration, and the tolerance level when the sand is colored white. To adjust these settings, it is easiest to assign a DEM tool as above, and then save the current tool setup by selecting “Save Input Graph” from the “Devices” sub-menu of the Vrui system menu. This creates a text file with the settings for the DEM tool inside. After adjusting the settings, the complete tool setup can be loaded back from inside the AR Sandbox by selecting “Load Input Graph,” or at startup by passing -loadInputGraph on SARndbox’s command line.

    If everything is blue, the loaded DEM is below the current sand surface everywhere (blue means too much sand, red means too little sand).

    To adjust the DEM vertically, run the sandbox and load your DEM by assigning a “Show DEM” tool to some button. Once it’s assigned, select “Save Input Graph…” from the “Devices” sub-menu of Vrui’s system menu. Then exit the sandbox and open the file to which you saved.

    It’s the same format as other Vrui configuration files, with one section per assigned tool. Find the section that says “toolClass DEMTool”. Into that section, put a new line demVerticalShift 0.0 then save the file, run the sandbox again, and load the saved input graph from the “Devices” sub-menu.

    You can also put the DEM file name in that section via demFileName so you don’t have to select it every time.

    The trick is to fiddle with the vertical shift value by editing the input graph file until you have just enough sand to recreate the entire DEM. You can edit the file while the sandbox is running, and re-load the changes by selecting “Load Input Graph…” again.

    If you have blue everywhere, use a large negative shift until everything is red. Then bisect until you get it just right.

    It will look something like this:

    section DEMTool2
    toolClass DEMTool
    bindings ((Mouse, 4))
    demFileName /home/okreylos/Projects/Sandbox/LakeTahoe.grid
    demVerticalScale 4.0
    demVerticalShift -1.5 # Positive values make it blue-er, negative values red-er
    endsection

    • This reply was modified 1 year, 9 months ago by Playnetary.
    #2090
    Lithop
    Participant

    Where can one get these dem files

    #2097
    Playnetary
    Participant

    Here is the link to a nice DEM.grid file that I generated. It represents on one side of the play area the Olympus Mons (tallest volcano in the Solar System, on Mars, 26km high) versus the Himalayas (including the Mount Everest, 8.8km high).

    #2103
    Lithop
    Participant

    Thank you!
    Is there a site to get these from?

    #2106
    Playnetary
    Participant

    Hi Lithop.
    I’ve had difficulties uploading my replies…

    Fetch DEM files of any part of the Earth, at a 30 meter resolution, from this URL (possibly needs an account creation, but it’s all free).

    #2107
    Playnetary
    Participant

    Remainder of the reply:

    Then python script to convert the DEM files into the grid file that the ARSanBox can actually ingest, showing the Lake Geneva surroundings (including the Mont Blanc).

    #2110
    nicgeosciences
    Participant

    Thanks for the info and steps… However, we downloaded your “olympus-himalaya” grid file and only get a flat terrain basically. there is “red, and “blue” with a thin line of white at the boundary. What needs adjusting? Is the grid file being read correctly?

    #2111
    Playnetary
    Participant

    @nicgeosciences:

    did you load the grid file using the “Load Input Graph” menu, specifying the demFileName, demVerticalScale and demVerticalShift parameters in the input graph file?
    If so, then try and play with the demVerticalScale value. This worked for me.

    #2120
    Lithop
    Participant

    Hello I’ve recently been doing more research on changing the water color in the sand box and have found this site https://github.com/maphew/SARndbox/wiki/Lava

    If anyone gets this to work please let me know it didn’t work for me I probably did something wrong

    #2124
    Sean Robinson
    Participant

    What on @maphew’s page is not working for you?

    I was able to change the fluid appearance by uncommenting and commenting lines in the fragment shader as the page directs. The line numbers may differ, so try matching the line contents to know which lines to change.

    #2544
    viagoito4
    Participant

    Thank you Sean. I updated the lines of SurfaceAddWaterColor.fs exactly as in the @maphew’s page, matching the content carefully. However, running the ARSandbox via the Configuration File (Step 15 of software installation guide) and the desktop icon (Step 16 of the software installation guide), the map still shows water instead of lava.

    Should I undo any of these steps?

    Greatly appreciate your help.

    #2548
    Sean Robinson
    Participant

    @viagoito4 My first guess is that you are editing a different file than the sandbox is reading. How many files does the locate SurfaceAddWaterColor.fs command show you?

    I don’t know the details of your configuration, but I assume the file read by your sandbox software has a path like “/home/viagoito4/src/SARndbox-2.8.1/share/SARndbox-2.8.1/Shaders/SurfaceAddWaterColor.fs”.

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