# Playing VR 180 degree FishEye videos inside of a VideoDome?

**URL:** <https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328>\
**Category:** Questions\
**Created:** [February 17, 2023, 7:06pm UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328 "2023-02-17T19:06:12Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![a3voices](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/a3voices/32/30073_2.png) [@a3voices](https://forum.babylonjs.com/u/a3voices)\
**Post date:** [February 17, 2023, 7:06pm UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/1 "2023-02-17T19:06:12Z")

</div>

Hello, is it possible to play 180 degree FishEye side-by-side videos inside of a VideoDome and view them from within WebXR?

I see a ticket related to it here but looks like it was closed: [Implement Fisheye as a TextureDome · Issue #10000 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/issues/10000)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 20, 2023, 10:32am UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/2 "2023-02-20T10:32:38Z")

</div>

I am not sure this special mode is supported, I think @RaananW added fish eye support but I am not sure 180 side by side are ?

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 20, 2023, 10:36am UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/3 "2023-02-20T10:36:32Z")

</div>

Fisheye support was experimental and was never actually integrated in the framework. I can find the code to get it to work, though it will require a bit of extra code on your end. especially if it is a fisheye stereo view. Can you share the video you are trying to play?

---

<div class="post-metadata">

**Author:** ![Zell](https://avatars.discourse-cdn.com/v4/letter/z/f475e1/32.png) [@Zell](https://forum.babylonjs.com/u/Zell)\
**Post date:** [June 26, 2023, 1:35pm UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/4 "2023-06-26T13:35:18Z")

</div>

Hi, @RaananW, I also work with babylonjs to create a VR180 player and our VR camera produce fisheye SBS video stream. For the moment I play with a part of half sphere, but it’s not the right shape. Have you an example of code that I can reuse to play fisheye videos ? I can share you what kind of videos we produce. Thx in advance.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [June 26, 2023, 7:09pm UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/5 "2023-06-26T19:09:50Z")

</div>

if you can share a video I can check it with my local implementation. I’ll find the playground and share it as well. assigning to me 🙂

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [June 26, 2023, 7:09pm UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/6 "2023-06-26T19:09:55Z")

</div>



---

<div class="post-metadata">

**Author:** ![Zell](https://avatars.discourse-cdn.com/v4/letter/z/f475e1/32.png) [@Zell](https://forum.babylonjs.com/u/Zell)\
**Post date:** [June 27, 2023, 8:38am UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/7 "2023-06-27T08:38:35Z")

</div>

Hi @RaananW, thx for your answer. For my tests, I do not use the video dome object but a simple ribbon shape with a video texture (with a live video stream), because my camera do not produce standard vr180 stream. The FOV is a bit less, around 160 °. It should not be an issue with the right shape in the viewer, to recreate the scene.

An example here of video produced : [Test vrcam 2 - 2023-06-23.mp4 - Google Drive](https://drive.google.com/file/d/1LhhUJXrusXUSmzaQ3qGdKHMvdqnVNGSd/view?usp=sharing)

This video is working fine when I play it in a player like Skybox VR, in an occulus quest, They have an option for fisheye videos.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [June 27, 2023, 2:52pm UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/8 "2023-06-27T14:52:31Z")

</div>

This is the basic jist of fisheye uv mappihng - [Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#16609D)  
You will need to host the video yourself (localhost?) and make sure to change the texture URL in line 23.

A few notes:

1. This is a 180 fisheye (a little less, as you mentioned), so I blocked the camera’s limits to not allow the user to see the chaos that is the back of the sphere 🙂
2. I don’t remember ever seeing a dual 180 fisheye, so I had to manipulate the algo a bit. It’s mainly the final u (of the uv) calculation that is simply divided by 2.
3. This is not part of the framework. I am not sure if it will ever be a part of the framework.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [June 27, 2023, 2:57pm UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/9 "2023-06-27T14:57:52Z")

</div>



---

<div class="post-metadata">

**Author:** ![Zell](https://avatars.discourse-cdn.com/v4/letter/z/f475e1/32.png) [@Zell](https://forum.babylonjs.com/u/Zell)\
**Post date:** [July 4, 2023, 4:04pm UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/10 "2023-07-04T16:04:50Z")

</div>

Thx for the example .It works fine in terms of rendering but I need to explore another way in order to create the right shape for the mapping, instead of mapping the video in a sphere. To avoid to use the 360°. Have you ever use this system and projection ?

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2023, 9:38am UTC](https://forum.babylonjs.com/t/playing-vr-180-degree-fisheye-videos-inside-of-a-videodome/38328/11 "2023-07-05T09:38:02Z")

</div>

are you looking to map the video to half a sphere? By setting the UVs to be the same as the parts you want to render on, it should work as expected. Otherwise you can create half a sphere and manipulate the uv calculations to fit the new shape. I haven’t done that though so it might be a naive answer 🙂
