I am currently writing a transformation from model space to clip space for use in OpenGL. From what i have seen, programmers typically use a traditional rectangular frustum to define the clipping boundaries in their model space. I personally had in mind a shape like a frustum, except the near and far planes are spheres centered at the apex of the frustum (the camera). So something that looks like this:
The yellow region corresponds to OpenGL's clip space, and the two spheres (depicted as circles in this cross-section image) correspond to OpenGL's z=-1
(inner sphere) and z=1
(outer sphere).
Is this a more realistic way to model the projection, or should i stick with the traditional rectangular frustum when designing my projection matrix?
No. I'm not sure what you mean to be completely honest, but in either case no.
Well in many (all?, most?) large polygons that intersect the clip plane are actually broken in to smaller triangles that don't - otherwise a single big polygon that had one vertex outside would simply be ignored. This is what clipping actually involves.
Remember when you played old games and walked into objects, only to have them disappear if you got too close? Wouldn't it suck if when the corner of a polygon was just outside the view the hole thing vanished? see this for clarification.
Well a screen is flat, so the objects in a 3d scene are projected onto a flat surface, equivalent to tracing a ray of light from an object towards the camera and finding where it would intersect your monitor. The weird "unrealistic" 3d look is a result of the viewer's eyes being a) not a point camera and b) rarely if ever at the correct distance for the field of view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With