Blue line around running SARNDbox projected image?

Home Forums AR Sandbox Forum Blue line around running SARNDbox projected image?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #100738
    Dan
    Participant

    Hello, We are running the AR sandbox (SARndbox 1.5, Kinect-2.7, Vrui-3.0-002) and it seems to be working well except for a blue line appears around the projected surface about an inch or so in from the physical sandbox walls. Any ideas on why it is there and how to remove it?

    #100742
    Oliver Kreylos
    Keymaster

    Unfortunately, I don’t know yet how to completely remove the blue border.

    The reason it’s there is either a bug in the Nvidia graphics driver, or an edge case that is triggered by unorthodox texture image handling inside the AR Sandbox software (I have not yet found where the latter would be in the code). The blue rectangle appears only in specific versions of the Nvidia driver; would you please post your exact version number? It is displayed in the “X Server Information” panel in the Nvidia control dialog, nvidia-settings.

    The blue rectangle runs exactly around the sandbox’s water simulation area, as set up during calibration step 5 (measure extents of sand surface). That area coincides with the extents of the 2D texture images containing the water simulation’s state, and are an effect of either a) the graphics driver wrongly accessing edge pixels from that texture image, or b) the sandbox software wrongly relying on unspecified texture edge behavior.

    The blue rectangle can be pushed further outside the box by extending the 3D box corner positions measured in calibration step 5, but pushing the box corners outside the physical limits of the sandbox is not recommended because it might lead to artifacts in the water simulation.

    #100743
    Dan
    Participant

    s4@Sandbox:~$ sudo nvidia-smi
    Tue Jan 27 16:38:02 2015
    +——————————————————+
    | NVIDIA-SMI 4.304.88 Driver Version: 304.88 |
    |——————————-+———————-+———————-+
    | GPU Name | Bus-Id Disp. | Volatile Uncorr. ECC |
    | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
    |===============================+======================+======================|
    | 0 GK104 | 0000:02:00.0 N/A | N/A |
    | 21% 43C N/A N/A / N/A | 2% 77MB / 4095MB | N/A Default |
    +——————————-+———————-+———————-+

    +—————————————————————————–+
    | Compute processes: GPU Memory |
    | GPU PID Process name Usage |
    |=============================================================================|
    | 0 Not Supported |
    +—————————————————————————–+

    #100745
    Oliver Kreylos
    Keymaster

    Thanks. This is no guarantee of success, but you could try installing a newer Nvidia driver. I’m on Fedora 20, and the stock Nvidia driver for that distro is at version 331.104. (The graphics card on this laptop is a GeForce 8600M GT.) I can’t test right now whether this driver version works or not. The stock version on Fedora 21 is 343.36 right now.

    Let’s collect version numbers of Nvidia drivers that don’t exhibit the problem.

    #100746
    Dan
    Participant

    Updated to the lastest version of the Driver for our card (GeForce GTX 760) and it didn’t help: NVIDIA-SMI 346.35, Driver Version: 346.35

    Can you describe how I would manually calculate the coordinates to push the box outside of view? Here is our BoxLayout.txt:

    (-0.00553527, 0.0670422, 0.997735), -151.705
    ( -64.6012696231, -48.7071322767, -147.256476031)
    ( 62.9873287555, -46.4347952907, -148.887463217)
    ( -62.13191714, 44.5507716963, -154.434080171)
    ( 52.3190756545, 39.4087000923, -155.346655431)

    #100749
    Oliver Kreylos
    Keymaster

    The last four lines are the corner points in 3D. It looks like your fourth corner point is off (52 instead of 62 in x, 39 instead of 44 in y), which would pull in the entire box, so you might want to re-measure that.

    You can manually push out the box by adding/subtracting from the x,y positions. For example:

    (-65.6, -49.7, -147.3)
    (64.0, -47.4, -148.9)
    (-63.1, 45.6, -154.4)
    (53.3, 40.4, -155.3)
    

    will push your box outward by 1cm in each direction.

    #100762
    Dan
    Participant

    Well I scrapped Ubuntu and reloaded the PC with Fedora 21 (workstation) and upgraded to Vrui 3.1, Kinect 2.8 and Sarndbox 1.5. I followed the instructions found here: http://rpmfusion.org/Howto/nVidia to install the proprietary NVIDIA driver on Fedora (it installed version 346.35). All of this and we still have a blue line!!! Any ideas?

    #100766
    Dan
    Participant

    I discovered it is pretty hard to install different versions of the proprietary NVIDIA driver on Fedora so I decided to install version 20 instead of 21 on the PC. The default NVIDIA driver installed on this version is indeed 311.113 when I follow the instructions on this website: http://www.if-not-true-then-false.com/2014/fedora-20-nvidia-guide/ (as apposed to 346.35 on Fedora 21).

    Even with Fedora 20, NVIDIA Driver 311.113, Kinect-2.8, SARndbox-1.5, Vrui-3.1-002 and The NVIDIA GTX 770 card I am getting the blue line. I also purchased a NVIDIA GT 8400 card and also tried it on this configuration… blue line?

    #100769
    Oliver Kreylos
    Keymaster

    If you want to try different Nvidia driver versions, it’s easier to use the binary blobs directly from Nvidia’s site instead of the distribution-supplied drivers, but to be honest it’s quite the pain in the buns.

    I don’t currently have a driver version that’s known to work. When we built our initial prototype in 2012, it worked flawlessly, and when we rolled out the sandbox for open-house day in 2013, we were able to roll back to a then-recent driver version that worked, but currently, due to a newly-installed OS, we have the blue rectangle in our sandbox as well. It’s very close to the physical edges, so it’s not too annoying, but it’s there.

    #100773
    Dan
    Participant

    After taking a shot in the dark and doing some googling I came across discussions about OpenGL texture clamping modes. I went into NVIDIA X Server Settings, X Server Display Configuration, clicked on the “Advanced” button, the OpenGL Settings and unchecked “Use Conformant Texture Clamping”. I restarted sandbox… lo and behold it worked! No more blue line!

    This setup is running on Fedora 20 on a DELL T5810 with i7 quad, NVIDIA GTX 770 with driver 311.113, Kinect-2.8, SARndbox-1.5 & Vrui-3.1-002.

    #100774
    Oliver Kreylos
    Keymaster

    Awesome sleuthing! I can confirm that this works for me.

    This pointed me towards where the actual problem in the code is; I am using GL_CLAMP as clamping mode for the water level texture, which is appropriate during the water simulation itself because the sampling mode is GL_NEAREST, but when I use the water level texture to colorize the sand surface, I temporarily switch its sampling mode to GL_LINEAR, and GL_CLAMP will then access parts of border texels, which are blue.

    However, when I change the clamping mode for rendering to GL_CLAMP_TO_EDGE in the code (that’s what disabling “Conformant texture clamping” does according to Nvidia docs), it doesn’t work at all — it gets even worse. So there is still something wrong somewhere in the driver, or disabling conformant clamping doesn’t quite do what Nvidia claims.

    But for now, disabling “conformant texture clamping” is a valid workaround. I’ll add it to the common issues.

    #100776
    Dan
    Participant

    It was more luck than anything but glad to help…

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

Comments are closed.