PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT

We will use the rollercoaster generator (minus the support columns) to generate intriguing smooth shapes by sweeping interesting crosssections along a B-spline curve.

Can also be seen as a sweep-morph of a Bezier curve along 4 Bezier control rails.

It is painful to mend two patches together with G1 or C1 continuity.

Higher-order, e.g., biquintic Bezier patches are typically required to give G2 continuity. [more on that in CS284]

C2-continuity is automatically guaranteed because of the substantial overlap of the control points between adjacent patches.

These approximating polynomial functions generalize nicely to more complicated topologies in the Catmull-Clark subdivision surfaces. [next time]

When rendered with

We can make their appearance much smoother, by smoothly varying the shading over the whole surface.

-- either because the illumination is non-uniform,

-- the reflection has highlights,

-- or the surface is curved.

It can be done in two basic ways:

Principle: Use barycentric or bilinear (using sweep-line) intensity interpolation.

GOURAUD SHADING TECHNIQUE:

1. Compute Brightness, B, at visual vertices, A, B, C, D ...

2. Compute Brightness along edges by linear interpolation between vertices.

3. Compute Brightness along spans by linear interpolation between edges.

We first calculate averaged vertex normals at all the vertices. The best way to calculate these averages is by weighting the normal of every facet that touches this vertex with the angle within that contributing facet. -- In this way, if we were to split one of these facets, the net contribution to the averaged vertex normal would not change. (For well-behaved meshes just giving every facet normal an equal weight is also acceptable).

Once we have all the vertex normals, we then calculate the surface normal at an arbitrary point inside a facet, by bi-linear interpolation between the surrounding vertex normals. For triangles this just means weighting the three vertex normals with the barycentric coordinates of the ray intersection point.

In a classical rendering environment, we compute the normals for every pixel in an efficient incremental manner, scanline by scanline.

PHONG SHADING

1. Compute normals at visual vertices, A, B, C, D ...

2. Compute normals along edges by vector interpolation.

3. Compute normals along spans by vector interpolation.

4.For every pixel compute brightness from interpolated normal direction and local light intensities.

**Phong can interpolate over flat spots**. -- But it is not perfect
either !

**Limitations
of Phong Shading:**
“Corrugated” structures with too few vertices (just a zig-zag) may have
all parallel normal directions and cannot represent periodic
shading variations.

(Geometry
that is not "seen" at vertices cannot be inferred ! Illumination
changes that are not seen at vertices cannot be inferred
!)

Motivation

Two more scalar values need to be stored at each vertex (s,t).

Rendering textures is easy: Bilinear interpolation of the texture coordinates s,t.

If the geometric coordinates and the texture coordinates of a facet are not matched, serious distortion can result.

Modeling is more difficult: How to assign texture coordinates to avoid pattern discontinuities on objects of high genus that loop back onto themselves?

However, at the silhouette edges one can still see clearly that the surface is primarily polyhedral.

Rather than actually tracing rays from the shiny surface into the environment to see what gets hit, we use s single global surrounding picture of the environment which simply gets accessed with the direction of the reflected ray. Any local intersections with real objects in the scene are ignored.

Example, the surroundings of a bar in Palo Alto reflected in a shiny sculpture.

PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT