tl;dr There’s a new content type for H5P called AR Scavenger. It features Augmented Reality. You can download it here.
Quite some time ago, Nele Hirsch approached me, asking if it was possible to create a content type in H5P that would allow to feature Augmented Reality (AR). From scratch? Quite a job! But in the wonderful world of open source software, there’s a framework called AFrame that allows you to use 3D models in a browser. And then there’s another framework called AR.js that builds upon AFrame and allows to blend 3D models into a device’s camera image. Nele pointed me towards that one. And now there’s AR Scavenger that builds upon AR.js and blends it all with H5P. It’s fair to mention that the soultion would probably not have been finish done now – but later – if the Hamburg Open Online University (HOOU) and the HAW Hamburg in particular had not partially funded this initial version.
What can I do with this?
Just take a look! Here’s the content type that you can use right away, but you’d have to use it on a device that has a camera attached to it. Then just find the markers down below with your camera – either on another screen or print them on paper.
This one should simply show you a True-False-Question, but on paper you could put any H5P content type here.
This one should show you a 3D model of a duck that’s facing out of the marker, so if you have the marker on a screen, the duck should look right at you.
What is it good for?
So, obviously you can define markers and either let H5P interactions pop up whenever a marker is found, or you can blend a 3D model with the camera image. Not much, but using that features
- you could create some scavenger hunt game in a physical environment that requires students to find a marker to open a quiz related to the place of the marker,
- you could add markers to exhibits in a museum to deliver additional information in an Interactive Video,
- you could add digital 3D models to a physical book,
- you could …
I bet you will come up with even better use cases …
There are more sophisticated apps with a wider variety of features, but you usually have to pay for them in some way, and they’re usually not open source software. So, use this content type to take your first steps with Augmented Reality – and possibly work on software improvements, too?
How can I get it?
Ultimately, you will be able to install H5P AR Scavenger just like any other H5P content type from the H5P Hub, but the H5P core team will have to find some time for reviewing and releasing it first. Until then, you could download the required libraries (H5P.ARScavenger-library.h5p.) and upload them via the library settings page of your H5P plugin (not the H5P Hub where you’d upload content):
- Download the libraries file (https://www.olivertacke.de/labs/wp-content/uploads/2020/08/H5P.ARScavenger-library.h5p)
- In your H5P plugin, go to the library settings page
- Drupal: Content -> H5P Libraries
- moodle: Site Administration -> Plugins -> Activity modules -> H5P Libraries
- WordPress: H5P Content -> Libraries
- Find the “Upload Libraries” section and upload the file that you just downloaded. You should get a message like “Added x new H5P libraries”.
Also, you can get all the source code on github, but it’s spread across a couple of repositories starting with H5P.ARScavenger (+ H5P.AFrame + H5P.AFrameAR + H5P.AFrameOrbitControls + H5PEditor.InputRow + H5PEditor.ARMarkerGenerator + H5PEditor.ThreeDModelLoader + H5PEditor.ImportantDescription).
But there’s at least one catch!
H5P does not allow to upload gltf and glb files
H5P currently doesn’t allow to include files with the extension gltf or glb that are required for the 3D models. The H5P core team will allow this shortly. Until then, without some modification, you will only be able to use AR Scavenger for H5P content types.
On Drupal you can amend the list of allowed extensions in the H5P plugin settings, but not in other plugins. So, here’s the pull request to allow uploading gltf and glb files. The changes will point you to what you’d have to patch if you’re not running H5P on Drupal. If you want to do this manually:
- Know what you are doing
You cannot really break anything here, but if you’re new to this and make a mistake, you might get some sweat 😉
- Find h5p.classes.php
On WordPress, it should be located at your-wordpress-path/wp-content/plugins/h5p/h5p-php-library/h5p.classes.php. On moodle it should be located at your-moodle-path/mod/hvp/library/h5p.classes.php. If you’re using moodle 3.9 and above including moodle’s H5P integration, it should be located at your-moodle-path/h5p/h5p/lib/joubel/core/h5p.classes.php
- Take a look at yourself and then make a change
Add gltf and glb as shown at https://github.com/h5p/h5p-php-library/pull/85/files
H5P cannot access the camera
This one shouldn’t be a problem in many cases, but it might become one. Browsers are becoming more and more strict when accessing browser features such as video or microphones and expect HTTP Feature Policies to be in place (also potentially causing trouble for Audio Recorder). There’s a discussion about this topic related to H5P at https://h5p.org/comment/35346. I am proposing a code change (for WordPress to be adapted to Drupal and moodle) that will allow to use browsers’ features within the H5P iframe (unless the server is even more strict and doesn’t allow them).
If your browser (on your server) simply won’t ask you for the camera, you may need this patch. A suggestion can be found at https://github.com/h5p/h5p-wordpress-plugin/pull/114. The changes will point you to what you’d have to patch on WordPress yourself. There’s no suggestion yet for Drupal or moodle, but if you can code a little, it won’t be difficult to temporarily apply the same approach manually.
Questions? Maybe I have answered them already
Die initiale Fassung dieses Vorhabens wurde gefördert durch die HOOU und die Behörde für Wissenschaft, Forschung und Gleichstellung der Freien und Hansestadt Hamburg.
The initial release of this project was funded by the HOOU and the Ministry of Science, Research and Equality of the Free and Hanseatic City of Hamburg.
21 Replies to “Arrrrrr, AR!”
OMG, that completely blew my mind!!
That is such an amazing feature, thanks a lot for developing it. I cant wait to use it somehow.
You can use it in so many different ways.
Glad you like it! What are the scenarios that you have in mind?
I really would like to use your enhancement in Terms of AR for H5P. It seems amazing! Tried to install it like you described it on my Moodle site ( 3.10). I have got al lot of error reports. It says that I am not allowed to install the folders of your Plugin Library. Wrong content type. I am not quite sure whether I should allow other content type without knowing what will happen.
Would really like to use it!
Thank you for your help!
I am not sure how I am supposed to help here. You already tried to install the library knowing that it has not yet been reviewed by a third party, and you seemed to have been fine with that – what if moodle had not complained about a lack of rights to install custom libraries? What’s different now that you are obviously required to use some admin account?
Me again. I just checked how the moodle core integration of H5P (which is not the same as the plugin) handles H5P libraries.
I assume you did NOT go to the library settings page as my manual suggests, but you went to a course of the content bank and tried to upload the file that I linked to there. That file is a library only, not some content, so moodle will not upload it there (which is absolutely correct).
If you instead download the demo content from the page and try to upload it, moodle will complain that there’s a gltf file inside that cannot be used (which is also absolutely correct as I described in the blog post).
If you are, however, on the library settings page as my blog posts suggests (you need to be an admin), then you can upload both an H5P content file (which is a bunch of libraries + some parameters) or the H5P library file without problems (which is how it is supposed to be).
thanks a lot for your help! You are definitly richt with your first answer to my request. I tried to install it in the wrong place at the site administration. I have managed to install your zip file now with no problems. It ist listed now as a installed H5P Type. I dont want to waste your time with moodle admin questions, but it didn’t show up when I trie to select it as a h5p-content type on the h5p hub. But I will ask our server Admin for detailled help.
Thanks Again and thanks for your contributing for the open educational ressource world and mor equality and chances in Education!
Don’t worry, I am not annoyed. It’s just that I am not an expert for moodle, let alone moodle’s integration of H5P that’s quite different to the H5P plugin for moodle. Unfortunately, the flexibility of sharing content (that may include new libraries that are not yet installed on the target platform) is limited by restrictive rights management – on the other hand I fully understand why administrators prefer it that way.
Wow. This opens up so many possibilities!
In my experiments, some glTF aren’t working so well.
The avocado, for instance.
(Tried different formats.)
But then, some very complicated files do work.
Since I want to introduce this during a Zoom meeting, I need to figure out a way to make things work. Not sure I’ll share my phone’s screen, as it can get a bit complicated for something which is a small part of a longer session. Besides, I mostly want people to try it themselves.
I’ll probably share the QR code from WP and then display the marker. Was trying to think of an image that people might already have with them…
At any rate, I’m already thinking of a number of things to try with learners and learning pros.
The content type should be able to handle any model that an out of the box AFrame in version 1.0.4 can handle, as that’s used as a foundation. I have not included all kinds of loaders though as this was beyond the scope of the contract. I just tried the Avocado model (glTF 2.0 binary) and it works just fine. The only thing that I noticed is that you’ll have to zoom in quite a bit given the model’s default view parameters.
thank you for that really valuable work! We consider the usage of ARScavenger for a “art bounty hunt” throughout a city.
Is there a (offiicial) way to enable interactive video as h5p content type using ar scavenger? As i saw, on the demo page at einstiegh5p.de this is possible there.
In my demo installation, normal video is available, but interactive video is not in the dropdown at the arscavenger content creation screen.
(interactive video as “plain” h5p content works)
where is the magic wand hidden?
There’s no magic wand required. AR Scavenger is referencing version 1.22 of Interactive Video. If that’s not installed on your platform, then you cannot use it.
If you can wait a couple of weeks: The content type is currently being reviewed for release on the H5P Hub, so it will get an update soon anyway.
Hallo Herr Tacke,
Ich schreibe hier mal auf Deutsch, da ich des Englischen begrenzt mächtig bin. Zunächst vielen Dank des h5p-Typs AR Scavenger. Ich sehe darin enorme Potentiale für die digitale Lehre. Ich weiß auch, dass Sie kein Tech-Support sind. Dennoch will ich mein Problem hier darstellen: 1. Ich nutze für die Erstellung von h5p-Inhalten gerne https://www.lumi.education/de/
Hier ist der h5p Hub enthalten. Ich habe dann ihre Bibliothek integriert für Scavenger. Dann habe ich einen h5p-Inhalt mit AR Scavenger erstellt über den Hub. Ohne 3d-Modell um es zunächst zu testen. Dann habe ich das ganze als html-Seite exportiert. Dann habe ich die exportierte html-Seite normal mit einem Browser geöffnet. Die Seite öffnet, der Name wird dargestellt. Der Browser zeigt an, dass er auf die Kamera zugreift. Allerdings wird das Kamerabild nicht auf der Seite dargestellt. Ich habe auch probiert den Inhalt als SCORM-Inhalt zu exportieren und auf die Lernplattform meiner Schule zu integrieren. Auch hier dasselbe Problem. Nun weiß ich nicht mehr weiter. Ich kann im Übrigen den Testinhalt, den Sie auf dieser Seite erstellt haben, nicht mit Lumi laden. Danke für jede Hilfe
Stimmt. Aber eine Konsequenz hat das Wissen offenbar nicht 😉
Das ist nicht verwunderlich, weil das gltf-Dateiformat (für die 3D-Modelle) in der veröffentlichten Version des H5P-Kerns noch nicht erlaubt ist und Lumi das entsprechend völlig korrekt die Datei als ungültig einstuft. Dass das Dateiformat in der jeweiligen H5P-Integration (hier Lumi) erst freigegeben werden muss, steht ja auch im Blogbeitrag.
Das tut mir leid. Das wird vermutlich daran liegen, dass einige benutzte Bibliotheken dynamisch gestartet werden (müssen) und der HTML-Export von Lumi das nicht umsetzen kann (und SCORM ist letztlich dasselbe in Grün). Das wäre dann aber erst einmal eine Frage an das Lumi-Team, nicht an mich.
Hey i just made my fist steps in moodle, and i wanted to try your really cool AR Scavanger. But i can not find it in the of h5p features.
I made also a trail account on h5p.com But even there i can not find it in the AR Scavanger when i want to create my own Content.
Am i missing something?
On moodle, I assume you’re using moodle’s own custom core integration. By default, it updates the list of content types every 30 days, so you may need to re-run the corresponding cron job or upload the demo content from H5P.org (as admin or user with permission to install libraries). Using the H5P plugin, you should be able to install AR Scavenger via the H5P Hub (if you’re an admin or a user with permission to install libraries). If you’re not an admin at all … ask your admin.
On H5P.com, I am not sure if AR Scavenger is active by default. You may have to activate it in the settings first: Manage Organization => Settings => Content Type Settings
Thanks a lot for your work! That’s really amazing.
I have a question: do you think it would be possible to use ar scavenger directly on a web page like this?
To show a 3d model without the need for user sign up or login
Thanks a lot
AR Scavenger will always require a trigger in order to display a 3D model, but one could create a simple 3D model viewer instead. The code is there essentially, but someone would need to put it into a new content type.