This little include file (realmirrors.bb) will let you create 'real' mirrors in Blitz3D, something like this...
A mirror with a shape mask applied
Or this...
A more straightforward mirror ('Markio' has just fired those bolts and turned around quickly :)
The mirrors are updated in real time, and -- depending on various settings -- are fast enough for in-game use, at least in restricted situations. Thy can be rotated freely and will give a fairly convincing reflection in most circumstances.
The main 'documentation' is in the include file with the code itself, but in short, you can use these mirrors like so...
Include "realmirrors.bb"
test.Mirror = CreateRealMirror ()
UpdateMirror (cam, test)
That gets a small mirror with default settings placed at 0, 0, 0. To position, move or otherwise alter a mirror, you must use MirrorMesh (mirror) to get the actual mesh. For example: PositionEntity MirrorMesh (test), 0, 0, 20.
There are a few limitations, of course, but none are too bad...
The best sizes for textures are 128 (for low-end graphics cards like crappy old ATIs) or 256 -- going higher can give some weird results, with cut-off textures and stuff (a product of graphics cards not guaranteeing the size you ask for -- this can also occur with any size texture in weird display sizes such as 320 x 200).
For the texture flag, default to 0, but offer the option to set a value of 256; this will make it even faster on some graphics cards (more modern ones).
Texture size is really the main speed restriction: the system renders a view to the back buffer into a viewport the same size as a mirror's texture, then copies that into the mirror's texture. Mirror mesh size shouldn't make much difference, except that textures have to be stretched to fit, so become blockier.
In small areas, use a small 'camrange' value in the CreateRealMirror call. In areas featuring infinite planes, or large areas such as terrains, use large values such as 1000 (as in the demo). Note that this will also have an effect on speed, as it directly affects how much the mirror's camera has to render; the default is a large value simply because infinite planes get cut off otherwise, so my demo would look crap ;)
Worth a try (just thought of it): set the mirror's camera fog range to possibly avoid the above problem; the mirror's camera is available by accessing the \cam field of a mirror, but don't touch it unless you knw what you're doing!
Shape masks: They're very simple: create a masking texture (eg. a 256 x 256 BMP featuring a white circle on a black background, as in the demo, optionally greyscale/blurred), then apply it to a newly created mirror using ApplyMirrorMask (see includes/demo). Note that the mirror must be created with the usingmask parameter of CreateRealMirror set to True if you do this.
The main mirror texture uses index 1 (see EntityTexture), which is necessary when applying an shape mask texture (which needs to be on index 0), so bear this in mind if you're doing anything fancy! If you texture the backing panel of a mirror (which is what you see when you go out of the mirror's operating range), you may need to adjust the code in CreateRealMirror to account for this, as the mask is also applied to the backing panel's texture index 1; I haven't bothered trying this out :)
Lastly, if you're using the standard frame-tweening code from the Code Archives, place the UpdateMirror calls outside the For... Next loops (just before RenderWorld tween in that code)or you'll be rendering the mirrors several times per frame (which is too slow).
Bah, I've had enough doc-writing -- there's much more detail in the actual include file, and the demo should show pretty clearly how to apply a shape mask to a mirror. Be sure to read through the comments in the include file, as absolutely everything is covered there (parameters used, and their default values, for example). If you're totally stuck, or need something cleared up, mail me at the address in the include file.