I am working on Oculus Rift support in the Game Engine. I got the input pretty fast, i wrapped the (Boost Licenced) OpenHMD library to Python, and got the sensor data pretty easy. With some transformation hacking, I got the camera rotation. The wrapper can be found in my github: https://github.com/lubosz/python-rift
I didn’t publish an example yet how to use it, I will provide a blend file and the python code at some time.
Blender does stereo side-by-side, but when I apply such shader, the render result is asymmetric and I don’t get why. It’s symmetric for mono and above-below stereo.
The problem explained, renderings, the GLSL shader and a blend file can be found in my stackexchange post:
The 2d filter and the patch work flawlessly (cmake + mingw32 w/ blender 2.68 standard build. Fov= 108 / resolution = 1280 x 800). I was surprised at how much better the overall effect was compared to shoe horned commercial titles like Skyrim on the Rift. Thank you both! I think this warrants a GraphicAll build.
@PaulStormblader
The rasterizer patch works for all 2d filters including customs but it only fixes the primary problem of the filters being applied more strongly to the left eye than the right. Many filters, like SSAO, will have to be manually adjusted because the results will be offset due to the spherical mapping.
So is this patch making Blender fully compatible with the Oculus Rift? Any video to show how this work? and the most important question… if the patch works, it is going to be added into the official trunk?
I’m trying to get it working but PyRift shows import problem :
I’m trying the simple command inside blender :
from game_engine_rift.rift import PyRift
and in the console I get :
ImportError: libopenhmd.so.0: cannot open shared object file: No such file or directory
I’m on Ubuntu 13.10
I’ve got the right “rift.cpython-33m.so” file built as requested (with cython 0.19).
I had to change a bit setup.py and CMakeList.txt since openhmd.h is inside “usr/local/include/openhmd” and not “/usr/include/openhmd”
I’ve found that “libopenhmd.so.0” is in fact in “/usr/local/lib/”. Why is it not found by the module??
By the way, OpenHMD is working great with my Oculus Rift!! I would love to see that inside Blender!
At the moment I am working with Oculus Rift and trying to build an easy working pipepline for artists. There are three ways which I found so far:
-Unity Game engine (which is unfortunately only working in unity pro, which costs some 1500$. I have that licence but not every artist can afford it)
-Blender Game engine + Delicode NiMate middleware (Which costs some, but unfortunately it is not so stable and only works with a kinect)
Ogre3D, which looks good working but needs toooo mucj coding for a visual artist.
Do you know maybe a 4th way which could work better?
Of course you can! I’ve begun to develop my projects for Windows at first as for me… But I advise you (as I was advised when I begun) to switch to Linux: The import of addons was trickier for me on Windows.
If you know nothing of linux, I don’t see a problem since with ubuntu for example as I use now, you’ll find yourself in known territories! No problem to switch to that
Thanks a lot Moguri for your patch by the way, you did a great job!
Okay, I’ve managed to get a fair good distorsion effect, using the script, and then tweaking with the “scaleFactor”
But I was wondering how to compute these number : HmdParam, Scale, ScaleIn, like described in the SDK.
Even if The Rift SDK isn’t GPL compatible, the entire source is available to help us to know how it’s done
I’m waiting for Oculus Rift support for BGE as well, and hope that will be added by default. Let us know how it goes, and hopefully a dev can officially accept this patch.