Advertisement

Frustum culling Rastertek Tutorial - Need urgent help!

Started by November 06, 2017 01:18 PM
15 comments, last by mister345 7 years, 3 months ago
Just now, mister345 said:

Yes, but translation in which direction? You can't just translate a 3D object with a single scalar value. If you wanted to translate some object by that value, you would have to multiply a normalized direction vector by your desired distance, then add it to the 3D position of the object in question. So which point on the plane exactly are you "translating" with this "distance" scalar, and in what direction exactly? Thanks.

In the direction of the surface normal = your orientation.

🧙

1 minute ago, matt77hias said:

In the direction of the surface normal = your orientation.

So then this would only work for planes that you are viewing head on, ie the near plane and far plane. Because you said you're just moving it away from the origin in the direction of your view vector. So how are the other 4 planes of the frustum expressed?

Advertisement
5 minutes ago, mister345 said:

So then this would only work for planes that you are viewing head on, ie the near plane and far plane. Because you said you're just moving it away from the origin in the direction of your view vector. So how are the other 4 planes of the frustum expressed?

I do not mean with "your orientation" the orientation of the viewer ;) I mean that is the orientation you are talking about and think is missing.

1 frustum = 6 planes each having their own normal (= orientation)

13 minutes ago, matt77hias said:

 

34 minutes ago, matt77hias said:

You really need to read this in order and then it will all make sense.

🧙

1 minute ago, matt77hias said:

I do not mean with "your orientation" the orientation of the viewer  I mean that is the orientation you are talking about and think is missing.

1 frustum = 6 planes each having their own normal (= orientation)

Oh, I see. So this means that the far and near plane are offset from the origin along their respective normal vectors (actually the same) by their respective distances, but the other 4 planes would all have distance 0, but just different normal vectors, because they intersect the origin, correct?

1 minute ago, mister345 said:

Oh, I see. So this means that the far and near plane are offset from the origin along their respective normal vectors (actually the same)

You could use the same normal for the far and near plane, but it makes more sense to you opposite normals. Otherwise you need to have two different tests for these planes: "is my point on the inside of the plane" and "is my point on the outside of the plane".

2 minutes ago, mister345 said:

but the other 4 planes would all have distance 0, but just different normal vectors, because they intersect the origin, correct

That is correct.

🧙

Thanks, you've been a huge help! Got the frustum working thanks to you both!

This topic is closed to new replies.

Advertisement