├── externals ├── oculus.mxo │ └── Contents │ │ ├── PkgInfo │ │ ├── MacOS │ │ └── oculus │ │ └── Info.plist └── oculus.mxe ├── media ├── skybox.png ├── skybox.png.license.txt └── shaders │ └── riftshader.jxs ├── .gitmodules ├── interfaces └── oculus-obj-qlookup.json ├── .gitignore ├── package-info.json ├── LICENSE.txt └── README.md /externals/oculus.mxo/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | iLaXmax2 -------------------------------------------------------------------------------- /media/skybox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grrrwaaa/max_oculus/HEAD/media/skybox.png -------------------------------------------------------------------------------- /externals/oculus.mxe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grrrwaaa/max_oculus/HEAD/externals/oculus.mxe -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "source"] 2 | path = source 3 | url = git@github.com:grrrwaaa/max_oculus.git 4 | branch = master 5 | -------------------------------------------------------------------------------- /externals/oculus.mxo/Contents/MacOS/oculus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grrrwaaa/max_oculus/HEAD/externals/oculus.mxo/Contents/MacOS/oculus -------------------------------------------------------------------------------- /media/skybox.png.license.txt: -------------------------------------------------------------------------------- 1 | Skybox.png courtesy of Roel Reijerse, from 2 | http://reije081.home.xs4all.nl/skyboxes/ 3 | Shared under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License -------------------------------------------------------------------------------- /interfaces/oculus-obj-qlookup.json: -------------------------------------------------------------------------------- 1 | { 2 | "oculus": { 3 | "category": [ 4 | "Oculus", 5 | "Jitter", 6 | "Devices" 7 | ], 8 | "digest": "Oculus provides a full interface to the Oculus Rift head-mounted display.", 9 | "module": "jitter" 10 | } 11 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Compiled Dynamic libraries 8 | *.so 9 | *.dylib 10 | *.dll 11 | 12 | # Compiled Static libraries 13 | *.lai 14 | *.la 15 | 16 | # Executables 17 | *.exe 18 | *.out 19 | *.app 20 | 21 | # Project files 22 | *xcuserdata* 23 | *.perspectivev3 24 | *.pbxuser 25 | *.DS_Store 26 | *.user 27 | *.opensdf 28 | *.xcworkspace 29 | *.sdf 30 | src/oculus.sdf 31 | *.sdf 32 | *.suo 33 | *.sdf 34 | *.sdf 35 | src/oculus.sdf -------------------------------------------------------------------------------- /package-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oculus", 3 | "type": "package", 4 | "author": "Graham Wakefield", 5 | "description": "A Max/MSP/Jitter object to provide access to the Oculus Rift HMD.", 6 | "version": "0.0", 7 | "major_version": "0", 8 | "minor_version": "0", 9 | "min_max_version": "700", 10 | "website": "https://github.com/grrrwaaa/max_oculus/", 11 | "link_mac32": "None", 12 | "link_mac64": "None", 13 | "link_win32": "None", 14 | "link_win64": "None", 15 | "alert_text": "None" 16 | } -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2015 Graham Wakefield 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /externals/oculus.mxo/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 13F1077 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | oculus 11 | CFBundleIdentifier 12 | com.cycling74.oculus 13 | CFBundleInfoDictionaryVersion 14 | 6.1.4 15 | CFBundleLongVersionString 16 | oculus 6.1.4, Copyright 2013 Cycling '74 17 | CFBundlePackageType 18 | iLaX 19 | CFBundleShortVersionString 20 | 6.1.4 21 | CFBundleSignature 22 | max2 23 | CFBundleVersion 24 | 6.1.4 25 | CSResourcesFileMapped 26 | 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 6C131e 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 11E52 35 | DTSDKName 36 | macosx10.7 37 | DTXcode 38 | 0620 39 | DTXcodeBuild 40 | 6C131e 41 | 42 | 43 | -------------------------------------------------------------------------------- /media/shaders/riftshader.jxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 51 | 52 | 53 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | oculus 2 | ====== 3 | 4 | **This repository is frozen on the Oculus 0.4.4 SDK/driver, for the developer kit. For using newer drivers and the current consumer Oculus (as well as the HTC Vive), take a look at the [Max Worldmaking Package](https://github.com/worldmaking/Max_Worldmaking_Package).** 5 | 6 | A Max/MSP/Jitter object to provide access to the Oculus Rift HMD via the LibOVR SDK. 7 | 8 | For development history & feedback, also [see discussion on the C74 forum](http://www.cycling74.com/forums/topic/oculus-rift). 9 | 10 | Here are some projects that have used this external: 11 | 12 | - [Whiter Room](https://cycling74.com/project/whiter-room-oculus-video/), Tobias Rosenberger 13 | - [Dance in the Rain](http://cargocollective.com/YKBX/Koda-Kumi-Dance-In-The-Rain-VR-Music-Video), Masato Tsutsui 14 | 15 | ## Requirements 16 | 17 | Supports Max 7 on OSX and Windows (use the 32-bit Max 7 version on Windows). Might also work in Max 6.10, but support is not guaranteed. 18 | 19 | Currently supports Oculus Developer Kit 2. Probably also works with Developer Kit 1, but not currently tested. Currently built against the LibOVR 0.4.4 beta. 20 | 21 | Oculus development in general requires a powerful GPU; integrated cards are unlikely to be sufficient. 22 | 23 | *Note that an Oculus HMD is not required to be present to work with the external; an offline simulator will be used when an HMD is not attached.* 24 | 25 | ## Installation & setup 26 | 27 | - Install the LibOVR 0.4.4 runtime/driver from [Oculus](https://developer.oculus.com/downloads/#version=pc-0.4.4-beta). Later versions of the runtime *might* work. 28 | 29 | - Once installed, run the configuration utility to configure the device for your system. 30 | 31 | - Make sure that the runtime is set to 'extended mode'. Direct-to-HMD mode cannot not currently be used (see notes below). 32 | 33 | - Configure display refresh rates to prevent judder (see notes below). 34 | 35 | - Download the repository directory and unzip into ```Documents/Max 7/Packages``` (OSX) or ```My Documents/Max 7/Packages``` (Windows). 36 | 37 | - Restart Max, and open the ```help/oculus.maxhelp``` to check that it is functioning correctly. 38 | 39 | ## Supported features 40 | 41 | - Tracking 42 | - Orientation tracking (as Jitter-compatible quat) 43 | - Position tracking & status 44 | - Example integrating HMD tracking with in-world navigation (WASD + arrow keys) 45 | 46 | - Rendering 47 | - Output rift distortion parameters, including distortion mesh 48 | - Example distortion shaders, including chromatic aberration correction 49 | - Example rendered scene 50 | - FPS monitoring (press 'f' to show in-world) 51 | - Low persistence rendering option (press 'p' to toggle this) 52 | 53 | - Display management 54 | - If more than one display is present, an additional monitor view opens on the first display when HMD goes fullscreen, and the Rift view full-screens on nth display. 55 | - Automatically orients window according to display orientation (landscape/portrait) 56 | 57 | ## TODO 58 | 59 | - Optimized predictive tracking. 60 | - Health & safety warning overlay. 61 | - Timewarp rendering. 62 | - Direct-to-Rift / SDK-rendering. Not currently possible, due to the design of the LibOVR SDK, which shims the OpenGL graphics driver, and requires this to occur before any other OpenGL calls. It is therefore incompatible with a plugin system such as Max/MSP/Jitter externals. 63 | 64 | ## Notes on jitter & judder 65 | 66 | Getting a stable experience with the oculus can present some difficulties. 67 | 68 | **Display refresh rate**: If you have another display attached to the computer (as is likely), it is very important that both the Oculus Rift and the main display are configured to the same refresh rate. If this is not the case you are very likely to experience a nauseating judder when turning your head in the Rift display. Use the display manager (Windows display manager, or Nvidia/AMD equivalent, or OSX system preferences) to reconfigure the refresh rate. (Perhaps jit.displays might also be able to do this?) The Oculus Rift performs better at 75Hz; you may have to reduce the resolution on your main display in order to enable a 75Hz refresh rate there. If this is not possible, set the Rift to 60Hz (but this will result in a more noticeable motion blur or flicker). If the display manager does not allow you to change the refresh rate (e.g. some OSX retina displays), you may have to disconnect the display entirely. 69 | 70 | **Patcher frame rate**: Additionally, the patcher must be able to render at 60-75fps to prevent nausea. If your GPU is struggling to keep this up, you can try reducing the render texture size (see help patcher). 71 | 72 | ## License 73 | 74 | MIT license; copyright 2014-2015 Graham Wakefield. 75 | --------------------------------------------------------------------------------