Terrian model?

Home Forums AR Sandbox Forum Terrian model?


This topic contains 20 replies, has 13 voices, and was last updated by  sharned 1 month ago.

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
  • #102922


    The shared Python tool appears to generate a *.grid file which the SARndbox accepts, yet what is resolved is the software signaling the construction of a level sand surface.

    The currently modified *.asc elevation file has approx. min./max. of -107/-75 respectively in an attempt to reflect the box configuration range of -114 to -105.
    The original elevations were 116 to 165 (MASL).

    Should the *.asc inputs elevations be associated with the sandbox elevation plane distance from the kinect, or is perhaps some other normalization necessary?




    @siki… I’m getting an error – usage: dem2grid.py [-h] [-o OFFSET] [-s SCALE] ARSand.dem [ARTest.grid]
    dem2grid.py: error: too few arguments

    Can you help, please?



    So I’ve had success with @sharned C++ code and generating grid files for the Sandbox but have been having a difficulty getting it to display – read that as it does not display. I double checked with @oliverkreylos Lake Tahoe sample grid file but to no avail.

    When the menu is accessed within the sandbox program and a grid file is selected, literally nothing happens. What am I missing?



    The menu item should open a dialog box to select the grid file. When you select the file, that file becomes assigned to the key you pressed to display the menu. So, you need to press the same key again to display the grid file you selected. (You would press it once more to “turn it off”.)

    This seems a little unintuitive to Windows users, but there is an advantage to it. You can assign grid files to different keys and have them load just with a single key press, avoiding the menu and dialog display. In the VR world that VRUI was designed for, this would be helpful, but that’s less obvious in the AR Sandbox environment.

    Hope this helps.
    S. Harned



    @sharned thanks for the response. That makes complete sense and that then explains that I was seeing what I should when the whole thing went blue which would indicate that the grid file is completely below the level of the sand correct? I’ve read Kreylos’ discussion on the changing the grid elevation and getting the depth right.

    Have you (or anyone) found a simple way to do this? Is there something in the code that needs to be tweaked to make it recognize the correct elevation each time? Inputting a new grid fie and then having to tweak the correct elevation seems cumbersome hence the reason why I think I’m making more work for myself that I should!


    D. Thesenga



    @dthesenga You’re on the right track if you saw the terrain turn blue. Dr. Kreylos described the way to make adjustments in this post earlier in this topic. Basically, you want to save the “input graph” to a file so you can edit it in a text editor. You need to find the tool you created to load the grid file, then add the demVerticalShift line as he descried. There is also a demVerticalScale value you can add, if you have extremes in the terrain data. Try it and see.

    I found that I could Alt+Tab between the ARSandbox and the Text Editor where I changed the demVerticalShift value. Then you only need to reload the input graph (right-click the mouse, select Devices, Load Input Graph, select the file you just edited/saved in the Text Editor).

    Once you have found the right value for the vertical shift, it’s about the same for most grid files. It shouldn’t vary by much (I think). Your results might differ from mine.

    S. Harned

Viewing 6 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic.

Comments are closed.