Lesson 26: Working with Polygons
As well as modeling with NURBS curves and surfaces,
Alias includes a number of polygon- based modeling tools. Polygonal models
are essential if you are developing computer games or integrating Alias
models with other 3D programs. Using the polygonal tools, you can either
create a model from scratch or import a DXF model from elsewhere.
Modeling with Polygons
This lesson shows you how to build a space- age gun
turret using four methods of polygonal modeling:
- building with the polygon modeling tools
- using traditional Alias modeling tools to create and manipulate polysets
- converting NURBS surfaces into polysets
- importing and cleaning up a DXF model of the turret guard.
As you work through this lesson, you'll see some
specific issues of polygon modeling technique. For example, you'll often
need to keep track of both polygon count and surface normal direction.
It is also important to keep an eye out for non-planar and n-sided polygons.
By initially modeling with toggle shade on, you can see the model evolve
as a fully shaded model.
Initial Setup
If Alias is already running on your machine, you can
either save or delete current work. Otherwise, launch Alias and open up
four modeling views.
Launch Alias
- Double-click on the Alias icon in your workspace. If Alias is already
running, from the File menu, select New.
Display four modeling views
- From the Layouts menu, select All windows
All
(Studio) to display the Top, Front, Side, and Perspective
windows.
Tip: Use the tumble and dolly tools in the
Perspective window to get a larger 3D view of the workspace.

Building with Polygons
You can draw with three (triangular) or four- sided
(quadrilateral) polygons. However, since some video game systems don't
work well with triangular polygons, this lesson uses quadrilateral polygons.
Later you can convert these to triangular polygons
using the Polygon Edit
Split
Into triangles
tool.
Select Polygons
Add Polygons-
.
Change the Polygon Sides to 4 and leave the Polygon Mode set at
Single. Click Go to begin to build a quadrilateral polygon.
In the Perspective window, press the Alt key to temporarily
turn on grid snapping and click at the following points: (-4,4,0),
(4,4,0), (4,-4,0)

Note: After you enter the third vertex
of the quadrilateral polygon, a dotted line appears between the first vertex
and the third. This is a signal to remind you that you are working with
quads and that a fourth vertex is required.
Use grid snap to place the fourth and final vertex at -4,-4,0.

Tip: Creating a polygon in a clockwise
fashion ensures that the resulting surface normal is pointed out. If you
accidentally build a poly in the wrong direction, use the Polygon Edit
FlipNormal
to change the direction of the normals. You should be checking polyset
normals throughout this lesson.
Change to toggle shade mode
From the Display menu, select Tgl Shade. This
switches your display from wireframe to shaded mode.

Note: Although the default toggle shade
settings work quickly on all computer systems, they temporarily interrupt
the shaded mode during view changes and some modeling functions. Depending
on the speed of your system, you may want to change these settings so your
work is more interactive.
Extruding the base
Select Polygons
Extrude Polygon
Translate.
In the Perspective window, click and drag the top face of the polygon.
Drag up until the new shape reaches a height of about 4 units. Tip:
You may want to use the Front window to help you measure the 4 unit extrude.
This tool has no mechanism for entering an exact extrusion value.

Note: The left mouse button extrudes along
the normal direction. You can also use the middle mouse button to extrude
in the T direction and the right mouse button to extrude in the S direction.
Scale the top surface of the polyset
With the extruded polygon still picked, select Polygons
Extrude Polygon
Scale. Click-drag with the left mouse button to uniformly scale
the top polygon of the extruded shape around its center. Scale the top
polygon to half of its size.

Select Pick
Nothing. This deselects the top polygon and lets you work
with other parts of the polyset.
Tumble the view to look at the bottom of the polyset.

Add the bottom polygon
When you use the Polygons
Extrude tools, the extruded polygon becomes the top polygon
of the extrusion and the extrusion has no bottom polygon. In many cases
this bottom polygon isn't needed because it is under the polyset and can't
be seen.
For the tower, it should be added.
Select Polygons
Add Polygons to build a quadrilateral polygon.
In the Perspective window, press the Ctrl key and click at the
four corner points of the polyset in a clockwise direction.

From the Windows menu, select SBD. Notice how
you now have two polysets.

