Catmull-Clark Subdivision in Java/VRML

John Reese, 10/16/98


Project description

Modeling three dimensional surfaces with polygon meshes is one of the most fundamental of graphics techniques. Polygon meshes allow approximate representations of arbitrary three dimensional shapes. Using subdivision algorithms, polygon meshes can be made more and more smooth and detailed.

The goal of this project was to implement a quadrilateral mesh subdivision algorithm by Catmull and Clark. The Catmull-Clark subdivision algorithm splits each quadrilateral into four new quadrilaterals, described by nine corner points. These new corner points are linear combinations of the old surrounding points. Although triangular meshes are more widely used, quadrilateral meshes have some useful advantages. Chief among these is that it is easy to parametrize a quadrilateral in two dimensions.

The project was implemented as a set of Java classes that could be called as an applet from a VRML scene containing a polygon mesh. This platform was chosen because it was believed that using state of the art web technology would give anybody in the world the ability to experiment with subdivision. Unfortunately, VRML browsers, which are currently most widely used in the form of Netscape and Internet Explorer plugin modules, are still in a very primitive state. Although the VRML applet works fine, it is extremely difficult to set up a machine with the proper software to display it.

The main entry point to the sample applet on the web is a CGI script which takes as an argument the name of a VRML polygon mesh. It creates a VRML scene containing that mesh as well as the appropriate sensors and routings necessary to connect it to the subdivision applet. If you click on the mesh model, it is subdivided three times, and a new scene is emitted. In this new scene, clicking on the mesh will cycle through all four representations of the model (the original and the three, more refined, subdivided versions).


Screenshots

The images represent a single mesh which was subdivided three times. The first image is the original, and each of the following has been subdivided one more time. Note the increasing smoothness and detail of the surfaces.

The frames around the image represent controls from the VRML browser I was using when I took the screenshots, so don't be surprised that they don't do anything when you click on them. Try to disregard them. I'll crop the images when I get around to it.

original image
once subdivided image
twice subdivided image
thrice subdivided image


The Applet

At this time, this demo is only known to work under Windows NT or 95 with the WorldView or CosmoPlayer browser plugins. Download the JAR file first and put it in your class path, then click on one of the first two links. If you're lucky, it may even work.


VRML information resources


I can do anything I want!  I am the Master of Time! maintainer