   Mirroring a view matrix?
  I'm trying to make a mirror using the stencil buffer. I don't have the camera's position or orientation, I only have the view matrix. The reason for this is that the view matrix goes through several transformations including transforming around parents and transforming between scenes due to portals. I've tried using Matrix.CreateReflection and applying that to the view matrix (both Reflection * View and View * Reflection), but that failed. I also tried rotating the view 180 degrees (which rendered fine, but wasn't a reflection). I even tried scaling one axis by -1 (because that mirrors things in 3D Studio Max), but that did not render correctly either.I'd rather not modify the world matrix as I'm unsure how this will affect portals and mirrors in the mirror, or the mirror through portals and mirrors, but I did modify my render queue to apply the reflection matrix to all world matrices in the reflected scene. I tried in the form of Reflection * Bone * World, Bone * Reflection * World, and Bone * World * Reflection, and none of them worked.I admit that I have no clue how the reflection matrix is supposed to work, and tutorials are proving to be quite... dark, shall we say. They don't provide enough information, even in the form of using it for a world matrix. Can anyone help? Does anyone know of a way to flip a view matrix across a plane? It's driving me mad trying to figure it out.   
  I'd try something like:reflectedView = inverseView * reflection * view;To flip over the basis axis, the reflection matrix is just the identity matrix with negative basis. For instance to flip the X axis.-1 0 0 0 1 0 0 0 1Slighty more complex to flip it over a particular plane, but i'm sure some googling could help you build that matrix.   ;  Okay, I tried Invert(View) * Reflection * View, View * Reflection * Invert(View), Invert(Invert(View) * Reflection) and Invert(Reflection * Invert(View)), but all failed to function correctly. I also used Reflection as Matrix.CreateReflection and the matrix you gave (upgraded to a 4x4 matrix), and every negative/positive variation thereof.I figured out the problem with the reflection in the world matrix, however. I was doing:void DrawPart(Part ToDraw, Matrix World){  Matrix MyWorld = ToDraw.Bone * World * Reflection;  Draw(ToDraw.Mesh, MyWorld);  foreach(Part p in ToDraw.Children)  {    DrawPart(p, MyWorld);//<-Problem is here  }}As you can see, I was using the reflected world in the children, which then sort of reflected back. Since all the models I could see were children of a root node, they didn't work right.With the correction (Separating the "parent space" matrix from the "draw" matrix), the reflection works correctly from the world matrix side.But it makes me wonder. In the end, the graphics card basically is doing World * View * Projection, which substituting for World is Bone * ParentSpace * Reflection * View * Projection, right? So why doesn't it work to put Reflection * View in the view matrix instead of in the world matrix? Am I misunderstanding something?That said, even though the reflection works, portals inside of a reflection do not. That is what I was concerned about when I tried using the world matrix. So I still think it would be best if it was possible to simply reflect the view matrix rather than use my "apply this matrix to all meshes in this render queue" method that I'm using right now.Thanks for any help.   ;  Epilogue:Figured out where the problem lay. I was beginning to suspect that it was the frustum code culling the wrong objects, so I took a closer look at how the frustum code acts when the camera is behind the "portal plane". It didn't match, so I rotated the frustum's "portal plane" 180 degrees (sure, rendering from 180 degrees doesn't work right, but the frustum is exactly the same) and it worked.Now I just use View = Reflection * View, and removed the "apply to all world" code, and everything works out swimingly, even the other portals and multiple mirrors.   