Wednesday, June 20, 2012

Day 18 and 19

A bicubic patch
Getting out of the primitive spheres now, I am trying out a bit more advanced surfaces. Above is a bicubic patch. The points on it don't need to be co-planar as with polygons. Its a 16 point grid in which the patches joining the points are not flat, but they fit the curve.

I first started out with polygons using the Polygon "P" command. I made it blue, because I am cool like that :p

A polygon

And this is a bilinear patch:

A bilinear patch
They look very similar but there are important differences. First of all the points on a polygon surface need to be coplanar while patches can handle the exception. Secondly, while defining the points for a patch we go in a row-by-row manner, whereas in a polygon, we follow a path around a boundary. Also, a patch always has only 4 points. Below is an example of a non-coplanar bilinear patch.

Non-coplanar bilinear patch
Working with polygons, we can cut holes into the geometry using the GeneralPolygons command, as in the example below where a triangle has been cut out of a square.

Cutting a hole into a polygon using the GeneralPolygon command
When we try to approximate a curved surface in renderMan using polygons, we get sharp edges where the orientation of a surface changes. To solve this, we can use the Phong Shading technique where we interpolate normals. This is what we discussed with Peter Comninos at the end. Its cool to see it working. Although its useful to approximate the surface, the profile still shows that it is made out of two flat polygons.

Phong Shading to interpolate normals
Thats about it. The past few days have been really slow an I am trying hard to pick up the momentum again. Easier said than done.

No comments:

Post a Comment