Tagged: Tools help - water to lava
May 4, 2022 at 11:11 am #2069
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 readingMay 5, 2022 at 3:54 pm #2071okreylosKeymaster
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:
May 6, 2022 at 8:37 am #2072
- 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
- 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
- Geology visualization
- Draw sub-surface layer with arbitrary strike, pitch, elevation, and thickness
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.May 12, 2022 at 11:20 pm #2088
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:
bindings ((Mouse, 4))
demVerticalShift -1.5 # Positive values make it blue-er, negative values red-er
May 16, 2022 at 11:02 am #2090
- This reply was modified 1 year, 9 months ago by Playnetary.
Where can one get these dem filesMay 17, 2022 at 6:36 am #2097
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).May 17, 2022 at 10:17 am #2103
Is there a site to get these from?May 18, 2022 at 1:07 am #2106
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).May 18, 2022 at 1:08 am #2107
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).May 23, 2022 at 1:53 pm #2110nicgeosciencesParticipant
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?May 24, 2022 at 5:20 am #2111
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.June 2, 2022 at 11:09 am #2120
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 wrongJune 6, 2022 at 8:23 am #2124Sean RobinsonParticipant
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.April 21, 2023 at 10:49 am #2544viagoito4Participant
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.April 25, 2023 at 7:19 am #2548Sean RobinsonParticipant
@viagoito4 My first guess is that you are editing a different file than the sandbox is reading. How many files does the
locate SurfaceAddWaterColor.fscommand 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”.
- Basic topography mode (elevation colors, contour lines, etc.)
- You must be logged in to reply to this topic.