





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various methods for determining the visible surface in computer graphics, including the painter's algorithm, z-buffer algorithm, and ray casting. The strengths and weaknesses of each method and provides insights into making them more efficient.
Typology: Study notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!






Rasterization will convert are primitives to pixels in the image • but we need to make sure we don’t draw occluded objects For each pixel, what is the nearest object in the scene? • this is the only thing we need to draw at this pixel
Developed thousands of years ago • probably by cave dwellers Draws every object in depth order • from back to front
Painter’s Algorithm: sort objects back to front loop over objects rasterize current object write pixels first second (^) third
What do we sort by? • minimum z value — no maximum z value — no
Worse yet, depth ordering of objects can be cyclic • may need to split polygons to break cycles
It has some nice strengths
It has some attractive strengths • it’s very simple, and easy to implement in hardware
But it does have a few problems • it doesn’t handle transparency well
When we • we could just compute it at every pixel rasterize a polygon, we need z value at each pixel
ax + by + cz + d = 0 z d^ ax^ by c
! z = "^ a c! x for fixed values of y
This is a very general algorithm • works with any primitive we can write intersection tests for
Ray Casting: loop over every pixel (x,y) shoot ray from eye through (x,y) intersect with all surfaces find first intersection point write pixel
Rendering is expensive — Don’t draw what you can’t see
Let • ’ s enclose our object in a bounding sphere convex volume
And we can do even better with a hierarchy of volumes Begin testing at the root node • if outside, reject all objects
Even for polygons inside frustum, some may be culled • if we assume that our objects are closed
Consider the normal of a given polygon • if it’s pointing towards the eye, we may be able to see it
Highly complex scenes lead to significant problems
To better resolve visibility, we often use spatial data structures