Html5 video+alpha channel, they said it could not be done!

Panos/Objects created with Pano2VR/Object2VR/Pano2QTVR. You are welcome to post your recent creations here.
Post Reply
User avatar
adriansinc@gmail.com
Posts: 51
Joined: Tue Oct 29, 2013 1:54 pm
Location: London

...Video with alpha channel can't be done with html5 currently, so i came up with this next best thing.

It involves having a video clip acting like a cube face that lines up perfectly with the pano (thus invisible in a sense), you add video elements with alpha channel in your video editor to an extracted partial cubeface image, then export a normal video clip that is used like a cube face.

Its a bit of a mad hack at this time, you have to edit the pano2vr file with a coding text editor. Hopefully in the near future we will have more features that enable this sort of thing more easily.



http://addlionfilms.webspace.virginmedi ... 000px.html

(Only working in chrome at present) firefox is not cooperating with the video format.)




Here is another effect that can be achieved with this technique.... (door opens on rollover)

http://addlionfilms.webspace.virginmedi ... wtest.html

(again, chrome only at the moment)


Simple examples there, but many possibilities spring to mind of ways to use this. But now i'm bogged down with making it work and work in all browsers/platforms etc. Feel free to contribute! I'll document the method if people are interested in working on it and adding to it!
Antoniobai
Posts: 12
Joined: Mon Jun 02, 2014 11:40 am

:shock: wow !!!

man that is some really great stuff. How did you solve the door opening thing ? is it a trick with fast loading another panorama or just changed the block image ?
User avatar
adriansinc@gmail.com
Posts: 51
Joined: Tue Oct 29, 2013 1:54 pm
Location: London

Hi, sorry for the delay, have been away for a while. Its done by using a video clip which is just 2 frames long. The video is made from 2 panoramas, one with door open, one with door closed.
You basically use the patch feature in pano2vr to extract a patch from each pano the size of the door, as you normally would do for the nadir , but write down the coordinates of the patch, then make the 2 extracted patches into a 2 frame long video clip in a video editor, you put this 2 frame long video into the media editor in pano2vr, then output the pano as usual, then you have to edit the exported pano2vr file with a text editor and enter those coordinates you wrote down to place the video. This is because the media editor in pano2vr can't align images or video perfectly as you don't get a preview and coordinate values etc.
You can then animate the door opening by using standard actions in the skin editor. On mouse rollover the video plays and stops and the end, but as the video is just 2 frames long it looks like a simple image switch.

It all sounds a bit complicated! In fact i am struggling myself to describe it accurately as i have not done it in a while, but it is actually quite straight forward when you have a working formula (it took me 16hours straight i think it was to get one though!!), I have it all written down in my notes. That is why i said above that i was hoping some people would be interested and would work on it a bit and share their findings or improved ways of doing it.
Post Reply