2D silhouette cross-sections of arbitrary 3D models

Started by
0 comments, last by BeanDog 18 years ago
I'm trying to google for some algorithms, preferably for the GPU, that can be used to draw 2D silhouette planar cross-sections of arbitrary 3D models. I'm not having any luck. I've also been trying to just create an algorithm on my own. I understand from the problem, that it is possible for the silhouette to be complex and disjointed, and that is throwing me for a loop.
.
Advertisement
Do you need to fill the silhouette, or do you just want the outline? At any rate, you should be able to find the intersection of each individual polygon with the slicing plane pretty easily (just a plane-plane intersection, restricted to the area of your polygon). This will give you a big list of line segments in worldspace, which you can weld into polygons using the information you already have on which polygons are adjacent. You can then transform these polygons down to screen space and render.

In the case of filling them, I suppose you could keep track of which original polygons mapped to which line segments. When you transform the line segments into screen space, also transform the normals to the corresponding polygons into screen space. A simple dot product between the line segment (which, in this case, must be oriented correctly) and the transformed normal will tell you which side of that line segment is inside the silhouette and which is outside. This means you know the orientation of the polygon, which makes deconstructing it into triangles fairly simple.

Just off the top of my head. Did that make sense?

This topic is closed to new replies.

Advertisement