Note: To treat the tower as a single polyset,
you must combine the two polysets. While you can do this by selecting Polygon
Edit
Polyset
Combine polygons and picking the two polysets, you'll delete the
bottom polygon and will have to start again.
Select Pick
Object. Click the bottom polygon in the SBD view. From the Delete
menu, select Del active.
Select Pick
Object. Click on the extruded polyset.
Tip: By picking the polyset before you
draw the next polygon, you can add the next polygon to the selected polyset.
When you first drew the bottom polygon, the extruded polyset was not active
so they weren't combined.
Select Polygons
Add Polygons to build a quadrilateral polygon.
In the Perspective window, press the Ctrl key and click at the
four corner points of the polyset in a clockwise direction. The
SBD window now shows only one polyset because the new polygon was added
to the original polyset.

Check the polyset's surface normals
Select Polygon Edit
Flip and click-drag on the surfaces of the polyset. A surface
normal arrow appears.
- You must make sure they are both pointing outwards. If they already
are, drag off of the polyset and release the mouse button in empty space
so that no normals are changed. If you want to change a surface normal,
release the mouse button on the incorrect surface to flip its normals.
The polygons on this piece should now all be correct.

Select Pick
Nothing.
Polygonal Extrusions
So far you've used two of the polygon extrude tools.
These tools let you use one polygon as the basis for creating new shapes.
They also let you translate, rotate, and scale the end polygon of the extrusion.
You can use one or more of these tools on a single extrusion, but you must
remember to unpick the extruded polygon before you attempt to extrude another
polygon.
Extrude the top poly of the first shape
- Tumble, dolly, and track in the Perspective window to see the area
above the turret's base.

- Dolly and track in the Front window to see about 15 grid squares above
the base.

Select Polygons
Extrude polygon
Translate.
In the Perspective window, click on the top polygon and drag up
to extrude it 10 units along its normal axis. You may need to use the Front
window to count the units properly.

Tip: If you can't extrude the full 10
units in one click and drag, release the mouse button and continue extruding
with subsequent click-drags.
- Enter 3 to increase the number of segments along the extrude's
length.

Tip: The polygon extrude was originally
created with 2 segments along its length. You can increase or decrease
the number of segments along the length of a polygon extrude by entering
a new value using keyboard entry.
Since polysets have no construction history, after
the polygon extrude has been deselected, this value can't be edited.
Scaling the top of the tower
Select Polygons
Extrude polygon
Scale. Click-drag with the middle mouse button
to scale the top polygon about one-half unit in the S direction.

This shows how the Extrude Polygon tool
can be used in one direction only. Since the top of the tower should be
scaled in two directions, you need to undo this scale.
- From the Edit menu, select Undo. The entire extrusion
is undone and you are left with the tower base.
Tip: Notice that when you use different
Extrude Polygon tools in combination, the Undo undoes all actions
and not just the last one.
Select Polygons
Extrude polygon
Translate. In the Perspective window, again click
on the top polygon and drag up to extrude it 10 units along its normal
axis.
Select Polygons
Extrude polygon
Scale. Click-drag in open space using the left
mouse button to scale the top polygon about one-half unit around the normal.

Select Pick
Nothing to leave the extrude tools.
Making a window
You can add a window to the polyset with the polygon
extrude tools. To create the window, use the extrude scale and extrude
translate tools.
Extrude/Scale one of the tower polys
Select Polygons
Extrude Polygon
Scale. Click-drag on the middle polygon on the right side of
the turret tower to scale it in.

Note: In the shaded view mode, the old
polygon and the new extruded polygons are in the same space until the extrude
is completed. After the action is completed, the old polygon is removed.
- Enter 1 to change the number of segments along the length of
the scale to 1.
Select Pick
Nothing. The old polygon is removed and replaced by the extruded
polygons. The extrude scale tool lets you add new polygons while remaining
in the plane of the old polygon.

Extrude/Translate the center poly
Select Polygons
Extrude Polygon
Translate. Click-drag on the center plane of the window and
push it back a little. Again, the original polygon does not remove itself
until you have completed the action. However, you can see the depth of
the extrude in wireframe mode that Alias defaults to as you click-drag.
Select Pick
Nothing. The window is now complete.

