NUIverse for Windows

By
Dave
Project
Published
2 Apr 2013 15:05
Last Modified
2 Apr 2013 22:31

As previously discussed, my manipulation processor now supports WM_TOUCH messages, which means that I can do native multitouch on both Windows 7 and Windows 8. I have therefore updated NUIverse for a Windows-release, as shown below in Figure 1.

NUIverse for Windows

Figure 1. NUIverse for Windows (running windowed).

There are some key differences to the PixelSense-release, as follows:

  • No support for tagged objects, since it does not use the Surface 2.0 runtime, nor require PixelSense hardware (though it will run on the latter outside of the Surface Shell).
  • Since horizontal form-factor multitouch hardware is generally less-common than vertical form-factors, I have added a single-orientation configuration setting. This is true by default, since even if mounted horizontally, many touchscreens will not deliver the multitouch performance required for simultaneous multi-user interaction.
  • Since the Surface Shell added chrome to close the application and by default the application runs full-screen, either drag in a menu control (see note below) and use the exit menu, or press ESC if a keyboard is present.

One of the current issues when running a full-screen desktop app on Windows 8 is that the operating system captures initial touches used for edge-swipes. If touch is maintained after an initial edge-swipe, further edge-swipes are not captured and therefore will add NUIverse controls to the screen. An alternative is to touch the screen and simultaneously edge-swipe, or to use two fingers when edge-swiping.

Several key configuration settings (in NUIverse.exe.config) are worth mentioning. Note that there is no graphical interface for these settings, and that the configuration file needs to be edited by hand (I would recommend saving a copy first):

  • PixelWidth and PixelHeight control the resolution used for both windowed and full-screen mode.
  • FullScreen controls whether the application runs full-screen (true) or windowed (false).
  • For the configuration settings specified in mm to work correctly, set PixelsPerMm to the appropriate value, taking account physical screen size and either PixelWidth or PixelHeight (square pixels are assumed).

To install NUIverse for Windows, proceed as folows:

  1. Install the XNA 4.0 runtime.
  2. Download and extract NUIverse for Windows (2.75Mb) to a suitable location.
  3. Low-resolution textures for several planets and moons are included, but extras can be created or downloaded from http://nuiverse.com.

Extensibility Model Part 2

By
Dave
Project
Published
20 Jan 2013 10:20
Last Modified
20 Jan 2013 21:31

I previously mentioned that I had implemented an extensibility model, and thought it useful to discuss an example of adding a simple model to earth orbit, as shown below in Figure 1 (further images of which are in the gallery).

Model

Figure 1. Model added to earth orbit. Colonial Raptor model (based on new TV series) by Coxxon.

The "extra" is defined as a folder containing the following items:

  • A model in XNB format. XNA has built-in content importers for .x and .fbx (2009.1) formats.
  • An optional pair of textures for both diffuse and emissive textures. These are standard image files.
  • An XML file defining the "extra", in this case as shown below in Listing 1.
<?xml version="1.0" encoding="utf-8"?>
<system name="solar">
  <planet name="earth">
     <!-- satellite
       name = object name
       box = box for pick tests, normalized relative xyz size (currently not used)
       size = maximum length, km
       description = label text
       specintensity = specular intensity, default 0.50 in app.config
       specpower = specular power, default 10 in app.config
       scale = scale factor to unit length, default 1
       model = path to model .xnb file
       texture = path to texture file
       emissive = path to emmissive texture file
       rotation = rotation = sidereal rotation period, days
    -->
    <satellite name="raptor" box="1,1,1" size="0.0086" description="raptor" specintensity="0.1" specpower="10" scale="1" model="colrap1cox.xnb" texture="texture/colrap1cox.jpg" emissive="emissive/colrap1cox.jpg" rotation="1000" >
      <!-- orbit
         a = semi-major axis, km
         e = eccentricity
         w = argument of perifocus, degrees (aka longitude of perihelion, argument of perigee)
         i = inclination to xy plane, degrees
         node = longitude of ascending node, degrees
         M = mean anomaly, degrees (J2000.0)
         P = period, days
         plane = orbital plane (Ecliptic, Equatorial, Laplace), default Ecliptic 
      -->
      <orbit a="6871" e="0" i="0" node="0" w="0" M="0" P="1000" plane="Equatorial" />
    </satellite>
  </planet>
</system>

Listing 1. XML configuration file for satellite model "extra"

