Polygonal modelling

Polygonal Modelling

Whereas CAD packages apply solid modelling techniques, real-time (and animation) oriented modelling packages are polygon-oriented.

Polygonal modelling is a form of surface modelling and is fundamentally different from solid modelling.

Whereas solid modelling emphasises the physical properties of objects, polygonal modelling emphasises the visual. Whereas CAD models are highly accurate and model smooth curves with great precision, polygonal modelling applies a technique called polygonal approximation to models consisting of vertices and edges.

Polygonal approximation approximates the curvature of a surface using small flat polygons. A sphere modelled with a CAD package is perfectly round, and is solid if you slice it in two. A sphere modelled with a polygonal modelling package is hollow and has a faceted surface that looks smooth if there are enough polygons.

The challenge when making models for interactive 3D applications is to produce objects that look good but use as few polygons as possible ("low polygon count") so that a computer can render them quickly.

Coordinate systems

World coordinates

  • 3D space is defined using X, Y, and Z coordinates
  • The origin is at 0,0,0
  • In a right-handed coordinate system, -Z is in the distance
  • Y is typically up but that is not always the case
  • Often called a global coordinate system

Coordinates diagram

Object coordinates

  • Each object has its own coordinate system
  • Within a virtual environment, there is one global origin but there may be many local origins
  • Often called a local coordinate system
  • We'll come back to how this works later (see section on scene graphs)

Transformations

In order to position an object in space, we need to be able to transform it.

A transformation consists of three operations : translation, rotation, and scaling.

To translate (move) an object, three values (X, Y, Z) need to be supplied and the modelling package needs to know whether the values are relative to the object's current position or are an absolute position relative to an origin.

To rotate an object, the modelling package needs to be told how much to rotate the object around each axis. One of the following notations is usually used to specify the rotation operation:

  • Euler angles: R(X,Y,Z), where X,Y,Z are angles (usually in either degrees or radians)
  • Quaternions: R(X,Y,Z,theta), where X,Y,Z is a vector and theta is the angle

The vertices of an object are multiplied by a scaling factor in order to resize it. If the object is to be scaled uniformly then each of the three values will be the same. e.g to halve the size of an object, you can use scale(0.5, 0.5, 0.5) and to double it's size you can use scale(2,2,2). Note that you can flip an object by scaling it by negative numbers and you can peform simple deformation by supplying non-uniform numbers.

Geometric Primitives

Some commonly used shapes are treated specially so that they can be created quickly. They are generated by the modelling package using a mathematical procedure and supplied parameters. The parameters (e.g. the radius of a sphere) may be provided by the user entering a value or using a mouse.

Typical primitives provided by 3D modelling packages include:

  • Sphere
  • Cube
  • Cylinder
  • Cone
  • Plane (square)
  • Circle

Modelling techniques

At it's simplest, using a modelling package involves adding vertices and edges to a space in order to build up an object however while the results may be optimal, it is a very time consuming way to build a complex objects. To get faster results, we can instead take a primitive shape and add/delete/move vertices and edges to turn it into the shape we want, but this is also time consuming if the object is complex, particularly if it has a curved surface.

A number of 3D modelling techniques are employed by most modelling programs designed for polygonal modelling. They are used to build complex geometric objects quickly and easily. In all of the cases described below, it is important to ensure that the local origin for an object is in an appropriate location at the end of the operation.

Lathed Surfaces

To create a lathed surface, you draw a curve and then rotate it around an axis. The resulting surface of revolution is a polygonal object. The number of steps in the revolve and the amount the curve is rotate can usually be specified to give greate control over the result and the number of polygons generated by the operation.

Extruded Surfaces

An extruded surface is a curve that is pushed in a straight line through space. The trace by the extrusion is the resulting polygonal object.

Swept Surfaces

Swept surfaces are extrusions along a curve. For example, a circle can be swept along a curved path to create a complex pipe. Some modelling tools also support transform operations on the curve so that the swept surface can be scaled or rotated along the path.

Lofted Surfaces

Another very powerful technique is lofting. A lofted surface (or "skin") is produced by selecting a series of curves and performing a lofting operation, which joins them together.

Geometry deformation

Some modelling programs have tools that enable you to deform objects as if they were made of clay. While this enables complex organic objects to be sculpted relatively quickly, care should be taken so that the final object does not have more polygons than necessary. Simpler deformation techniques that modelling packages typically offer include the ability to bend, twist or taper objects.




Michael Louka, October 10, 2001