milo@ndmath.UUCP (Greg Corson) (05/18/88)
I have a rather odd type of 3D model I need to represent and I'm
taking suggestions on how to do it. The objects being modeled
are not so strange...but the type of calculations I need to do on
them may be a little odd.
I need to model various types of smooth surfaces such as rolling
hills, car bodies, human faces etc. The pictures produced from
the models need to be hidden surface but WILL NOT be shaded in
any of the usual ways. The shading will be very simple...if an
object is defined as "blue" it will be the same shade of blue
all over. The odd part is that the rendering routine will need
to look for sudden changes in the objects contours (or places
where one object overlaps itself or another of the same color)
and draw "feature lines" at those places. For example, if you
were modeling a piece of metal with a very gentle bend, only the
outer edges would be drawn in as black feature lines....however
if you had a piece of metal with a sharp 45 degree bend in it
there would be a black like at the location of the bend.
The idea is to produce pictures that resemble hand-drawn "cell"
animation but are actually based on 3D models. There will be
no light source-based shading AT ALL. I just need a way of
modeling surfaces where it is easy to locate the edges of objects
and locations where the shape of the object changes suddenly.
Some type of Z buffering system is a good possibility, but if
anyone can think of a simpler way....
If you have any ideas, please try to write me at my USENET
mailbox...I don't get to read comp.graphics often enough to avoid
missing things.
It would be nice if the modeling technique could actually model
surfaces with some kind of 3D spline/patch based system. Although
a technique which uses polygons would be ok too.
Thanks!!!
Greg Corson
19141 Summers Drive
South Bend, IN 46637
(219) 277-5306 (weekdays till 6 PM eastern)
{pur-ee,rutgers,uunet}!iuvax!ndmath!miloallen@granite.dec.com (Allen Akin) (05/21/88)
In article <1131@ndmath.UUCP> milo@ndmath.UUCP (Greg Corson) writes: > >I need to model various types of smooth surfaces such as rolling >hills, car bodies, human faces etc... > ... The odd part is that the rendering routine will need >to look for sudden changes in the objects contours (or places >where one object overlaps itself or another of the same color) >and draw "feature lines" at those places. For example, if you >were modeling a piece of metal with a very gentle bend, only the >outer edges would be drawn in as black feature lines....however >if you had a piece of metal with a sharp 45 degree bend in it >there would be a black like at the location of the bend. (I've replied to Greg directly, but I'm posting this to see if anyone has a better solution.) I had a similar problem once. Maybe the technique I used will be of help. I rendered the scene, buffering up a scanline at a time. For each pixel I recorded both the intensity (with or without shading, as you prefer) and the surface normal. In a postpass I then computed the angles between adjacent normals (in both the X and Y directions) and changed the pixel color if the normals diverged by more than a threshold. I also changed the pixel color if the distance from the eye to the surface changed more than a threshold, even if the normals were roughly the same. The results were fairly pleasing, and didn't require much threshold tuning. Sharp object edges are displayed correctly, and false edges (such as those generated by interpenetrating objects) are handled automatically. I used a ray tracer because I had analytically-defined objects and extremely tight constraints on memory. (In fact, I had so little memory available that I couldn't tessellate the objects I was rendering.) You can use a similar approach with a scanline rendering algorithm, or with Z buffering if you also have a place to store the normals for the postpass. If you use a ray tracer, be careful about your numerical methods; if the intersection points aren't fairly accurate, you get jagged edges. Allen