This configuration file specifies that the model should be added to the planetoid "earth" in the "solar" system, both of which are defined in system.xml configuration file.

In order to scale the model correctly, a scale factor is applied to normalize the model to unit length. This can either be applied in the XML scale attribute, or specified in the XNA content processor scale attribute, in which case the XML attribute can be set to 1. A size attribute then defines the maximum length of the model in km. The Colonial Raptor shown in Figure 1 was defined with a size of 8.6m.

The textures are defined in sub-folders "texture" and "emissive". If an emissive texture is not available, an all-black image (e.g. JPEG file) can be used.

The rotation period defines how long it takes for the model to rotate while orbiting the planetoid. If this is the same as the P orbital element, then the same face of the model is presented to the planetoid throughout the orbit. The remaining standard orbital elements specify that the model is in a circular equatorial orbit at an altitude of 500km (the earth has a radius of 6,371km).

The extra is included automatically when added to the /data/extras folder.

NUIverse Download

By
Dave
Project
Published
4 Sep 2012 20:41
Last Modified
13 Jan 2013 18:05

A beta build of NUIverse is now available for download at http://www.nuiverse.com, along with some brief documentation and additional data downloads.

Note that NUIverse is only available for installation on the Samsung SUR40 with Microsoft PixelSense, and that it is still one of my spare-time projects. As such, many features remain un-implemented and bugs remain to be fixed. However, I welcome feedback and will do my best to respond to any questions as soon as possible.

NUIverse Video Part 2

By
Dave
Project
Published
19 Jul 2012 09:59
Last Modified
13 Jan 2013 17:17

I had the opportunity to demo NUIverse at the Microsoft Worldwide Partner Conference last week, and I thought I'd share the video which shows some updates since the previous recording.

Video 1. NUIverse on Samsung SUR40 with Microsoft PixelSense.

Key things demonstrated in the video include:

  • Multi-touch to control complex camera motion
  • Multi-direction UI consistent with a horizontal display form-factor and multiple concurrent users
  • Level-of-Detail rendering for planetary bodies and backgrounds
  • Independant control of time and position
  • Control selection using just-in-time-chrome
  • Satellite model rendering

Planet Selection

By
Dave
Project
Published
7 Jul 2012 18:10
Last Modified
10 Jul 2012 03:25

While it is possible to select a planetary body using a touch-and-hold gesture on its label or the body itself, finding the planet can be tricky. At the very least the orbital lines and labels need to be visible. A bigger problem, however is that the "inner" and "outer" planet orbits have markedly different scales. Hence when in orbit around an outer planet it will not generally be possible to resolve an inner planet for touch-and-hold.

I therefore added a further control for selecting a planet, as shown below in Figure 1. Since moons are relatively close to a planet in comparion to other planets, touch-and-hold can be used to move to a moon in orbit around the currently selected planet. The control can be added from the tag selection bar, as shown below in Figure 1. Touching a planet switches the camera to orbit mode around the body.

Planet Selector

Figure 1. Planet Selector Control. Earth is the current planetary system.

The planet names and images are built at run time to ensure that they reflect any extensions to the base data.

Wallpaper

By
Dave
Project
Published
21 Jun 2012 21:54
Last Modified
21 Jun 2012 21:56

Following on from my post on panoramas, I thought I would make available some desktop backgrounds for multi-monitor configurations. The following are for dual monitors, each full-HD (1920x1080).

Wallpaper Wallpaper Wallpaper Wallpaper

Tag Support

By
Dave
Project
Published
10 Jun 2012 22:24
Last Modified
13 Jan 2013 17:19

I currently use Surface Tags for menus, reticles, compasses, and filters.

There are both advantages and disadvantages to this approach. Advantages inlcude the ability of a tag to provide context of which control to add to the screen, and the ease at which a physical object can be moved, rotated, and removed (i.e. no requirement for "close" buttons). Disadvantages include the requirement to have the tags, and what to do in either Windows 7 multi-touch or vertical Surface deployments. With the latter in-mind, I was keen to explore a "tag-free" mode, which uses touch instead of tags.

In order to add a control to the screen without a tag, I needed a gesture which was easy to discover, and which had a low chance of being invoked accidentally. I opted for an analogy to sliding a physical tag from the bezel onto the edge of the screen. To add a default control, I drag a touch from the edge of the screen. In order to add different controls, I slide in a default "virtual tag" until the tag "selection bar" appears, then move in an orthogonal direction to cycle through a circular list of controls, then continue sliding in to place the control. These steps are illustrated below.

