Sitemap
cogapp

Agency for digital projects, building a better online world #museums #galleries #archives #libraries #publishing

3D space curator

--

For the recent hack day with the Heritage Connector project I teamed up with Iain to create a “game” where you fly through space exploring objects from both the Science Museum and the V&A that have been grouped by similarity.

To find out the genesis of this, read on. Or if you’re impatient, you can play it right now at https://cogapplabs.github.io/3d-space-curator/ or watch a demo video:

It all started when I was trying to get my head round the different sorts of data that the Heritage Connector had to offer. I knew about the direct connections, but was more intrigued by the similarity data after I saw the visualisation of the museum’s data. Exploring it in 2D made me wonder what it would be like to crawl around inside, and also think about how this would change if it were a 3D universe instead.

Fortunately for me, the lead developer for the Heritage Connector project, Kalyan Dutia, was able to quickly regenerate the data in 3D thanks to the wonders of UMAP, and to provide me with a TSV file of the results. This formed the data that underpinned our universe, but we still needed some way to explore it. As luck would have it, I had just come across Mehdi Zed’s truly impressive Across The Multiverse which provided exactly the kind of in-browser viewing that I imagined, and he has been good enough to write a detailed blog post explaining how he did it.

And so we were ready for the hack day itself: Iain dedicated himself to recreating the relevant parts of the universe and its navigation system, while I concentrated on replacing the randomly generated starsystems with ones based on the data from the Heritage Connector project.

Get Tristan Roddis’s stories in your inbox

Join Medium for free to get updates from this writer.

The first thing I did was to fire up Google Colab and use the excellent pandas library to consolidate the data from both museums and to remove unused information. After this exercise I was left with a handy list of 430,128 museum objects and their locations in space, which I then visualised using matplotlib:

Press enter or click to view image in full size
Press enter or click to view image in full size
Press enter or click to view image in full size
Exploring the universe: far, near, and very near

Once I was confident that there would be something to see, I switched to the world of Javascript to load this data into memory. It turned out that this was a bad idea, as 430k three.js Points displayed all at the same time overloaded my machine. So I switched to only rendering a subset of them each time, into what I called a ‘sector’ of the overall space.

Press enter or click to view image in full size
Iain seeing stars

Meanwhile, Iain had been busy adding a way for us to see the full information for each object. He used the concept of raycasting to find out which objects were in our sightline, and then picked the closest. He also added a reticle to help people aim, and made this switch from red to green when things were aligned.

A starscape with a reticle

The TSV data file only included the title and URL for each object, so his next task was to use the latter to send a query to the respective APIs from the Science Museum and the V&A to retrieve fuller information, including an image of the object when available. He added a lick of retro-game styling with a suitably pixelated font, and lo! we had the final interface:

Press enter or click to view image in full size
Stars, bookmarks, object details, navigation

The last features we added were the ability to bookmark interesting objects so that you could click on your list after having finished exploring, plus a hyperspace button to bounce you to a different sector and allow you to explore the objects there instead. We also considered adding a “deaccession laser cannon” to remove objects, but thought this wouldn’t go down too well with the curators.

So there you have it. You can explore the object space yourself (currently only for devices with a keyboard) or check out the source code if you want to adapt it.

--

--

Tristan Roddis
Tristan Roddis

Written by Tristan Roddis

Director of Web Development at @Cogapp

cogapp
cogapp

Published in cogapp

Agency for digital projects, building a better online world #museums #galleries #archives #libraries #publishing