Sign in to follow this  
w_poons

near clip volume

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
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






Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this