Jump to content

Mirrors and dimensional space


MattJ812

Recommended Posts

I didn't know where to ask this kinda stuff, its not just ignorant are mirrors are portals etc I just got curious about something and was hoping for some opinions on it.

 

So basically I am working on 3D games and I wanted an illusion of a mirror, so what I did was recreate everything but "mirrored" on the axis in question, which worked. But then I thought how about 2 mirrors, Now the image in the 2nd mirror must contain the image in the 1st mirror. I am creating instances in space to create this illusion and obvously only one thing can exists in the same place at one time and it got me thinking.

 

I know mirrors just reflect light, although they are still intriguing, the way I I decided to accomplish my first step suddenly hit me that the image in the mirror is the same world I am in (Ignorantly draw it backwards) but I cannot keep recreating the same space in the same space? I googled a bunch about other dimensions and dimensional space... I dunno I was just wondering about the concept of other dimensions and how light reflects and didn't know where to go to learn more.

Link to comment
Share on other sites

Interesting.

 

You could have a look at how they made recursive portals in Portal. It's in the "directors comment" run. If you can't find anything about it, I'll have a look when I get home.

Link to comment
Share on other sites

A few short quotes from the developer commentary mode, hopefully they can give you some idea of how they did it.

 

 

Taken from here.

 

 

 

 

#027

When rendering the player's view through a portal, we must render a separate image using a virtual camera which looks out of the opposite portal. To obtain a correct image and efficient rendering performance, we render only what is visible through the limited field of view of the opposite portal and exclude objects which lie between the virtual camera and the plane of the opposite portal.

 

#035

Integrating portals with the Source engine's physics system was a complex process that required several iterations to achieve the right balance of performance and correctness. Because portals can be placed virtually anywhere in the game environment, the physics system had to be modified to allow dynamic changes to its representation of colliding geometry, such as the walls and floor around this box, and any objects which may lie on the opposite side of the portal. Initial implementations of this dynamic collision generation system could take up to one half of one second, or 500 milliseconds, to compute the correct collision. This may not sound like a long time in everyday life, but this pause during portal creation was quite noticeable in the context of the game. Ultimately, we designed a system that creates temporary hybrid physics environments in bubbles around the portals using less accurate collision than that produced by Source's standard collision generation, but was accurate enough in practice and reduced the time to create the dynamic collision representation from 500 milliseconds to just 10 milliseconds, which is an imperceptible pause during portal creation.

 

#036

For the first few months of development, we rendered the views through portals to two offscreen textures. This approach was easy to implement and was compatible with a wide range of graphics hardware. Unfortunately, this method was incompatible with antialiasing and consumed a large amount of video memory in order to handle recursive views through several portals. Because of these disadvantages, we switched to a system which renders portal views recursively into the frame buffer with the aid of the stencil buffer to isolate pixels corresponding to a given portal. This is a more effective scheme because it is compatible with antialiasing and does not consume any additional video memory for offscreen textures.

 

#061

This is a great spot to appreciate the recursive nature of portals. If you place a portal on each side of this hallway, you'll notice the portals seem to go on forever, similar to the effect you get in a hall of mirrors. In actuality, we support a maximum of nine recursive portal views down any chain of portals. We achieve the impression of infinite recursion by copying part of the previously rendered frame onto the final portal in the recursive chain. It's not absolutely perfect, but it's inexpensive and effective.

 

 

Link to comment
Share on other sites

Maybe I misunderstood the idea, but isn't it less cpu hungry to use light calculations rather than recreating the whole scene "backwards" in mirrors? Doing so would also make it easier to use multiple mirrors?

Link to comment
Share on other sites

My original thought was to take a snapshot of "what the mirror sees". I figured I could use the distance from the mirror, the angle to the plane of the mirror, and the mirrors (EDIT - I actually typed windows here, that to me is kinda funny) size to determine its field of view. From that I could calculate what parts of my scene would be visible in the mirror. I stumbled on the actual projection of a 3d scene onto a 2d image, which led me to just recreating everything for a simple illusion, it would be totally expensive to do this for an intricate scene or for multiple mirrors.

 

Besides the actual game implementation of this, my question was actually kinda leaning towards the physical/dimensional properties of whats going on. More to real life multi-dimensional universes, multiverses whatever you call it, the concept of having anything to do with a mirror is just silly but it did get me thinking about light. The reason I asked this question at all is as follows (ignore me if its just plain stupid)

 

I take room A and place a mirror on a wall, recreate that room and call it room B, place a mirror on a wall perpendicular to the first. Then recreate the room again room C. Looking into room C at the right angle will show the mirror that looks into room B, so Ill create a 4th room but is it D or B? or both....I would have multiple copies of the same thing in the same place. Stupid to try to applicate but too much to comprehend as far as what it would look like and I lost it. This is probably extremely retarded but some things just get me to thinking. Here's a diagram of what I was thinking just incase anyone is still paying any attention.

 

rooms.jpg

 

Maybe I would have to think about another dimension?

Edited by MattJ812
Link to comment
Share on other sites

I used to like the idea of looking into a mirror is actually looking into another universe. However I just thought of one problem with that idea, and that is... What is the limit to this? Is every reflective surface another universe? When does the reflectivity become so little that it is no longer another universe? If the reflective surface is curved is the corresponding universe curved? If you make a ripple in a flat water surface, did you just create a new universe(s)? Is there another universe in the surface of the beer can next to me? etc.

 

As for your diagram, I think you would see room D, just how your diagram depicts. It's hard to talk about what room you'd be seeing as they're all actually the same room. Why don't you set two mirrors up and test it?

Link to comment
Share on other sites

I wasn't really thinking about looking into a mirror is like looking into another universe, light reflects off of almost everything. It's more to do with the thinking of co-existence if that makes sense. If the images relfected did physically exist they would exist in the same space. I only think about this because of theories of multiple universes or as I read not too long ago, time travel and changes made could create a new path of time that exists parallel to the original. Its just a weird thing to think about and was wondering how retarded it is, probably very.

 

 

I hadn't tested using two mirrors as I was thinking that each room would be unique.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.