Positioning Polygons
So far you've been modeling with polygons interactively,
making decisions visually without worrying about accuracy. Next, you use
keyboard data with the polygon move and scale tools to accurately place
and size the top polygon of a new extrusion.
Select Polygons
Extrude Polygon
Translate. Click-drag on the top of the tower to extrude it
by about 1 unit.

Select Pick
Nothing.
Select Polygon Edit
Xform polygon
Translate-
.
Click on the top of the gun turret to pick it.
Enter 0, 0, 15. The top polygon of the gun turret is now positioned
at an exact height of 15 units.
Select Polygon Edit
Xform polygon
Scale. Enter 1 1.5 and press Enter to scale the top polygon
by 1 in the S direction and 1.5 in the T direction.

Note: When scaling with this tool, you
can only use a relative scale. Absolute scaling is not possible.
Select Pick
Nothing.
Editing Polysets
To finish the top of the tower, you need to add extra
vertices to the top polygon. Once added, you can move them and check for
non-planar polygons.
Turn Toggle shade off
- From the Display menu, select Tgl shade.
- In the Perspective window, track and dolly into the top of the tower
to see it more closely.
Adding Vertices
Select Polygon Edit
Insert
Vertex
and insert two vertices along each side of the long edges of the top polygon.
Tip: Exact placement of these points is
not important.

Select Pick
Nothing to deselect everything.
Moving Vertices
Select Polygon Edit
Pick
Vertex. Click on the two vertices at the left side of the
tower.

Select Xform
Move. In the top window, press the Alt key and click
on the grid line one unit below the X-axis using the right mouse button
to snap the vertices to this line.

With Nothing
picked, select Polygon Edit
Pick
Vertex.
Click on the two vertices at the right side of the tower.

Select Xform
Move. In the top window, press the Alt key and click
on the grid line one unit above the X-axis using the right mouse button.
This snaps the vertices to the grid line.

Scaling Vertices
With Nothing
picked, select Pick
Point Types
CV. Click on all four of the new vertices.
Tip: As you can see, the vertices of a
polyset are really the CVs and can be picked and transformed as normal
CVs.
Select Xform
Nonp scale. In the top window, click-drag with the middle
mouse button to scale along the X-axis until the top of the tower has an
octagonal shape.

Note: To move vertices, you must
pick them within a polyset and then use the Xform tools to edit
them. When editing vertices, you must be aware of the pivot point location
of the selection. Normally the pivot point of a polyset is placed at the
origin. In this Nonp scale, you scaled around the pivot point at
the origin.
Select Pick
Nothing.
Non Planar and n-sided Polygons
The front and back polygons of the tower's top section
are now non-planar and n-sided. A non-planar polygon does not have all
of its vertices within a single plane. An n-sided polygon is one with more
than four vertices. By adding edges to these polygons, you can make sure
that they are broken into planar pieces. Also, these polygons have more
than four edges. This makes them n-sided, which could be a problem for
some game systems. However, adding edges to the polygons solves both these
problems.
Adding Edges
Select Polygon Edit
Insert
Edge. Alias prompts you to Select first vertex of edge
to insert. Click on the two vertices shown below:

This breaks the larger n-sided polygon into a triangle
and a new n-sided polygon.
Click on the two vertices shown below. This breaks the rest of the
polygon into another triangle and a quad.

Repeat for the other two corners that make up the second non-planar
polygon. The polygons are no longer n-sided or non-planar.

Verifying your polygon count
When working with polygons, you have to be aware
of the number of polygons and vertices used in your model. You can use
the polygon stats feature to verify the size of the models.
Select Polygon Edit
Pick
Polyset. Click on the tower.
Tip: You could also have used Pick
Object, but if you have a complex scene that mixes polysets with other
object types, this pick tool makes things easier.
From the Windows menu, select Information
Information window. Click on Polyset Geometry info to
open the section, which shows that you have 38 polygons and 40 vertices.
Close the Information Window.
Deleting polygons
Often, you'll need to remove unwanted polygons, such
as the top surface of the gun turret tower. Since this polygon will be
covered later by the rotating piece of the turret, you don't need to keep
this piece. This polygon also has more than four vertices. If you wanted
to keep it, you'd have to break it down into at least quad polygons.
Extract and Delete the top polygon
Select Polygon Edit
Polyset
Extract
polygons.
At the prompt, hold down the Shift key and click on the top surface
of the tower using the right mouse button. All the surrounding vertices
are picked and the rest of the tower is unpicked.

