Playing VR 180 degree FishEye videos inside of a VideoDome?

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

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 ?

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?

2 Likes

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.

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 :slight_smile:

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

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.

1 Like

This is the basic jist of fisheye uv mappihng - Babylon.js Playground (babylonjs.com)
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 :slight_smile:
  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.

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 ?

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 :slight_smile: