Skip to content

Commit

Permalink
Merge pull request #9 from BastiaanOlij/asset_105_win
Browse files Browse the repository at this point in the history
Preparing release 1.0.5
  • Loading branch information
BastiaanOlij authored Mar 2, 2020
2 parents d4763da + 3e85712 commit 396b9ae
Show file tree
Hide file tree
Showing 28 changed files with 17,544 additions and 125 deletions.
9 changes: 9 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Contributors
============

This plugin has mostly been developed by [Bastiaan Olij](https://github.com/BastiaanOlij).
Special thanks to [Benedikt](https://github.com/beniwtv) for doing all the work on overlay support.

Other people who have helped out by submitting fixes, enhancements, etc are:
- [RMKD](https://github.com/RMKD)
- [Bruvzg](https://github.com/bruvzg)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Bastiaan Olij
Copyright (c) 2018-2020 Bastiaan Olij

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
52 changes: 6 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Godot OpenVR GDNative module
This module is provided as is, all files are contained within the addons/godot-openvr-asset folder

This module requires **Godot 3.1 or newer** to run.
This module requires **Godot 3.1 or newer** to run, **Godot 3.2** is highly recommended.

The scenes subfolder contains a number of godot scenes that help you set up your project.
For basic functionality start with adding ovr_first_person.tcn to your project.
Expand All @@ -13,54 +13,14 @@ https://github.com/GodotVR/godot_openvr
Also note that we have a support asset containing a number of useful scenes to get you going building VR applications in Godot:
https://github.com/GodotVR/godot-vr-common

Using the main viewport
-----------------------
The ARVR server module requires a viewport to be configured as the ARVR viewport. If you chose to use the main viewport an aspect ratio corrected copy of the left eye will be rendered to the viewport automatically.

You will need to add the following code to a script on your root node:

```
var interface = ARVRServer.find_interface("OpenVR")
if interface and interface.initialize():
# Tell our viewport it is the arvr viewport:
get_viewport().arvr = true
# turn off vsync, we'll be using the headsets vsync
OS.vsync_enabled = false
# change our physics fps
Engine.target_fps = 90
# make sure HDR rendering is off (not applicable for GLES2 renderer)
get_viewport().hdr = false
```

Using a separate viewport
-------------------------
If you want control over the output on screen so you can show something independent on the desktop you can add a viewport to your scene.

Make sure that you turn the arvr property of this viewport to true and the HDR property to false. Also make sure that both the clear mode and update mode are set to always.

You can add a normal camera to your scene to render a spectator view or turn the main viewport into a 2D viewport and save some rendering overhead.

You can now simplify you initialisation code on your root node to:

```
var interface = ARVRServer.find_interface("OpenVR")
if interface and interface.initialize()
# turn off vsync, we'll be using the headsets vsync
OS.vsync_enabled = false
# change our physics fps
Engine.target_fps = 90
# make sure HDR rendering is off (not applicable for GLES2 renderer)
get_viewport().hdr = false
```
Documentation on using this asset can be found here:
https://github.com/GodotVR/godot-openvr-asset/wiki

HDR support
-----------
HDR support for the headset is currently not available. OpenVR does not accept Godots HDR color buffer for rendering. A solution is currently under review.
HDR support was added to OpenVR but requires the keep_3d_linear flag added to Godot 3.2. This will ensure rendering inside of the headset is correct. The preview on screen will look darker. You can solve this by using a separate viewport.

When using Godot 3.1 you need to either use the GLES2 renderer or turn HDR off on the viewport used to render to the HMD.

Licensing
---------
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.md → addons/godot-openvr/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changes to the Godot OpenVR asset
Note, version numbers listed here are the version number assigned to the asset. Each time a new version is uploaded to the asset store we will increase the version number.
More frequent updates may be available on the source repository.

1.0.5 - 1 March 2019
--------------------
- Now using OpenVR 1.9.16
- Added support for overlays

1.0.4 - 27 March 2019
---------------------
- Build for Godot 3.1
Expand Down
21 changes: 21 additions & 0 deletions addons/godot-openvr/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018-2020 Bastiaan Olij

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions addons/godot-openvr/OpenVRConfig.gdns
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="NativeScript" load_steps=2 format=2]

[ext_resource path="res://addons/godot-openvr/godot_openvr.gdnlib" type="GDNativeLibrary" id=1]

[resource]
resource_name = "OpenVRConfig"
class_name = "OpenVRConfig"
library = ExtResource( 1 )
8 changes: 8 additions & 0 deletions addons/godot-openvr/OpenVROverlay.gdns
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="NativeScript" load_steps=2 format=2]

[ext_resource path="res://addons/godot-openvr/godot_openvr.gdnlib" type="GDNativeLibrary" id=1]

[resource]
resource_name = "OpenVROverlay"
class_name = "OpenVROverlay"
library = ExtResource( 1 )
2 changes: 2 additions & 0 deletions addons/godot-openvr/bin/osx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!*.*
.DS_Store
1 change: 1 addition & 0 deletions addons/godot-openvr/bin/osx/OpenVR.framework/Headers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Versions/Current/Headers
1 change: 1 addition & 0 deletions addons/godot-openvr/bin/osx/OpenVR.framework/OpenVR
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Versions/Current/OpenVR
1 change: 1 addition & 0 deletions addons/godot-openvr/bin/osx/OpenVR.framework/Resources
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Versions/Current/Resources
Loading

0 comments on commit 396b9ae

Please sign in to comment.