Click Go. The polygon you have just selected has been removed
from the polyset of the gun turret.
From the Delete menu, select Del active to delete
the polygon.
Verify the new polygon count on the polyset
Select Polygon Edit
Pick
Polyset. Click on the tower to pick this polyset.
From the Windows menu, select Information
Information window. The Polyset Geometry info section
shows that you now have 37 polygons and 40 vertices.
Note: Although you have deleted one polygon,
you have not changed the number of vertices.
Modeling with Type One Curves
So far the tower has been built using polygon tools
only. You can also use traditional NURBS surfacing tools to build polysets
using a special preference setting. This way you can use many of the surfacing
tools to create polysets directly.
Select Pick
Object Types
All obj/lights.
From the Object Display menu, select Tgl Template.
Now you can focus on the new pieces of the tower.
Select Curves
New Curves
New Curve (cvs)-
.
In the new curve option window, change the Curve degree to 1
and Click Go.
Tip: Degree 1 curves appear to be polygonal
but they are still NURBS-based. You can use higher degree curves when creating
polysets but the degree 1 curves give you the closest approximation of
the resulting polygonal shape.

Place the CVs at the following points using either keyboard input or
grid snapping:
(0, 0, 15), (4, 0, 15), (8, 0, 16), (8, 0, 17),
(4, 0, 18), (2, 0, 18), (2, 0, 17), (0, 0, 17).

Toggle Poly Creation
From the Preferences menu, select Construction
Construction Settings-
.
In the option box, go to the Modeling modes section and set Create
surface type to polyset. Click Go.

Now when you use the surfacing tools such as Patch
and Revolve, you'll create polysets instead of NURBS surfaces.
Create a Poly Surface with Revolve
Select Surfaces
Revolve. Click on the profile curve of the top of the turret.
It revolves around the Z-axis line.

Important: Don't unpick this surface
until you have completed the next step.
Select Polygons
Create polygons. In the Spline surface to Polygons window, change
the Subdivision type to Uniform and the Output type
to Quadrilaterals. Change the Subdivision Along U to 1
and Along V to 4. Click Build. The polyset is
updated to reflect these changes.


Change the Uniform Subdivision Along V to 2 and press
the Enter key to reduce the polygon count on the surface. The change
is automatically taken into account.

Close this window.
Note: Although the polygon extrude tools
do not have construction history, the surfacing tools do. This history
lets you edit the number of polygons with the Create polygons tool.
Cleaning up the polyset
The polyset still has a seam where the two ends of
the revolve meet. You need to merge the vertices at the seam and then clean
up the center polygons that converge to the Z-axis.
Delete the construction curve
Select Pick
Object. Click-drag over the construction curve and the revolved
surface. Click again on the surface to unpick it and leave the curve picked.

- From the Delete menu, select Del active. This
removes construction history and deletes the curve.
Note: As with other surfaces, history lets
you edit the surface by editing the construction curve. Since it is not
needed, it can be deleted.
Merge vertices
The revolved surface has extra vertices at the end
where the profile was revolved. You need to merge these pieces to clean
up the polyset.
Select Polygon Edit
Vertex
Merge-
.
In the Merge option window, make sure that Use texture cord tolerance
is set to off. Click Go.
- Track the Top view to see all the vertices on the right side of the
revolved surface. Click-drag around all the vertices on the right side
of the polyset.

- Click Go. The prompt line shows that the vertices have been
merged.
Removing edges
- Dolly and track the display so you have a close-up view of the center
part of the revolved surface.

In this section, there are several triangular polysets
that all converge at a center point. Although this condition is acceptable
in most cases, some gaming systems do not work well with triangular polygons.
To learn how to deal with these cases, you can change these triangular
polygons into quadrilateral polygons.
Select Polygon Edit
Delete
Edge. Click on the interior edges around the center of this
polyset one at a time.

Tip: Because this tool only removes edges,
it is not possible to remove the center vertex.
Select Polygon Edit
Pick
Vertex. Click on the center vertex to pick it.

From the Delete menu, select Del active You now
have an n-sided polygon. However, You still need to break this into quad
polys to finish the cleanup.
Select Polygon Edit
Insert
Edge and
click on the opposing vertices of the n-sided polygon as shown in the following
diagram.
Tip: You may have to tumble and dolly the
Perspective view to see the vertices.

Tip: This is a good way of breaking down
an n-sided polygon into a number of quadrilateral polygons.

You can repeat these steps for the bottom of the
revolved surface, since it is also made up of triangular polygons.

Checking the Surface normals
- Dolly out so you can see the whole top.
Select Polygon Edit
Flip. Click
on a polygon on the revolved surface. The normals seem to be going inwards.
Release the mouse button on the polygon to flip the normal.

Note: Since the profile of the revolve
was drawn in a counter-clockwise direction, the normals are backwards.
- Use the right mouse button and click on the polygon you just flipped.
Release the mouse button. This unifies the normals. All the other polygons
in the polyset are pointing in the correct direction.

With Nothing picked,
select Pick
Object.
Click on the revolved polyset.
- From the Object Display menu, select Tgl template.
Placing a primitive cylinder
You have now built polysets from scratch and created
polysets using the polygon toggle in the construction settings. You can
now place a primitive that uses the polyset modeling mode.
Creating the gun barrel
Place a cylinder into the scene
Select Objects
Primitives
Cylinder-
. In the
option window, set the Sections to 6 and set Caps
to 0. Click Go.

- Click in the Right window at the center of the revolved profile. A
polygonal cylinder is placed into the scene.

Select Xform
Nonp scale. Enter 8, 0.6, 0.6 to scale the cylinder.
Select Xform
Move. In the Front window, click-drag with the middle mouse button
to move the cylinder to the edge of the revolved surface.

Clean up the scene
- With Nothing picked, select Pick
Object. Click the cylinder to pick it.
- From the Object Display menu, select Tgl template.
Using Displacement maps
When converting NURBS surfaces, the conversion takes
into account any displacement maps that may be assigned. If a displacement
map is used, the resulting polyset has more detail.
From the Preferences menu, select Construction
Construction settings-
.
Under Modeling modes, set the surface type to normal NURBS surface.
Select Objects
Primitives
Plane. Press the Alt key and place a plane at the origin
in the Top window.
Select Xform
Scale. Enter 60 and press Enter to create a plane the size
of the required landscape.

Create a new shader
From the Windows menu, select Multi-lister
Shaders. From the Multi-lister's Edit menu, select New
shader. Double-click on the shader's name and rename it Hill.
Make sure the primitive plane is active. From the Multi-lister's Shading
menu, select Assign shader. Alias applies the new shader
to the plane.
Create the Displacement map
Double-click on the Hill shader to open up the shader
editor.
Open the Special Effects section, and click on the Map button
next to Displacement.
In the texture window, click on Ramp. This places a ramp texture
on the shader.
In the Ramp editor, change the Ramp Type to Circular.
Click on the delete box of the top black handle to leave only black
and white.
Click the circle end of the bottom ramp handle to pick it. Change its
Intensity to 1 and its Position to 0.295.
Click the circle end of the upper ramp handle to pick it. Change its
Intensity to 0 and its Position to 0.475.

Open the Intensity section of the ramp editor. Click the Map
button next to Aoffset.
In the texture window click Fractal to add this to the shader.
Now the hill is a little rough.

Close the Multi-lister.
Convert to Poly surface to Polyset
With the plane picked, select
Polygons
Create Polygons.
Change the Subdivision Type to Adaptive and the Output type
to Quadrilaterals. Change the Min and Max Subdivisions
to 5 and 10.
Click Build.

Alias creates a polyset surface based on the displacement
of the primitive plane.
Close this window.

Delete the original Plane
Select Pick
Object. Click-drag over the new polyset and the original plane
to unpick the polyset and pick the plane.
From the Delete menu, select Del active.
Pick and move the turret
Select Pick
Template. Click-drag over the pieces of the tower.
Select Xform
Move. Click-drag in the Front window and place the tower on top
of the hill.

