Skip to main content
Up and Coming
May 10, 2013

Rift Ray-tracing

[EDIT] This now has a demo, but I'll keep the link here up to date.

Download demo
(Updated to 12 Meg. Ver 0.50 on the Twentieth of June in the Year Twenty-Thirteen)).

Hi All,

I haven't got my Rift yet (UK near the end of the Kickstarter), but have been following the goings on with interest.

I've started to have a go at doing some CUDA based ray-tracing for VR and have managed to get some basic stuff going.

Rather than warping a resulting image I've made a start at modeling the lenses in the ray projection code.
(no texturing or shadows yet, just trying to get the distortion and stereo going.)

This is what I've got so far. It's probably waaaay out, but until I get my one, I'm flying blind. :D

Note: It's a bit wide to see in the post, you may need to open the image in another tab to see the entire screen.

    152 replies

    Participant
    June 6, 2013
    DependencyWalker (32 bit) found gpsvc.dll missing. Random google says that this is a redherring...

    My crash is a .net framework crash but it allows me to continue, not an outright crash. Here's something... My .Net Framework error is different than before...
    System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    at RiftRT.Wrapper.StartUp(String& constantbg, String& pinholecamera, String& normalshader, String& sphere)
    at RiftRT.Form1.Form1_Load(Object sender, EventArgs e)
    at System.EventHandler.Invoke(Object sender, EventArgs e)
    at System.Windows.Forms.Form.OnLoad(EventArgs e)
    at System.Windows.Forms.Form.OnCreateControl()
    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    at System.Windows.Forms.Control.CreateControl()
    at System.Windows.Forms.Control.WmShowWindow(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.ContainerControl.WndProc(Message& m)
    at System.Windows.Forms.Form.WmShowWindow(Message& m)
    at System.Windows.Forms.Form.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Up and Coming
    June 6, 2013
    The SDK dynamically loads some DLLs dynamically by name, so a dependency walker may miss some of those DLLs that are not in the EXE PE import address table. It would be possible to monitor the EXE loading process to see any library load failures as they occur, but static EXE analysis can be unreliable when dynamic loading is used.
    This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
    Inspiring
    June 6, 2013
    The demo 0.45 works for me (W7-x86, GTX570M).
    However, the images do not align. It appears that both eyes are not looking in the same direction (parallel), instead my left eye is looking further towards the right and the right eye is looking toward the left. I think that's what's wrong with it.

    Here is a screenshot. At first glance, it looks OK. However, when you compare to other rift screen shots I think the center of the left and right images should be closer together.
    raytrace_screenshot.png
    I tried changing the IPD and the distortion but it didn't make a difference.

    Compare this with a tuscany screenshot: (this one is 50% size)
    screenshot_tuscany.png

    As you can hopefully see, the center of each eye is closer to the middle of the image.
    TeraBitAuthor
    Up and Coming
    June 6, 2013
    Here is a screenshot. At first glance, it looks OK. However, when you compare to other rift screen shots I think the center of the left and right images should be closer together.


    Judging by the size of the screen shot, you are not running it at 1280x800. If you setup the rift as a second extended desktop screen at the native 1280x800 resolution, or clone it at 1280x800 each, it should line up ok.

    The rays are definitely parallel as they are the same code for each eye but with a different origin.

    Regards, Lee Page TeraBit Software
    Inspiring
    June 7, 2013
    NetLog gets to 13.
    CPPLog gets to 17.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    TeraBitAuthor
    Up and Coming
    June 7, 2013

    NetLog gets to 13.
    CPPLog gets to 17.

    Now yours is a different problem all together. :?

    You get all the way through initialisation and get to the DrawFrame command. This should launch the already compiled (and validated) CUDA to do the tracing. But it never returns from the call but rather dies. :(

    Still, I've added more logging into the draw frame call now, so it should tell me on what actual statement it dies.

    Download 300kb same deal as before, unzip over the existing files. post the log step CPPLog.txt dies at please.
    Regards, Lee Page TeraBit Software
    Participant
    June 7, 2013
    Well, that version is working for me (the guy failing at Step 3/17).

    THANKS! Looks good.

    Performance for me (old host - quad core Q6600 @ 2.4Ghz) with this version on a GTX 680 is only 15 fps. Seems to be just as fast at 1280x800 as 2560x1440... Will try some other systems and drivers tomorrow.

    Mark
    TeraBitAuthor
    Up and Coming
    June 7, 2013
    Well, that version is working for me (the guy failing at Step 3/17).... 15 frames per second.

    Did you download the 300kb version posted just above? If so it has logging in the render loop, so will be dog slow, it was only meant for CyberReality. (Also you'll probably have a 50MB file with CPPLog.txt :lol: )

    If you re-download the original full install it will have the fix to let you run it, but without the render logging.
    On a GTX 470 I'm getting 60-100 FPS, so 15 FPS is a little low. But hey, at least it runs. :)
    Regards, Lee Page TeraBit Software
    Up and Coming
    June 7, 2013
    "TeraBit" wrote:
    ... If you re-download the original full install it will have the fix to let you run it, but without the render logging.
    On a GTX 470 I'm getting 60-100 FPS, so 15 FPS is a little low. But hey, at least it runs. :)

    A tradition I would like to see (used at many forums) is where the first post in a thread always contains the latest download links. This thread does not have such links, so it is hard to find the "original full install". Where is it, exactly?

    Also, could you add those links to the end of your first post? Thanks.
    This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
    TeraBitAuthor
    Up and Coming
    June 7, 2013
    A tradition I would like to see (used at many forums) is where the first post in a thread always contains the latest download links. This thread does not have such links, so it is hard to find the "original full install". Where is it, exactly?


    Sorry, I think this is because this thread didn't have a demo until about page 3. The link is:

    Download demo (Updated to 10 Meg. Ver 0.49 (The Seventh of June in the Year Twenty Thirteen)).

    And I'll add it to the top post now...Thanks. :)
    Regards, Lee Page TeraBit Software