So, if we put performance issues aside (excluding unplayable performance issues of course, < 10 fps and so on); does the engine allow mirrors without resorting to ugly hacks such as modding the water or something like that? Would it be possible? Anyone with more modding/Gamebryo knowledge than me that could have a guess?
The engine does not have built-in support for mirrors. It would be technically possible to render the scene using a reflected camera position/direction to a texture and then use that rendered texture in the scene, but it would take a very large amount of work. Quick guesstimates as to the difficulty of everything needed:
- move the camera (probably implemented by creating a new NiCamera to work with so the game code doesn't try to do anything with it rather than actually moving the main render cam): easy
- create new render targets: pretty easy
- render the scenegraph via the new camera: medium, given the possibility of Weird Things happening
- only render objects in front of the mirror plane: hard - imagine that you have two neighboring rooms, with a mirror on the wall separating the two. If you drop a camera at the reflection point, it will end up inside the other room, giving totally incorrect results
- make sure the player is rendered in "3rd-person" mode so most of the model isn't hidden: hard, not sure how the gameplay code handles this switch; easier if it doesn't require running a full resync of the scene graph vs. gameplay code state
- handing multiple mirrors: ahahaha no, if you have more than one, pretend it doesn't exist and use a placeholder texture for its reflection result
- handling mirrors with water: if you put a mirror in an exterior cell then the world will collapse in on itself
- using the rendered texture in the scene when drawn from the main camera later: unknown, there is an NiRenderedTexture class, but I'm not sure how to hook it up
So, a lot of work, but stuff like this is one of the reasons I am going through and documenting netimmerse in the OBSE source code. (ignoring the past
of being busy with work)
(also no, I am not volunteering to do this, just giving my thoughts on what would be needed to actually get it running)