With Nothing picked, select Pick
Object. Click on the hill geometry.
From the ObjectDisplay menu, select Tgl template.
Importing a DXF model
So far you have built the pieces of the model in
Alias. However, you can also retrieve polygonal geometry saved in DXF file
format. A model of a human figure has been provided.
Important: This section involves
the reduction of a polyset using the polygon reduction tool. Not all products
ship with this capability. If you don't have this tool, skip to the next
section -Rendering Polygons.
Retrieve the DXF file
- From the File menu, select Import. In the File
Lister, pick L26_PointingMan.dxf and click Retrieve.
Move the model into place
Select Pick
Object. Click on the new polyset.
Select Xform
Scale. Enter 2.5 and press Enter to increase the size of
the polyset.
Select Xform
Rotate. Enter 0, 0, 90 and press Enter to rotate the figure
so that it is pointing in the same direction as the gun.
Select Xform
Move. Click-drag with the right mouse button to drag the character
so that its waist is in the center of the gun turret.

Reduce the number of polygons
With Nothing
picked, select Pick
Point Types
CV.
Click-drag over the CVs below the figure's knees.

From the Delete menu, select Delete active.
Zoom into Perspective window so that the figure fills the workspace.
Select Polygon Edit
Polygon reduction-
.
In the option window, make sure that Reduction Amount is set to
High and then click on Specify Subdivisions. In the X direction,
set 8, in the Y direction, set 12, and in the Z direction,
set 25.

Click Go. At the prompt, click-drag in the top window over the
figure's body and left arm.
Tip: Don't pick the vertices of the right
arm.

Click Go. The bounding box that surrounds the picked vertices
is split into areas known as voxels. There are 8 voxels in the X direction,
12 in the Y direction, and 25 in the Z direction as specified in the option
window. All the vertices in a single voxel are converted into a single
vertex and then the model is cleaned up.

Tip: The resulting polyset is much smaller
and suitable for use as background geometry or as the basis for remodeling
the piece. You need to learn how the voxel to vertex relationship works
to effectively reduce your polysets.
Select Polygon Edit
Polygon reduction-
.
In the option window, make sure Reduction Amount is set to high
and that Specify Subdivisions is on. In the X direction, set 8,
in the Y direction, set 4, and in the Z direction, set 4.

Click Go. Click-drag over the left arm.

Click Go. Again the voxels are created and the polyset reduced.

Rendering Polygons
Before rendering polygons, you must decide whether
you want a smooth transition between the various polygons in a polyset
or whether you want to see the edges between the polygons. These parameters
are set in the Render stats window.
Finishing up
- Dolly and track in the Perspective window to create an overall view.
Select Pick
Template. Click-drag around all of the templated objects. From
the Object Display menu, select Tgl Template.
Select Pick
Object. Click-drag around all of the polysets in the scene to pick
them.
- From the Display menu, select Control-
.
With the scope set to active, turn All to Off and
click Go. Close this window.
Tip: Now the vertices of the polysets are
hidden. They can be hidden and displayed as needed while modeling.

Set the Render stats for the objects
- From the Windows menu, select Information
Render stats. If you want to rename the polyset names to
something more recognizable, double-click on each name.
- Scroll in the stats section of the window until you see Smooth Shading.
Turn smooth shading off for some or all the shapes. When it is turned on,
the edges between polygons are smoothed.
Note: All edges are smoothed when this
setting is turned on regardless of the angle between the polysets. If you
want a sharp edge between some polygons but a smooth edge between others,
you'll have to extract parts of the polysets. Edges that lie between polysets
do not render smoothly and can be used to indicate an edge condition.
From the Render menu, select Quick Render -
.
In the option window, turn Textures Off and change the
Shading Frequency to 10. Click Go.

In the image above, all of the polysets had Smooth
Shading turned off.
From the File menu, select Save as. Name the file
Polygon_tower and click Save wire.
Reset the Construction Settings
From the Preferences menu, select Construction Settings-
.
In the option window, change the modeling mode back to normal NURBS surfaces.
You must remember to do this if you want to use Alias modeling tools to
create spline geometry.
Conclusion
You now have a basic understanding of how to work
with polygons in Alias. There are other polygon-based tools that help you
work with and clean up polygonal geometry. Be sure to read about these
tools in the Polygonal Modeling in Alias so you can use them in
your own work.
aliasdocs@aw.sgi.com
Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company.
All rights reserved.
<