Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
coeing's avatar
coeing
Honored Guest
8 years ago

Showing 3D objects inside a (stereoscopic) panorama/skybox

Hey there!

I'm currently checking out the possibility to place 3D models inside a 360 panorama. This way we could have our foreground objects be 3D while all the background is just a skybox or panorama sphere.

The problem I came across is that the positioning is off between the 3D objects and the panorama. It looks like the panorama is moving behind the 3D objects even when they should be at the same depth.

The Pano shows how the panorama looks like, PanoAnd3D shows the panorama and the 3D objects. Both pictures are taken from the editor where the positioning matches pretty good.



But as soon as I use it in the Gear VR, the objects and pano only matches when looking in a specific way at it. First I thought it might be the center of the screen where they match, but it's not exactly the center.



If you check out the right eye, in the center of the image it looks quite similar to the image rendered in the editor, but the more it gets to the sides, the higher the offset between the panorama and the 3D objects.

Hope a fellow dev can give me a hint about what I am missing here  Some kind of distortion that's done for 3D, but not for a skybox/panorama?

4 Replies

Replies have been turned off for this discussion
  • This is something I really want to try because I think this is a good solution for mobile vr because we can have good quality detailed pre rendered scenes with 3D objects in the mix.
      
    I'm not a coder.
    Have you tried use a cubemap on a cube mesh or sphere (using a skybox as material) instead of a 360 pano as direct skybox?

  • coeing's avatar
    coeing
    Honored Guest
    Thanks for the answers (I didn't enable the mail notifications, so I just saw that there are answers :neutral:)

    I realize that it's challenging, but as @dreatern mentioned it would raise the quality a lot for static mobile VR experiences (like the ones we currently work on :wink:).

    Just today I realized that we made a mistake with rendering the stereo panoramas (not moving the cameras around a common center, but only doing two monoscopic panoramas), so this might make the offset go away. I'll post again when I tested it.

    @imperativity Are there any sources about those specifications like projection matrix, IPD and so on for the GearVR? I find it quite hard to find official sources.

    About the monoscopic skybox: Sure, this would be an option, but we really have only a few things that have to be real 3D and don't want to loose our realistic look that we already achieved for our prerendered environments. It would cost of a lot of effort (and performance) to render it inside Unity and make it look as nice as it does right now.
  • coeing's avatar
    coeing
    Honored Guest

    dreatern said:
    Have you tried use a cubemap on a cube mesh or sphere (using a skybox as material) instead of a 360 pano as direct skybox?



    I tried a sphere around the cameras, but it gives the same results. But as I wrote above we had a mistake in our panoramas anyway, so I will test again with corrected panoramas.
  • coeing's avatar
    coeing
    Honored Guest
    @imperativity
    Thanks for the information. We will have kind of a split distance anyway, as the 3D elements are all in front of the panorama and can't be occupied by parts of it.
    I will check the return values from the Unity classes then to see how the settings are. Can you tell me which settings can be influenced by the user of a device?