near clip volume

Started by
2 comments, last by w_poons 18 years, 7 months ago
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
Advertisement
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.


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






Thanks very much. I will try it immediately.

Works fine!!

[Edited by - w_poons on September 2, 2005 10:31:10 AM]

This topic is closed to new replies.

Advertisement