Jump to content
  • Advertisement
Sign in to follow this  
w_poons

near clip volume

This topic is 4822 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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.


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
Thanks very much. I will try it immediately.

Works fine!!

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!