Home › Forums › AR Sandbox Forum › Tools
Tagged: Tools help - water to lava
- This topic has 14 replies, 6 voices, and was last updated 1 year, 7 months ago by Sean Robinson.
-
AuthorPosts
-
May 4, 2022 at 11:11 am #2069LithopParticipant
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
May 5, 2022 at 3:54 pm #2071okreylosKeymasterLet 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:
- 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
May 6, 2022 at 8:37 am #2072PlaynetaryParticipantHello 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.May 12, 2022 at 11:20 pm #2088PlaynetaryParticipantI 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 2 years, 6 months ago by Playnetary.
May 16, 2022 at 11:02 am #2090LithopParticipantWhere can one get these dem files
May 17, 2022 at 6:36 am #2097PlaynetaryParticipantHere 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 #2103LithopParticipantThank you!
Is there a site to get these from?May 18, 2022 at 1:07 am #2106PlaynetaryParticipantHi 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).
May 18, 2022 at 1:08 am #2107PlaynetaryParticipantRemainder 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 #2110nicgeosciencesParticipantThanks 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 #2111PlaynetaryParticipantdid 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 #2120LithopParticipantHello 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
June 6, 2022 at 8:23 am #2124Sean RobinsonParticipantWhat 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 #2544viagoito4ParticipantThank 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.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”.
- Basic topography mode (elevation colors, contour lines, etc.)
-
AuthorPosts
- You must be logged in to reply to this topic.