arkit-portal icon indicating copy to clipboard operation
arkit-portal copied to clipboard

Play 360 degree video in Portal

Open Hamza123Imran opened this issue 6 years ago • 10 comments

Hi, How can we play 360 degree video in this portal?

Hamza123Imran avatar Aug 18 '18 13:08 Hamza123Imran

Good question, Were you able to play 360 video in this portal?

Bruce0418 avatar Oct 11 '18 08:10 Bruce0418

Thanks for your reply, i have created a portal which is like a room having walls and a door same like in your video, now i want to play 360 degree video inside the portal so that it should give user an experience that he/she is inside that video. How this can be done, can u guide please or if you have any link for this?

Hamza123Imran avatar Oct 11 '18 18:10 Hamza123Imran

You need to set the 360 video as material of a sphere.

On 11 Oct 2018, at 19:39, Hamza Imran [email protected] wrote:

Thanks for your reply, i have created a portal which is like a room having walls and a door same like in your video, now i want to play 360 degree video inside the portal so that it should give user an experience that he/she is inside that video. How this can be done, can u guide please or if you have any link for this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

rom4in avatar Oct 11 '18 21:10 rom4in

https://stackoverflow.com/questions/46423415/how-to-apply-360-video-as-a-texture-in-arkit

Hi Guys, I was struggling to build AR 360 video portal with setting the 360 video as material of a sphere refering the link above, but failed. hope you help out me. thanks in advance.

Bruce0418 avatar Oct 11 '18 23:10 Bruce0418

Yeah, I believe that 3d video is supposed to mapped on the inside of a sphere. Now to combine that with a portal (using the masking technique) you probably need to split the sphere in two so that they can be masked individually. I haven't rendered 3d video yet, but I do have another (non-public) project with a portal that provides a 360 degrees world inside the portal where you can walk around the portal inside and outside of the portal space while staying in/out of the portal etc. This could be modified to render 3d video inside of the portal. I dunno if/when I might get the time to do so however:/

bjarnel avatar Oct 12 '18 09:10 bjarnel

Thank @bjarnel i will try for it and if you got this done please let me know it would be great to take guidedence under you.

Hamza123Imran avatar Oct 12 '18 09:10 Hamza123Imran

Hi bjarnel, thanks for your reply. so is that possible to render 360 video inside of portal and apply mask tech? I was trying to integrate this link into your project, but problem is how to archieve mask the sphere.
https://stackoverflow.com/questions/46423415/how-to-apply-360-video-as-a-texture-in-arkit I will appreciate if you update this asap, ;(

Bruce0418 avatar Oct 12 '18 09:10 Bruce0418

With the masking technique I used in this (old) demo and (with more complexity, such as tracking whether you're inside portal or outside portal and in which half of portal you're in) in the non-public demo I have on my bitbucket account, as I said, the sphere would need to split in half to mask each inner-side individually. I do believe SceneKit allows you to texture the inside and render it invisible from the outside, but I would need some time to refresh my memory on their SDK. The bigger problem is that with SceneKit primitives you cannot create half a sphere, so you would probably need to generate the geometry for one using the equation for a sphere and calculate all texture coordinates yourself (taking into account one half of video should be in one of half the sphere and the other half should be in the other half of the sphere) - which can be time consuming (and would also be for me, not having worked with SceneKit for a while). Maybe I will have a bit of time next week:-)

bjarnel avatar Oct 12 '18 10:10 bjarnel

[email protected] that's my email and skype id. can we chat there when you have some time? I would like to keep better communication with you. thanks

Bruce0418 avatar Oct 12 '18 10:10 Bruce0418

Bruce, to mask the sphere, add another one that is just 1mm bigger and make sure its rendering order is lower than the video one. Then pass an empty array as the colorBufferMask to make it invisible.

Hope this helps.

On 12 Oct 2018, at 11:26, Bruce0418 [email protected] wrote:

[email protected] mailto:[email protected] that's my email and skype id. can we chat there when you have some time? I would like to keep better communication with you. thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bjarnel/arkit-portal/issues/3#issuecomment-429280236, or mute the thread https://github.com/notifications/unsubscribe-auth/ATEpnt7etrfL5W851C3h5OZLsMJ6I1C9ks5ukG5QgaJpZM4WCk0J.

rom4in avatar Oct 12 '18 10:10 rom4in