Developing on the Sandbox

Home Forums AR Sandbox Forum Developing on the Sandbox

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2693
    NightFury
    Participant

    I apologize for the double post, I have been having issues extending my previous post and had to make a new thread.

    Quick background: I have a working projector-kinect setup. The kinect is around 2 meters away from the table and this cannot be changed. Due to the distance and also maybe kinect positioning, there is a faulty detection of 2 degree slope of the sandbox (yes this causes an issue for me).

    I want to do two things with the sandbox project:
    1- Modify the raw depth frame data to remove this error (and maybe do some terrain modding later on)
    2- Create an information overlay (more important/urgent)

    task 2 should be simple in idea; I create a quad, map a png onto it, and render this quad over the terrain and water renders. Due to a lack of experience with this projects tools, my previous background knowledge doesn’t help me a lot. I have mostly developed opengl apps with glut, making it hard to port over old code (glut is not used here as far as I can tell). I attempted to read through sandbox rendering code to modify that, but have not been able to understand much.
    Any guidance with this is greatly appreciated.

    For task 1, I believe I found the raw depth depth data, in frameBuffer. I can’t find any resources on the structure of this object. There are some correction tasks in FrameSource but deciphering how they do this has been fruitless. If it was a normal matrix I would simply have to have a gradient correction and do matrix addition.

    #2696
    Sean Robinson
    Participant

    there is a faulty detection of 2 degree slope

    Have you tried re-calibrating the Kinect? Is your Kinect an older V1 model that might benefit from Per-pixel Depth Correction?

    2- Create an information overlay

    I have wanted to add labels to key contour lines. But, I’ve pretty much given up on this idea. In some early tests I was able to add an ellipse to the output, but I could see the GL code was not set up in a modular way. Some shader code is taken from .fs and .vs files, but is mostly composed on-the-fly in C++ strings.

    The AR sandbox software is quirky. It is monolithic software that looks to have been mostly (if not exclusively) developed by one person.

    For task 1, I believe I found the raw depth data, in frameBuffer.

    It’s been a few years since I worked with the code, but I believe you’re correct. The Kinect::FrameBuffer is a two-dimensional array (x,y) of depth data as single float values (think of depth as a “grayscale” channel). If you want matrices, I think you could build a VRUI Math::Matrix from the FrameBuffer. But it might be just as easy to construct a two-dimensional array of correction values and elementwise add the two arrrays.

    #2698
    NightFury
    Participant

    Thanks for the reply Sean! I can’t seem to reply my full message, this was a test attempt

    • This reply was modified 3 months, 2 weeks ago by NightFury.
    • This reply was modified 3 months, 2 weeks ago by NightFury.
    #2701
    NightFury
    Participant

    Please visit pastebin.com/ttnd8xJ6 for my full reply

    #2709
    Sean Robinson
    Participant

    I’ve never set up a second view and only use a sandbox view. My trials
    were all in the primary window. Maybe try using a single view?

    Our multi-monitor setup is handled by the desktop window manager and I’ve not yet tried configuring SARndbox to place multiple windows on specific screens

    Can you temporarily move the Kinect to try a closer position? Or use a
    second Kinect?

    I suspect the posting error you are seeing means the spam filter has decided your post is too much like spam. One workaround I’ve found is to split a long post into several parts and see which one is rejected, then rephrase the problem post.

    #2710
    NightFury
    Participant

    I’ve tried reducing to primary window but no dice. I’m thinking that the render to primary window doesn’t take into account the camera view, which is why the objects which are rendered in the actual 3d space are not rendered. I think it’s calculating the terrain and water independently for the primary window. I haven’t been able to find and prove this though ;-;

    Do you remember how or where you rendered the ellipse? That might provide a clue as to how I can render with glDrawElements in the primary window.

    #2711
    Sean Robinson
    Participant

    You got lucky, I use a source repository and sometimes keep failed-but-interesting experiments on parked branches. I’ve pushed my park-contour-labels-02 branch to a public repo. It’s good you asked, I’d forgotten about that branch until I went looking for how I’d tried to add labels.

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