# Cinder-VR: Initial Release

**URL:** <https://discourse.libcinder.org/t/cinder-vr-initial-release/143>\
**Category:** CinderBlocks\
**Created:** [July 8, 2016, 5:03am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143 "2016-07-08T05:03:32Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaoticbob](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@chaoticbob](https://discourse.libcinder.org/u/chaoticbob)\
**Post date:** [July 8, 2016, 5:03am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/1 "2016-07-08T05:03:32Z")

</div>

Hi Everyone,

Been a while since my last post…and that was on the old forums. Happy to be posting this on a shiny new forum!

Today (7/7) is the birthday of Cinder’s fearless leader, Andrew Bell. There’s no known history of any Cinder birthday traditions so in following with that - I’d like to wish him a “Happy Birthday!” along with introducing Cinder-VR: [https://github.com/cinder/Cinder-VR](https://github.com/cinder/Cinder-VR)

Nothing says caring like C++.

VR is pretty hot right now - and it’s also fun to play with! About a month ago, we set out to consolidate VR functionality into one place and try to make it as accessible to Cinder users as much as possible. Poor @num3ric had to endure endless questions about the Oculus Rift 🙂 - hopefully he’ll forgive me one day. Starting with @num3ric’s [Cinder-OculusRift Block](https://github.com/num3ric/Cinder-OculusRift) the design was evolved to incorporate OpenVR for the HTC Vive.

Currently, OpenGL is the default and only supported render. We’re looking into making Vulkan possible in a sane way.

Cinder-VR will attempt to automatically detect which headset is present when it starts up. It has not been tested on a system with both plugged in. If someone has this config, please let us know how it turns out. 🙂

What APIs are used?

- Oculus Rift - Oculus SDK
- HTC Vive - OpenVR (Rift doesn’t always play nice with OpenVR - so that combo is not recommended)

What controllers are supported?

- Oculus Rift - Remote and Xbox controller (Touch will be added once it’s released)
- HTC Vive - Vive Controllers

There were two primary design goals:

1. Support major devices (Rift and Vive for now) that accessible to Cinder users
2. Create common coordinate system between the different environments (Rift and Vive)

As far as coordinate systems go, the major things to know:

- Device Coordinate System - coordinate system that’s local to the device (similar object space for those familiar with 3D packages)
- Tracking Coordinate System - base coordinate system that’s used by the device to track its position.
- World Coordinate System - coordinate system defined by an “origin” matrix applied to the Tracking Coordinate System to move the origin into a more accessible place.

The samples provide an idea of how all this comes together. More samples to come soon! @bantherewind has been talking one up.

Please check it out and let us know what you think! This is the initial release, so still very much a WIP. We welcome any feedback to improve the design so Cinder-VR becomes a solid VR solution taht works for Cinder users!

Thanks to @num3ric and @bantherewind for reviewing the code before it was initially release.

I’ll update with a cool screenshot soon.

Cheers,  
Hai

---

<div class="post-metadata">

**Author:** ![vinjn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/vinjn/32/44_2.png) [@vinjn](https://discourse.libcinder.org/u/vinjn)\
**Post date:** [July 8, 2016, 6:14am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/2 "2016-07-08T06:14:33Z")

</div>

Great!

One question, is GoogleVR on the road-map?

---

<div class="post-metadata">

**Author:** ![chaoticbob](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@chaoticbob](https://discourse.libcinder.org/u/chaoticbob)\
**Post date:** [July 8, 2016, 6:17am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/3 "2016-07-08T06:17:52Z")

</div>

Once DayDream matures enough - we’ll take a look if it’s possible to integrate.

I don’t currently know enough about it to make any good guesses.

Hai

---

<div class="post-metadata">

**Author:** ![Simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Simon](https://discourse.libcinder.org/u/Simon)\
**Post date:** [July 8, 2016, 9:01am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/4 "2016-07-08T09:01:32Z")

</div>

Looks great Hai!  
Clean code, full controller support and nice samples, that’s amazing!  
Any plan to add audio at some point?

---

<div class="post-metadata">

**Author:** ![chaoticbob](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@chaoticbob](https://discourse.libcinder.org/u/chaoticbob)\
**Post date:** [July 8, 2016, 9:03am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/5 "2016-07-08T09:03:24Z")

</div>

Thanks, Simon!

Audio and haptic feedback are on the list. Audio will probably require some help from Cinder’s resident audio experts.

---

<div class="post-metadata">

**Author:** ![mike](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/mike/32/56_2.png) [@mike](https://discourse.libcinder.org/u/mike)\
**Post date:** [July 8, 2016, 5:08pm UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/6 "2016-07-08T17:08:33Z")

</div>

Extremely excited about this! Thanks so much for all of your hard work, Hai

---

<div class="post-metadata">

**Author:** ![nay](https://avatars.discourse-cdn.com/v4/letter/n/8e7dd6/32.png) [@nay](https://discourse.libcinder.org/u/nay)\
**Post date:** [July 11, 2016, 2:31am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/7 "2016-07-11T02:31:37Z")

</div>

Awesome, we just got our hands on a Rift - can’t wait, thanks! … and happy birthday Andrew!!

---

<div class="post-metadata">

**Author:** ![herc](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@herc](https://discourse.libcinder.org/u/herc)\
**Post date:** [July 11, 2016, 9:36am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/8 "2016-07-11T09:36:38Z")

</div>

fantastic! cinder just got even more awesome !

---

<div class="post-metadata">

**Author:** ![herc](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@herc](https://discourse.libcinder.org/u/herc)\
**Post date:** [July 11, 2016, 10:01am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/9 "2016-07-11T10:01:31Z")

</div>

will test it today at home (where i have a vive). cheers !

---

<div class="post-metadata">

**Author:** ![ISB](https://avatars.discourse-cdn.com/v4/letter/i/9dc877/32.png) [@ISB](https://discourse.libcinder.org/u/ISB)\
**Post date:** [July 11, 2016, 8:50pm UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/10 "2016-07-11T20:50:10Z")

</div>

Tested on Vive, works fantastic! Can’t wait to dive in to VR projects with this.

---

<div class="post-metadata">

**Author:** ![andrewfb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/andrewfb/32/2_2.png) [@andrewfb](https://discourse.libcinder.org/u/andrewfb)\
**Post date:** [July 12, 2016, 3:52am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/11 "2016-07-12T03:52:09Z")

</div>

Our Vive finally arrived today and I got to fire this up - worked perfectly right out of the box. Thanks for this Hai - one of the best and probably the most abstract birthday gift I’ve ever received :).

-Andrew

---

<div class="post-metadata">

**Author:** ![djTomServo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/djtomservo/32/8_2.png) [@djTomServo](https://discourse.libcinder.org/u/djTomServo)\
**Post date:** [July 12, 2016, 4:58pm UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/12 "2016-07-12T16:58:35Z")

</div>

Awesome and timely! I’ll definitely be giving this a look…

Also related, some folks know this, some don’t, I left Intel and moved to HTC recently, so if anyone has Vive questions, technical or otherwise, let me know and I’ll do my best to get you an answer.

---

<div class="post-metadata">

**Author:** ![notlion](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/notlion/32/11_2.png) [@notlion](https://discourse.libcinder.org/u/notlion)\
**Post date:** [July 12, 2016, 8:32pm UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/13 "2016-07-12T20:32:39Z")

</div>

Just perused through the samples and some of the library code. This looks great! I can’t wait to jump in. Thanks for putting this out there, Hai. And happy belated birthday, Andrew!

---

<div class="post-metadata">

**Author:** ![jtnimoy](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/jtnimoy/32/117_2.png) [@jtnimoy](https://discourse.libcinder.org/u/jtnimoy)\
**Post date:** [July 27, 2016, 12:21am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/14 "2016-07-27T00:21:13Z")

</div>

hey, just arriving now. whatup!

---

<div class="post-metadata">

**Author:** ![chaoticbob](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@chaoticbob](https://discourse.libcinder.org/u/chaoticbob)\
**Post date:** [August 18, 2016, 2:57am UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/15 "2016-08-18T02:57:12Z")

</div>

**UPDATE** : Added a Hmd:::setLookAt( pos ) to allow for teleporting around in world space.

> <https://github.com/cinder/Cinder-VR/blob/master/include/cinder/vr/Hmd.h#L94>

> **[cinder/Cinder-VR](https://github.com/cinder/Cinder-VR/tree/master/samples/TeleportBasic)**
>
> Contribute to cinder/Cinder-VR development by creating an account on GitHub.

Works on both Rift and Vive!

More complex version of that function will come once I figure out why the rotation matrix is collapsing in on itself when another rotation on top.

---

<div class="post-metadata">

**Author:** ![chaoticbob](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@chaoticbob](https://discourse.libcinder.org/u/chaoticbob)\
**Post date:** [September 9, 2016, 7:41pm UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/16 "2016-09-09T19:41:15Z")

</div>

Minor updates to Cinder-VR block. Added more mirroring options:

- Distorted (already existed)
- Undistorted
- Left/Right Eye
- Cyclops (HMD cnetered)

You can find these in the Teleport sample.

**Distorted**

 ![](https://canada1.discourse-cdn.com/flex030/uploads/libcinder/original/1X/5e4b61d0162a54089d9220aa0bf344ac9a342e5e.png)

**Undistorted**

 ![](https://canada1.discourse-cdn.com/flex030/uploads/libcinder/original/1X/77d5e37dceec59eb9e7b48d9f6bf23a901a90c6a.png)

**Left, Right and Cyclops all look kinda the same - so you get just one screenshot**

 ![](https://canada1.discourse-cdn.com/flex030/uploads/libcinder/original/1X/a4ad16413f69952fb3a8fa9844844e51964f9866.png)

---

<div class="post-metadata">

**Author:** ![rogiermars](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/rogiermars/32/35_2.png) [@rogiermars](https://discourse.libcinder.org/u/rogiermars)\
**Post date:** [December 20, 2016, 9:25pm UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/17 "2016-12-20T21:25:10Z")

</div>

He guys I’m new to vr but really like to dig in. Question is:  
What to buy? Valve or oculus? Also does libcinder-be work with roomscale vr and the remote controllers that valve and the rift supplies?

Thanks

Roger

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://discourse.libcinder.org/u/dave)\
**Post date:** [February 12, 2019, 5:14pm UTC](https://discourse.libcinder.org/t/cinder-vr-initial-release/143/18 "2019-02-12T17:14:20Z")

</div>

Hi everyone,  
A quick question here - It has been asked before in this discourse with no answer. I have a HTC Vive and starting the view works fine and all, but what if I want to stop rendering to vive device (monitor only). endSession @ openvr causes cinder to crash. Any ideas on this topic?

**Edit:** Visual Studio outputs a warning that some files output same obj file - it makes a difference which (Context.cpp for example) file was being built last. Renaming \cinder\vr\context.cpp to \cinder\vr\icontext.cpp (controller, device manager too) resulted in a different obj to be build and endSession working properly. A quick patch.
