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

Room Bigger on the Inside

Discussion in 'Editor & General Support' started by KnC_Studios, Nov 30, 2014.

  1. KnC_Studios

    KnC_Studios

    Joined:
    Jul 29, 2013
    Posts:
    2
    Hello! I just had a thought. Yes I did. Thought: Can any of you Unity guru's create a room that is noticeably bigger on the inside (without clever doors and loading screens)? Not that this has any practical use, I just wanted to see if it could be done (clever trickery is allowed).
     
  2. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    If you could create the game Portal you could do this... which raises the question, how would you do such a thing in Unity? I am also curious, having tried before (and failed miserably).
     
  3. KnC_Studios

    KnC_Studios

    Joined:
    Jul 29, 2013
    Posts:
    2
    The closest i could come too was a door that would trigger a loading screen and pop you off to another cell. but thats cheating. Portal is really more like cameras and teleporting, not actual "bigger on the inside" stuffs. (Think TARDIS)
     
  4. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Yea, I was gonna say, you could just use cameras & teleporting. Either that, or alter the world as the player steps through the door (either allowing them to see things change in a freaky way, or through blinding the player using fog/light/confusion/misdirection.)

    You could also do optical illusions, or some kind of camera effect which creates optical illusions for the player. Make it APPEAR as though it is smaller than it is when entering.

    Like how freaky it is that they claim the moon, when it's huge, is actually the same size as always- but your mind is like "NO WAY YOU SO CRAZY!!!111"
     
  5. CaoMengde777

    CaoMengde777

    Joined:
    Nov 5, 2013
    Posts:
    813
    scale the player down smoothly as enters room, and up when leaving??
    uuhh....


    the little lines are the visible sides of the planes.. the side with "normals" facing outwards..

    upon entering the room, the red square scales up.. or moves outward, (and, maybe the black square gets smaller?)
    the black square becomes invisible,

    or no.. the red square is invisible until inside it (to the observer of such), and the black square is invisible when inside red(to the observer of such)..?
     
    Last edited: Nov 30, 2014
  6. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    Can someone explain these camera tricks and teleporting? I will eventually satisfy my curiosity by looking into it, but the portal trick still blows my mind.
     
  7. CaoMengde777

    CaoMengde777

    Joined:
    Nov 5, 2013
    Posts:
    813
    well the cameras show a rendertexture (or whatever its called) .. a camera shows its view on a flat texture..
    and i guess teleporting to another location in the game world... or like a different scene... so if the house is at 0,0 , the interior is at like... 500,500 or something but like the windows and doors from exterior would show render textures of the cameras in the house, and vice versa

    ... lol, thanks to playing around with mapping in wolfenstien enemy territory i know these things :)
     
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,064
    RJ-MacReady likes this.
  9. Grimwolf

    Grimwolf

    Joined:
    Oct 12, 2013
    Posts:
    296
    Yeah, the Portal approach would be most practical I think, if you can manage it.
    The inside would actually be located somewhere else entirely.
     
    the_motionblur likes this.
  10. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
  11. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Wow, didn't think of that. What a great idea.
     
    TMS_1 likes this.
  12. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    what-if-the-38wijd.jpg
     
    CarterG81 likes this.
  13. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,952
    Two cameras + layers. (+ collider swap)
     
  14. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    Any way I can read up on this some more? I did the two cameras thing with different culling layers, but I got confused.

    What is meant by collider swap?
     
  15. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,623
  16. calmcarrots

    calmcarrots

    Joined:
    Mar 7, 2014
    Posts:
    654
    Scale the building when you enter it but to avoid it clipping with everything else, you must disable the meshrenders on the objects around the building. So when you are about to open the door, scale the sides of the room.

    That might be the closest thing to what's possible idk
     
  17. calmcarrots

    calmcarrots

    Joined:
    Mar 7, 2014
    Posts:
    654
  18. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,952
    Physics. Cameras can handle the visual aspect, but if you are using colliders to handle movement boundaries, you could swap (or toggle them) to accommodate the differences.
     
  19. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,952
    Though, on second thought, I would still use cameras, but with a position offset and not have the inside/outside occupy the same space. Do a position swap at the threshold.
     
    RJ-MacReady and angrypenguin like this.
  20. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    Okay, so when I swap positions of the this camera, I would also probably have to switch the rendering order right? So the room is now rendered after the "outside"?
     
  21. SunnyChow

    SunnyChow

    Joined:
    Jun 6, 2013
    Posts:
    360
    Let camera A render the inside first
    Let camera B clear the depth, render a depth mask in the door, then render the rest.
    It doesn't work well in some situations (SSAO filter, flare) but it's easy to do, no scripting and no pro required
     
    Ryiah and RJ-MacReady like this.
  22. TMS_1

    TMS_1

    Joined:
    May 7, 2014
    Posts:
    8
  23. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Necro spam. The worst of both worlds.
     
  24. TMS_1

    TMS_1

    Joined:
    May 7, 2014
    Posts:
    8
    It's not my asset :)