Skip to content

Conversation

@DigiTec
Copy link
Contributor

@DigiTec DigiTec commented Mar 11, 2019

Description:

The generation 2 touch controllers used by the Oculus Quest will have all of the same buttons and will only differ in the appearance of the model. For this reason, we are factoring the code to allow for only key attributes such as the model url, ray origin and pivot points to be changed. The rest of the model should have similar button mesh structures and so all of the same code should be used.

Changes proposed:

  • Factor existing globals for the touch controller model into a set configured by controllerType
  • Mirror the gen1 config to the gen2 config until we can upload final models.
  • Detect the device type and change the displayModel used for Oculus Quest.
  • Update code to use the displayModel properties for ray cast origin and pivot point.
Copy link
Member

@dmarcos dmarcos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Just one concern. How should an appllication discriminate between touch / quest? Supermedium for instance, displays an image with controller instructions at launch. Now there’s 1:1 mapping between physical controller and component. This breaks the pattern and applications will have to treat it differently.

left: {origin: {x: 0.008, y: -0.004, z: 0}, direction: {x: 0, y: -0.8, z: -1}},
right: {origin: {x: -0.008, y: -0.004, z: 0}, direction: {x: 0, y: -0.8, z: -1}}
var CONTROLLER_DEFAULT = 'oculus_touch_gen1';
var CONTROLLER_PROPERTIES = {
Copy link
Member

@dmarcos dmarcos Mar 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is not gen1 / gen2 more of an Oculus nomenclature? Wouldn’t be more clear for developers to call it Rift and Quest?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rift S and Quest have same Controllers

buttonTouchColor: {type: 'color', default: '#8AB'},
buttonHighlightColor: {type: 'color', default: '#2DF'}, // Light blue.
model: {default: true},
controllerType: {default: 'auto', oneOf: ['auto', 'oculus_touch_gen1', 'oculus_touch_gen2']},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not needed. Any scenario
where someone wants to support just one of them?

name: 'oculus-touch-controls',
model: this.data.model,
rayOrigin: RAY_ORIGIN[this.data.hand]
rayOrigin: this.displayModel[this.data.hand].rayOrigin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe pass the controller type (Rift, Quest) as well?

@ngokevin
Copy link
Member

@DigiTec Any ideas on differentiating touch and quest controllers?

@dmarcos
Copy link
Member

dmarcos commented May 22, 2019

@DigiTec Congrats on the Quest Launch! A-Frame works fantastically on the Oculus browser. If you can share a gltf model of the controllers we can ship this PR. Thanks for your help.

@DigiTec
Copy link
Contributor Author

DigiTec commented May 22, 2019 via email

@dmarcos
Copy link
Member

dmarcos commented May 22, 2019

@DigiTec Thanks for the update and welcome back.

Using an alternative model should be possible by doing el.setAttribute('oculus-touch-controls', 'model', false); and then adding your own model el.setAttribute('gltf-model', 'url(...)');. Overriding the built-in one might be tricky. For buttons highlight and animations to work, the user's model would have to have same parts and ids that would have to document and maintain moving forward.

@nrgapple
Copy link

Are there any updates on the issue? It seems we are still missing models for the quest.

@dmarcos
Copy link
Member

dmarcos commented Jul 25, 2019

No models yet. You should be able to use oculus-touch-controls in the meantime (with old touch models that you can replace). Buttons mapping remain the same.

@ganeshv
Copy link

ganeshv commented Aug 5, 2019

FWIW Firefox Reality has Quest controller models here: https://github.com/MozillaReality/FirefoxReality/tree/master/app/src/oculusvr/assets

@dmarcos
Copy link
Member

dmarcos commented Oct 14, 2019

@DigiTec Are there any official Quest controllers models we can use to finish up this PR? Thanks for all your help.

@DigiTec
Copy link
Contributor Author

DigiTec commented Oct 14, 2019 via email

@dmarcos
Copy link
Member

dmarcos commented Oct 14, 2019

Having this conversation internally now. We need to build some. The set we have isn’t compatible with standard three.js rendering.

@DigiTec Thanks for the quick update. We use the glTF viewer to make sure that models work in THREE / A-Frame. If possible, separate parts to animate / highlight would be great. The Touch v1 models we use are a good example. Let me know if I can do anything to help.

@dmarcos
Copy link
Member

dmarcos commented Oct 21, 2019

@Knochi has kindly contributed gen2 models on aframevr/assets#34 If they look good for everybody, we can use them with this PR in the interim until official models are available.

@Knochi
Copy link

Knochi commented Oct 23, 2019

I think these are as official as the gen1 ones. They are from the MozillaReality Repo

https://github.com/aframevr/assets/tree/master/controllers/oculus

@dmarcos dmarcos force-pushed the quest-controller-prep branch 4 times, most recently from e3baad6 to facb9ca Compare October 31, 2019 01:35
@dmarcos dmarcos force-pushed the quest-controller-prep branch from facb9ca to e2f8003 Compare October 31, 2019 01:40
@dmarcos
Copy link
Member

dmarcos commented Oct 31, 2019

I integrated the models that @Knochi kindly made based on the Mozilla Reality ones. I also adjusted the model pivot and laser-controls positions accordingly. Thanks @DigiTec and @Knochi for the beautiful work. It's much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment