2

Would appreciate a good explanation of Frustum Culling in 3D graphic programming please. I need to learn 3D (have never done serious graphic programming up to this point), and I am having a bit of a hard time understanding some of the terminologies used in the manual, and the books I am working with.

I am currently trying to read through the Java 3D API specs since the books seem just as out there as this ..

Cœur
  • 37,241
  • 25
  • 195
  • 267
user272671
  • 657
  • 4
  • 13
  • 26

2 Answers2

3
  • Your camera is looking in a direction, let us call this forwards.
  • There are objects which are everywhere.
  • The objects which are not infront of the camera are unnecessary for rendering.
  • Objects too far away will not be visible.
  • Objects too close will behave poorly (filling the whole screen, etc).

Solution: Remove all objects that are not within the field of view, too close, or too far away. The shape of the included area is a 'frustrum', and you are 'culling' everything not inside it.

zebediah49
  • 7,467
  • 1
  • 33
  • 50
1

The "frustum" is the region of a 3D scene outside of which nothing will be drawn. It is a truncated pyramid, bounded by the visibility limits of the screen on 4 sides, and by the "near" and "far" visibility limits (typically perpendicular to the view direction) which are also defined by the camera matrix.

Graphical primitives which are drawn with the 3D API are clipped to the view frustum: only the portion of a primitive which is inside the frustum will appear. Primitives which are entirely outside the frustum will not appear at all.

However, even if your primitive doesn't appear on screen, trying to draw it is not free: every primitive submitted to the hardware takes time. And, since primitives entirely outside the frustum do not appear at all, this is wasted time.

So, frustum culling is a preliminary sorting, either of primitives or (more cost-effectively) of entire objects, to determine if they are entirely outside the view frustum. When it determines that an object or primitive is outside the frustum, frustum culling saves time by not trying to draw it at all.

comingstorm
  • 25,557
  • 3
  • 43
  • 67