# Why do we use frustums

As you can probably already tell by reading the title, I’m new to 3d graphics. There’s is probably an obvious reason for this but I am yet to hear it. My question is, why do we render out a frustum when only a rectangular screen is displayed as a canvas (hope I am using the correct terminology here). Couldn’t we use more of a rectangular pyramid rather than a cone since the canvas is not a circle. Sorry in advance for the noobiness.

1 Like

do you know how camera vs human eye work?

look here:

http://modori.pe.kr/docs/pfGetStarted/images/04.3.frustum.gif

but it don’t show everything.

maybe even minecraft game can show you what you can do with that:

But a frustum is a cone (sort of) right? what yo showed there has rectangular ends

1 Like

no its a pyramid. it generally means a pyramid (type shape) in 3d graphics.

@javagame said:
But a frustum is a cone (sort of) right? what yo showed there has rectangular ends

No, a frustum is that truncated pyramid in the middle.
@javagame said:
But a frustum is a cone (sort of) right? what yo showed there has rectangular ends

The rectangular ends of the truncated pyramid is exactly the trick :) You want to project the 3D-world on something rectangular since the display is rectangular. This isn't only 3D-computer graphics, you can look up perspective projection and learn a bit about the principles http://en.wikipedia.org/wiki/Perspective_(graphical)

The frustum is used for other things apart from perspective projection, like culling, there is also more math on the way like transformations between different "spaces" for clipping and such. But usually you don't have to worry too much about those things when using such a great library as jME3 :)

Yes jme does quite much automatically with it, the only thing you might want to additionaly know, between far frustrum and near frustrum is a exponential degression of accuracy for the depth buffer.

→ Try to set near frustrum as high as possible, while keeping far as low as neccessary. Especially small changes in the near can make a great difference at larger distances.

Else you will get zbuffer fighting, wich is visible as flickering objects that are further away. http://www.youtube.com/watch?v=zs2penuHSGk

This is especially a issue if you develop on a high end computer, with 32 bit depth, but need to let it run on hardware with only 24 bits depth buffer.

Thanks

1 Like