Fake mirrors

Blitz3D Forums/Blitz3D Programming/Fake mirrors

Andy(Posted 2005) [#1]
Hi

I made this a while ago to show how to make fake mirrors.

I made an attempt to modularize it using types, but I lost interest in it, so I thought it could be a very nice community project...

Basically what it does is to check the angle from where you are viewing the mirror and then rendering the proper view from the mirror and texturing the mirror using reverse UV coords, changing the FOV as you go.

pros:
It works and enables you to create a mirror with an absolute size and which you can move around.

Cons:
It only works properly in on direction either left-right or up-down, meaning that this is really a poor example and that it is better suited for games where you don't have too much freedom of movement.


My thoughts:

In order to modularize it, one would need a function which if called would add mirrors to the system. The mirrors would be based on the longest side of the mirrors and set the UV coords accordingly. It should be possible to specify a mesh to be used as a mirror after which the addmirror() function will look at the mesh and the texture and then add the mirror as a second texture.

Another fuction should be housekeeping() where the mirrors in sight were processed. This should be as automated as possible.

Anyway, I made this because people were asking for mirrors, maybe someone could modularize it and offer it for sale. I don't know, but it seems like such a waste not to pursue this. I am going to put it up in the code archives.


http://www.blitzbasic.com/codearcs/codearcs.php?code=1524



Andy


jfk EO-11110(Posted 2005) [#2]
Thanks a lot, sounds like this could be pretty usefull for my engine.