SpaceNavigator support

Has there been any discussion on this forum about anyone working on support for the SpaceNavigator devices from 3Dconnexion? These are really useful tools for working with virtual globes. If anyone is interested in working on it please contact me. Thanks.

Oh yea, I’ve been using 2 Space Navigators at the same time in Cesium for a little over a month now. 1 for 6DOF on the Camera, and the other for fov zoom which leaves me with 5 unused axis. At the moment the code is in an app. What I should do is incorporate it into a branch of ScreenSpaceCameraController.js which handles reacting to input devices and turning them into camera movements, then all apps could use it.

Some videos I made using Space Navigators in Cesium

The first few videos don’t have proper scaling or smoothing, which I added for later videos.

I was also using Space Navigators for Google Earth API

Unfortunately no dynamic fov zoom control there, I had to use a ‘tour hack’ to change the fov. Doesn’t matter much now as Google Earth API won’t be around next year.

Hyper - we would welcome this as a plugin: https://github.com/AnalyticalGraphicsInc/cesium-plugins-list

Thanks for the support!

Patrick

Plug-ins seem like a good implementation to use, thanks Patrick, for pointing that out. This works for all 3DMice, not just the Space Navigator. To use the plugin simply include a js file in the html file. I suppose one can add it to any Sandcastle app by inserting the include into the html textarea. Getting the input is very easy. Finding a good way to switch movement modes is something I need to work on (not everyone has multiple 3Dmice plugged in.) Such as ‘true Cartesian’ like I’m doing in Cesium where XYZ are Earth-Fixed coordinates, or ‘curved Cartesian’, which was what I was doing in Google Earth API where XY are perpendicular Great circles and Z is radius. At low altitude you don’t really notice a difference between the two. Perhaps switch Cartesian modes using a button and enable rotate around a point when pressing the control key.

There are two major caveats, however, which is probably why I didn’t release this earlier, as I was awaiting fixes:

First caveat: Each time you boot your computer the order of your controllers in the array is basically random, even they are plugged into the same USB ports as before. So it swaps left and right, so what right, just swap what left and right does? Well for whatever reason different firmware of Space Navigators have different ranges, one goes -4 to 4, while another goes -46 to 46. It’s supposed to be -1 to +1, but that is not the case. I could have a calibration function where it asks you to max an axis for it to test to determine its range. There’s no other way to tell them apart that I know of.

Second caveat: If you switch tabs, minimize browser, or reload the page, POOF…your controller is disconnected from the browser. Only way to reconnect your controller is to shut down the browser by closing all tabs. Very annoying! This is why I’ve been using Opera for Cesium; I don’t want to close all of my tabs in Chrome all the time! (Opera and Chrome both use Chromium as a base engine.)

To do 3DOF rotation in Google Earth API I had to constantly convert HPR angles to orientation vectors (rotate them) then back to HPR angles. In Cesium I simply call a look function to rotate around any vector. Cesium is very easy to work with!

I’ve just added keyboard support yesterday, so if you don’t have a 3DMouse you can still try out the various movement schemes. You can do any key combination your keyboard is capable of. I’ve encountered some keyboards that don’t allow e-f-k to be pressed at the same time though. It supports any number of simultaneous 3DMice as well, I have 2 hooked up: one for 5DOF w/FOV control and one for 6DOF.

The plugin defaults to a 5DOF movement scheme with radius change and movement along ‘perpendicular Great circles’. Yaw is around camera position vector, and pitch controls the angle between camera direction and camera position vector. Roll in 5DOF controls FOV. You can even pitch upside down and the controls will reverse accordingly. Roll is always leveled (0 or 180deg.)

Cesium standard movement controls are along camera direction, rotate around Earth’s North-South pole (0,0,1), and rotate around a ‘right vector’ obtained by crossing (0,0,1) and camera position. This mimics rotating a physical globe mounted on a stand. There is no physical stand that allows one to rotate a globe along any arbitrary Great circle though, save for one levitated via air flow or and electric/magnetic field.

6DOF option is great for interplanetary travel. At the moment Cesium features the Earth, the Moon, and the Sun(sprite). You can reach the Sun in under a minute, so you really can travel at warp speed! Though variable controllers like a 3DMice would be required for fine control at high speeds. Later I plan to make something like a cockpit instrument panel with a plethora of readouts, many of which will aid in navigation.

https://github.com/WarpDrive/Cesium-SpaceNavigator

Another reason to use a 3DMouse is not only do you have 350 levels per direction (as opposed to just 1 with keyboard) and that it is incredibly intuitive, but you can also perform all 6 axis at the same time (and with one hand.)

Keyboards have a limited amount of keys that can be pressed at the same time

Microsoft provided a test here (some keyboards can’t even handle as few as 3 keys at the same time for certain combinations)

http://www.microsoft.com/appliedsciences/content/projects/KeyboardGhostingDemo.aspx

An explanation of the electronics involved

http://www.microsoft.com/appliedsciences/content/projects/AntiGhostingExplained.aspx

Chromium browsers (Chrome/Opera) will no longer have the annoying disconnect issue! Someone at the Chromium dev team bought a Space Navigator a few days ago and determined that it was a Raw Input issue and fixed it! This fixes all Raw Input devices, not just 3DMice. https://code.google.com/p/chromium/issues/detail?id=413805 They are currently working on getting the range normalized as well.

Chromium browsers remain the only ones that currently support 3DMice, which are categorized as Multi-Axis USB HID devices.

I’ve assisted in squashing the only remaining Raw Input bug in Chromium https://code.google.com/p/chromium/issues/detail?id=482744
Now 3D Mice shall work flawlessly in Chrome/Opera once these fixes find their way into future versions of these browsers.

The fixes are already in today’s Chrome Canary version 44.0.2391.0 ! Now you can minimize browser, switch tabs, reload, all without fear of losing connection to the 3D Mouse (or any other Raw Input device.) I already updated my test page for the proper -1 to +1 input range, along with updating to Cesium 1.9.

Did you update the files since 2015? With current software the SpaceMouse cannot control Cesium's camera.