Reply To: Terrian model?

Home Forums AR Sandbox Forum Terrian model? Reply To: Terrian model?

Oliver Kreylos

Yes, SARndbox 2.2 can load and save DEM files. I need to write detailed instructions, but to load a DEM one needs to create and bind a “Show DEM” tool. This will open a file selection box where one can select a file to load.

Right now, SARndbox only understands a very simple binary grid format: two 32-bit integers (n and m, number of grid vertices in x and y) followed by four 32-bit floats defining the grid’s left, bottom, right, and top edges in some coordinate system, followed by n*m 32-bit floats defining each grid vertex’s elevation.

When loading a grid, SARndbox tries to be smart to scale and map the grid to the sandbox rectangle defined in BoxLayout.txt. It’s usually necessary to adjust the grid vertically so that there’s the right amount of sand in the box to build it.

DEMs can be saved by binding a “Save Bathymetry” tool. When the associated key/button is pressed, the current surface will be written in USGS DEM format.

Comments are closed.