near clip volume
hi,
i'm trying to implement the near clip volume test to determine if caps are necessary or not, as described in eric lengyels article at gamasutra.
i have already calculated the 4 corners with the provided equations. as far as i understand i have to multiply this corners with the matrix that performs an eye-to-world-space transformation which should be the inverse modelview matrix. is that correct so far?
if i only use translations and rotations the modelview matrix should be orthogonal and i can simple calculate this inverse matrix by building the transpose of the modelview matrix. and i think here somewhere is my problem.
assume the following modelview matrix:
1 0 0 0
0 1 0 0
0 0 1 -200
0 0 0 1
=> transpose
1 0 0 0
0 1 0 0
0 0 1 0
0 0 -200 1
if i now multiply this matrix with one of the corners it will lead to an homogenous value not equal to 1, which can´t be ok.
has anybody some suggestions for me?
thanks in advance,
poons
If your translation matrix is (-200 in the z direction)
1 0 0 0
0 1 0 0
0 0 1 -200
0 0 0 1
The inverse is (200 in the z direction)
1 0 0 0
0 1 0 0
0 0 1 200
0 0 0 1
The transpose of orthonormal rotations is the inverse. But for translates, its not the transpose.
1 0 0 0
0 1 0 0
0 0 1 -200
0 0 0 1
The inverse is (200 in the z direction)
1 0 0 0
0 1 0 0
0 0 1 200
0 0 0 1
The transpose of orthonormal rotations is the inverse. But for translates, its not the transpose.
Addition: I remember someone posting this somewhere earlier on this site, but I don't remember where it was, so I'll retype what I remember.
If just using rotations and translates, theres a simple form of the inverse.
If your starting matrix is
| R T |
| 0 1 |
Where R is 3x3 rotation matrix and T is the 3x1 translate
then the inverse is
| Rt Rt*(-T) |
| 0 1 |
Where Rt is R transpose
If just using rotations and translates, theres a simple form of the inverse.
If your starting matrix is
| R T |
| 0 1 |
Where R is 3x3 rotation matrix and T is the 3x1 translate
then the inverse is
| Rt Rt*(-T) |
| 0 1 |
Where Rt is R transpose
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement