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

Streetview effect on unity?

Discussion in 'General Discussion' started by podmaster, Jan 27, 2015.

  1. podmaster

    podmaster

    Joined:
    Nov 27, 2012
    Posts:
    5
    Hi everyone.
    I was trying to make something with the google cardboard for unity, and i want to make a realistic scene using photos and/or videos.
    Imagine a simple room with interactable objects in the scene, a table, a chair.
    How do you guys propose to achieve this effect, how can i make a 360 environment having interactive objects in it?
    Any directions you point me will be of great help.
    Thanks!
     
  2. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    Sounds like... a video game? :)

    Which thing specifically do you need help on?
     
  3. podmaster

    podmaster

    Joined:
    Nov 27, 2012
    Posts:
    5
    Hehe yes i know it's a video game , but how can i make a panoramic photo view with interactive objects.
    Let's say i want to take a 360° x 180° panoramic photo of my living room and then in unity import it to make a virtual reality game with the Google Cardboard, but i also want to make objects interactable, my table, my chair, my tv,etc.
    I want an effect like google street view that you can see a continuous image up,down,left and right but with interactions in unity, the VR cardbox thing doesn't matter.
    My problem is setting up the 360 photographic environment in unity and the interactions.
    BTW: thanks for answering :)
     
  4. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    Ahhhhhhh... okay. No idea :)

    The "interactable" objects is easy enough just with colliders and scripts. I guess for the environment you could map the images to the inside of a sphere (i.e. a sphere with flipped normals?) and place the Unity camera in the center of it.

    Yeah, not sure. But now that you've clarified, I'm sure someone smart will have an answer for you :)
     
  5. podmaster

    podmaster

    Joined:
    Nov 27, 2012
    Posts:
    5
    Thanks for the idea, i made it to the point of setting up the images, with a skybox material, but the problem is that now i don't have any idea how to know when the player is looking at certain point of the bitmap to interact.

    Let's say the player is looking right at the tree or the guy sitting right there. How can i highlight the object when its been centered on the screen like a mouse over effect or whatever. But how can i highlight some objects like in a 3D First person game but using photos?

    test-skybox.jpg
     
  6. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    I'd say, if you can properly position things, I'd put box colliders in the spot that fits the object you want to touch, disable the mesh renderer so players cant see it, and make it clickable. That's the only way I could figure this out lol.
     
  7. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    It doesn't need a mesh renderer at all - just an empty GameObject with a collider.
     
  8. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Oh I know, but it would be easier for me at least to just use a solid box to see depth a bit easier instead of green lines at first lol.
     
  9. podmaster

    podmaster

    Joined:
    Nov 27, 2012
    Posts:
    5
    Thanks guys i'll try it and see how this works.
     
  10. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Instead of taking a panoramic picture of a square room why not take flat pictures of each wall and texture them onto planes or an inverted cube (flipped normals).
    Seems kinda funny to texture a spherical object with a flat panoramic texture of what is actually flat surfaces.

    Then do the other stuff SteveJ and N1warhead mentioned. :)
     
  11. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    The catch is that if you just want clickable objects, what has been suggested above is great. But the moment you want to actually move/rotate those objects, you no longer can use the same technique. You would have to separately model the things, like the chair, because as it is, it is "stuck" in the picture.

    Sorry to state the obvious, but I'm doing my duty :)
     
    theANMATOR2b likes this.