Tag Free Hint

Figure 1. Hint to "tag-free" default control.

Tag Free Menu

Figure 2. Slide-in "tag-free" default (menu) control.

Tag Free Compass

Figure 3. Cross-slide to "tag-free" compass control.

Tag Free Reticle

Figure 4. Cross-slide to "tag-free" reticle control.

In a similar way to physical tags, I can rotate the "virtual tags" using two or more touch points placed where the physical tag would normally reside. To remove a tag, I slide or flick it to the edge of the screen.

In order to best support multiple users and/or orientations, it is possible to slide in controls from each edge of the Surface, with the tag "selection bar" and controls being oriented appropriately.

Panoramas

By
Dave
Project
Published
5 Jun 2012 22:19
Last Modified
7 Jun 2012 11:09

I thought it would be interesting to create some space panoramas using screenshots from the app. Clearly there are a number of ways I could do this programmatically, but there are plenty of stitching tools avaialble. I'm using Image Composite Editor from Microsoft Research. Some initial attempts are shown below.


Panorama

Figure 1. Earth with orbit trails along the ecliptic plane.1


Panorama

Figure 2. Outer solar system with orbit trails and scale grid.1


Panorama

Figure 3. Earth with Milky Way visible along galactic plane.1


Panorama

Figure 4. Outer solar system with contellation art.1


Panorama

Figure 5. Saturn and ring system.1


Panorama

Figure 6. Earth horizon.1

I limited the above panoramas to an aspect ratio of 4.5:1, however it is of course possible to stitch much wider images, such as Figure 7, which has an aspect ratio of 6.75:1 and a field-of-view of virtually 360°.


Panorama

Figure 7. Constellations around the equator.1

1 Background filter generated from image credit Nick Risinger, skysurvey.org

Scale

By
Dave
Project
Published
28 May 2012 11:22
Last Modified
13 Jan 2013 17:47

One of the difficulties when judging distances in the solar system, other than that they are very large, is that the solar system is mostly empty space. Orbit lines only give a hint of motion and indicative scale.

I've added some planar grids to the ecliptic to try to help visualise distances at logarithmic scales starting at 1AU, with each grid fading out as the next fades in. Grids can be circular, square, or hexagonal. Circular grids are useful to visualise orbit eccentricity, perihelion and aphelion. Square grids are useful to disambiguate from orbit lines.

Scale grid

Figure 1. Circular scale grid.1

Scale grid

Figure 2. Square scale grid.1

Scale grid

Figure 1. Hexagonal scale grid.1

I've yet to find a compelling use for hexagonal grids, however they appear to be useful for Klingon tactical displays.

Additional screenshots are in the gallery.

1 Background filter generated from image credit Nick Risinger, skysurvey.org

Constellations Part 2

By
Dave
Project
Published
20 May 2012 23:45
Last Modified
22 May 2012 19:37

In part 1 I discussed adding support for drawing constellations, boundaries and asterisms, along with their names.

I've now added support for constellation art. Rather than loading individual images for each constellation shown in the camera view, I opted instead to use the same rendering approach as for background filters, which gives on-demand loading at the appropriate level-of-detail. A screenshot is shown below in Figure 1.

Constellation Art

Figure 1. Constellation art. The field-of-view is 70°.

The Space Telescope Science Institiute worked with the U.S. Naval Observatory's Library to scan and painstakingly re-touch a set of beautiful engravings from the 17th century Firmamentum Sobiescianum sive Uranographia star atlas by Johannes Hevelius1. In order to use these images, I first needed to align them with the background stars, then re-project them to a suitable format. I opted for an equirectangular projection. Whilst there is almost certainly a choice of tools available for the job, I thought it would be fun to write my own. The result of applying it to Figure 2 is shown in Figure 3 below.


Ursa Major

Figure 2. Engraving of Ursa Major, "Firmamentum Sobiescianum sive Uranographia", Johannes Hevelius, 16901, positioned appropriately over an spherical, equatorial grid of right-ascension and declination.


Ursa Major

Figure 3. Equirectangular, planar re-projection of Figure 2, resulting in vertical and horizontal lines of right-ascension and declination respectively.

The app will ship with low-res versions of the art, with higher-resolution versions available as an extra. It is, of course possible to use alternative art using the same extensibility model.

1 Image credit the U.S. Naval Observatory and the Space Telescope Science Institute.

Page