Tuesday 27 February 2018

MSc Computing at Northampton: Play with Web Virtual Reality (VR)

This post documents some experiments with WebVR - Web based Virtual Reality - in this case based on the wonderful A-Frame (https://aframe.io) explored with MSc Computing students.

The two insights: it is great fun (which I did expect) and nowhere near as hard as I thought it was going to be when I first started. 

1. The approach
The approach used was using A-Frame (https://aframe.io) inside Thimble (https://thimble.mozilla.org ). Thimble was selected because it is an online editor,  simple to use, it is free and you see the preview immediately. The filesizes of images and videos have to be small though.



2. How easy is it?
You can treat it as if was HTML, after you have added the script file shown in bold.

    
   

The video below shows setting up and adding a box to the scene.



This next video takes this a little further by adding rotation to an object.

 

In this video mapping an image to an object and changing camera position is looked at.

 



3. Adding video
Actual in some ways it as easy to add video as adding an image, at it's simplest adding src="" with either the URL or relative filename in the speech marks can be used for both images and video. Alternatively using  combination with again the filename or URL between speech marks adds a block and pastes the video on top. The video below shows a worked example of these two approaches



4. 360 degree video.
A-Frame allows 360 degree to be incorporated into the scene using the  tag. The video below shows a worked example of this. The video below shows another worked example.



5. 3D objects and Assets
We can also add 3D models that others have developed into our scene. In the video below a Penguin, defined externally using .obj for the model and .mtl for the material, is loaded into the scene.



To read more go to https://aframe.io/docs/0.7.0/introduction/ 




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 @scottturneruonAll views and opinions are the author's and do not necessarily reflected those of any organisation they are associated with. Twitter: @scottturneruon

No comments:

Post a Comment