Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Is there an asset that allows creation of 180 degrees panoramic display in Unity?

Discussion in 'General Discussion' started by ikelaiah, Apr 22, 2014.

  1. ikelaiah

    ikelaiah

    Joined:
    Apr 15, 2013
    Posts:
    154
    I'd like to create an effect like this one. It is a panoramic display 180 h-fov and 100 v-fov.
    Is there an asset that enables me to achieve such effect?

    $maxresdefault.jpg
     
  2. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    Check out the panoramic framework and capture camera, they may do what you need. There are a few other camera assets such a real lens which could help as well as an asset which does some real scene correcting and looks like it may create this distorted effect. Check the camera assets in the store.Alternatively you could just set the FOV of the camera, below the usual FOV slider there are W and H controls which allow you to set the view format as well.
     
  3. ikelaiah

    ikelaiah

    Joined:
    Apr 15, 2013
    Posts:
    154
    Thanks for the reply. I looked at most of the assets you mentioned, they are pretty much limited. I haven't purchased nor tried them, but looking from the screenshots, none can produce such an effect.

    I tried to increase the FOV under Camera component, but increasing camera value makes all the images disappear in the center of the screen.
     
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    The distortion you're after can't come from a standard view matrix, by my understanding, so you'd have to render to texture then apply a post effect that that - not unlike what the Occulus and similar displays do.
     
  5. ikelaiah

    ikelaiah

    Joined:
    Apr 15, 2013
    Posts:
    154
    @angrypenguin,

    I just tried that and you're right. Standard view matrix can't achieve this effect. I looked also into Aubergines post process shader, but not in the list.

    Thanks for everyone's help.
     
    Last edited: Apr 23, 2014
  6. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    @ikelaiah - I wasn't certain what effect you were after to be honest. Would you call it a fisheye effect? Possibly have a look at echologin stuff, maybe contact him on the forum thread. He has a really good post process asset which is more of a framework than a set of presets, could be this effect can be easily created using that framework.
     
  7. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    It's the inverse of a fisheye effect, really. A view matrix projects an image onto a flat surface, which isn't how we really see the world so there's a bit of distortion as you move away from the center. It's not a big deal on small screens, but it's a killer on wrap-arounds. The goal here is to add an inverse distortion to correct the image so that the perspective is correct regardless of where you're looking.
     
  8. ikelaiah

    ikelaiah

    Joined:
    Apr 15, 2013
    Posts:
    154
    @sicga123

    echologin, that name rings a bell. I'll look into it speedily. Thank you so much.
     
    Last edited: Apr 23, 2014
  9. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Could you do a render to texture onto a mesh that has distorted UV's for the effect?
     
  10. ikelaiah

    ikelaiah

    Joined:
    Apr 15, 2013
    Posts:
    154
    Hm, that is one possible solution, but I cant wrap around my head how to mathematically unwrap UV to produce such effect
     
  11. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    1,998
    Perhaps check out Paul Bourkes site, he has huge amounts of interesting maths, algorithms, projections, code for all manor of things.

    Indeed he has a page dedicated to using the iDome in Unity, that I think includes source demo (not downloaded it) and the page describes in great detail creating the fish-eye effect and then how to wrap it for correct projection onto a spherical mirror.

    Even if its not the exact effect you need, it might be a useful starting point along with his other pages ( e.g. stereographics )
     
  12. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    I always get confused over that stuff. There is a projection correction asset on the store. Unity pro only though. Is this what you mean?:
    https://www.assetstore.unity3d.com/#/content/9882
     
  13. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500