# effective solution to find 6 plane of frustum?

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

## Recommended Posts

is there any effective solution to find 6 plane of frustum?

##### Share on other sites
You can transform a plane by multiplying by a matrix like this.

                        |a|
inverse(transpose(M)) * |b|
|c|
|d|

Where ax + by + cz + d = 0 defines a plane

In normalized coordinates the 6 planes in opengl are
[1 0 0 1] [-1 0 0 1]
[0 1 0 1] [0 -1 0 1]
[0 0 1 1] [0 0 -1 1]

where [a b c d] defines a plane

For directx, the last two planes are
[0 0 0 1] [0 0 -1 1]

Since we want to transform a plane from normalized space to world space we simply take the transpose of the view projection matrix and
mutliply each of those six planes by that matrix

 transpose(view * projection) * p

You notice that we don't take the inverse of the matrix since it is already the inverse of the matrix we actually want to transform it by.
(view * projection goes from world to normalized space, we want to go from normalized space to world space)

The result of multiplying each plane will give a 4 dimensional vector. where x, y, z, w of the vector can be copied over directly to the
plane a, b, c, d respectively.

Notice that the 6 original planes have a lot of 1s and 0s. This means there is a lot of wasted work so when you simplify the multiply, just
end up with adding or subtracting two value from the matrix to get each plane. The simplified extraction can be found in this paper.

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631781
• Total Posts
3002314
×