Monday 2 December 2019

Free Web based Augmented Reality (AR)

This post is part of the materials for a session on Augmented Reality presenting at the 2019 SolSTICE eLearning and CLT Conference 5-6th June 2019 Edge Hill University https://www.edgehill.ac.uk/solstice/files/2019/05/2019-Book-of-Abstracts.pdf  and the #MergedFutures Event on 14th June 2019.
1. Introduction





                                                                                
So if we go to

Using the markers above with this url running on your device (with a camera enabled) it should add two new objects over the markers. you will need a copy of these images and printed them out. If you have it I would suggest running it in Firefox.





2. Getting Started
The guide for all this is https://aframe.io/blog/arjs/, with this you have pretty much everything you need.







To start your own go to https://glitch.com/ -> new project ->Hello World project

In the index.html deleted everything in there and replace it with

Should have a white box over the Hiro marker when the web camera/phone/tablet is shown the markers.


The code  not in bold below just sets it up - to play with it we don’t need to worry about what it does - we can just use it. The bit in bold is the bit initially we change or add to – in this case it puts a default white box over the marker.















3. Playing with other objects

Now if we replace


With


We get a blue ball in place of the box


Now for some fun
http://www.pngall.com/bee-png/download/84 is a bee image – download it


Go back to Glitch, and if we go to assets we can add the image. Open up the folder that has the downloaded image and drag it into the asset window.

When it stops downloading and shows the image, click on the image to get the new web address we are going to need that next. so take a copy of it.

If we replace




With the following by just adding in src="https://cdn.glitch.com/04b86bba-0978-4bf4-b3a7-2ece72336f90%2FBee-PNG.png" as below
 


We get a blue ball with a bee stretched over it. But it doesn’t look that great if we remove the color=”blue” we see the bee stuck at the bottom of the ball still but the colours are back.


Now if we replace
    


With commands to rotate the sphere



We get a rotating sphere with the image on it.

This can be found at https://simplistic-wakeboard.glitch.me and works with the Hiro marker


If you want to find out how I felt about presenting go to https://dandy-custard.glitch.me/



Now let's try a GIF


Download the GIF and then copy (drag and drop) into the asset folder of your project  get the web address and put into src=”” in place of the one that is there already

An example can be found at https://root-reply.glitch.me/ and works with the Hiro marker.




4. Issues and Thoughts

  • Make sure all the markers have white space surrounding them.




  • If I am honest, the technology is cool and useful for educational use, but I not sure where it all can go.   The question is what can others come up with to use it, I would love to hear about it.







Related Links



All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

1 comment:

Top posts on this blog in March 2024

The Top 10 viewed post on this blog in March 2024. Covering areas such as small robots, augmented reality, Scratch programming, robots. Micr...