title: How to calculate "view inverse matrix"
body: <p>I’m trying out a particle system example that came out with RenderMonkey and it uses a “view inverse matrix” to billboard the quads for the particle effect.</p>
  
  <p>I can see all the values from within RenderMonkey, but I can’t work out how they calculate the “view inverse matrix”, it’s not the inverse of the view matrix or the inverse of the view projection.</p>
  
  <p>Here is what I know, the names are the "variable semantics":</p>
  
  <pre><code>ViewPosition:
  25.044189 105.753433 240.177200 1.0
  
  ViewProjection:
  1.663676 0.483806 -.351623 -8.377671
  -.790789 2.134270 -.804967 -12.567072
  -.084668 -.379295 -.922480 262.789917
  -.084583 -.378916 -.921558 263.527130
  
  View:
  1 0 0 0
  0 1 0 0
  0 0 1 -200
  0 0 0 1
  
  ViewTranspose:
  .913838 .148949 -.377775 0
  -.257723 .931662 -.256095 0
  .313814 .331391 .889776 0
  -.000004 -.000081 -200 1
  
  ViewInverse: &lt;-This is what I want to calculate
  .941038 -.327556 .084583 25.044195
  .273659 .884044 .378917 105.753433
  -.198891 -.333427 .921557 240.177200
  0        0        0       1
  </code></pre>
  
  <p><strong>Edit</strong>, I think there's a bug in RenderMonkey, because the Viewmatrix never updates when I move, unless I activate another effect and go back to original.</p>
  
  <p>From this article: <a href="http://swiftcoder.wordpress.com/2008/11/25/constructing-a-billboard-matrix/" rel="nofollow">http://swiftcoder.wordpress.com/2008/11/25/constructing-a-billboard-matrix/</a></p>
  
  <p>I believe that it is:</p>
  
  <pre><code> V.a V.e V.i x
   V.b V.f V.j y
   V.c V.g V.k z
   0   0   0   1
  </code></pre>
  
  <p>Where V represents the inverse of just the rotation part of the View matrix and x,y,z represent the View position. But I can't confirm until I try it, because of render monkey bug.</p>