NOTE: We used two late days on this assignment.
The same picture of shells except with indentions for water drops instead of bumps. - simple2.jpg
What am I supposed to be looking at? (or Picture Basics)
The shapes of the shells were made by rotating and scaling toroids. Toroids have the advantage of being hollow in the middle, so the entrance to the shell looks more realistic. In addition, toroids have a great segmentation effect which adds character to the shells. Using a spot algorithm we programmed, we put a green line on the segments of the yellow shell, and colored half of each of the purple shell's segments a darker color. Though not as flashy as using a texture map, we felt using an algorithm would be different and more personalized. The water drops on the shells (which could be mistaken for warts :-) were made using a different algorithm. The drops algorithm placed the drops without using individual segments' coordinate systems, so that they could be randomly placed and look continuous from one segment to another. The background is just a marble colored plane placed behind the shells. It gives the shells an important, museumish look.
How did you do that? (or A Technical Description)
Making the yellow shell...
The yellow shell was made by varying the radius and height depending on the angle of a segment. The radius varied linearly with the angle in an equation similar to r(d) = d * slope. The height varied exponentially with the angle in an equation similar to h(d) = exp(d * slope). The toroid's size, which was used for the segment, was determined by the difference of the distance of the center of the current toroid segment's center to the starting position, and the distance of the toroid segment of the last turn's center (at d - 360 degrees) to the starting position. This varied the size so that the toroid segments overlapped and grew larger as the degrees increased. To add character to the shell, I rotated the toroid 20 degrees to give it a slanted look. An elongated spot texture map (defined by a procedure) was used to make it look classier, with an appearance as one might expect to find in a shell collection. Drops of water were then produced using a special displacement map (defined by a procedure).
Making the purple shell...
The purple shell was made with the ancient ammonites in mind. For this shell, the height was a given number, yet the radius varied exponentially. The height was defined similar to h(d) = constant. The radius was defined similar to r(d) = exp(d * slope). Toroids were also used in this shell, yet they had to be stretched to the given height and squished to the given size to keep the shell at a given height and yet grow in width. The width was determined by the difference of the distance of the center of the current toroid segment's center to the starting position, and the distance of the toroid segment of the last turn's center (at d - 360 degrees) to the starting position (just like in the last shell type). Like the last shell, this caused the width to spiral outward and grow as a normal shell would be expected to. An elongated spot texture map was also used in this shell, but the dimensions were chosen such to make it look more like a stripe. It also was modified to have a different effect on the color of the shell (make a darker purple). Drops of water were then produced using a special displacement map.
What the spot shader does (and why it doesn't look like a spot)...
The spot shader uses the texture coordinates, s and t, like the coordinates on a grid. Using these coordinates, we calculate a depth (or filter percentage value in this case) given the center of the ellipsoid, and the width, height, and depth of the ellipsoid. The calculated depth is used to determine how much of a certain type of color to filter out of the normal object's color. It also gives the shells a slight glossy look to make them look more realistic. They don't necessarily look like spots because the width and height can be varied, and we decided that if the spot was too small (since they have to fit on a segment), no one would be able to see them, so they have been elongated for your viewing pleasure.
What the displacement shader does...
The displacement shader uses points in camera space to separate itself from the individuality of the different object segments. Unless non-object coordinates are used, the displacement shader is confined to one object and would be unable to span more than one object (unless someone tried really hard to make them meet). From this prechosen point, it tests for points that intersect a conical area extending out along the z-axis. Then it displaces the points spherically to create the bump.
Sources for the shells.jpg picture: