# Modeling with nurbs

## Theory

Curves as basis for geometry

Certain properties of NURBS geometry make the NURBS perfectly suitable for designing complex geometries like double curves surfaces. The form freedom which NURBS supports and the possibilities to adjust them give the designer a wide range of 3 dimensional forms to explore. To be able to make the right decision a designer will need a basic understanding of the topology of the geometry which will be used in the design process. NURBS geometry are widely used in computer aided design CAD, computer aided manufacturing CAM and computer aided engineering CAE software. It supports industry standards like IGES, STEP and ACIS. The ability to intuitively and predictable adjust the curves and surfaces make it an power full geometry suitable for design.The NURBS are a generalized derivative of the Bezier curve. ( Pierre Bezier worked as engineer for Renault , development started in the 1960’s to find a method to represent curved lines and surfaces for car design).

Deformation of planks
Curves as basis for geometry

Bend lines created in Maya and Rhino are called CURVES, that are based on Bezier Curves and are used as the basis for NURBS and Polygon modeling within Maya or only as basis for NURBS modelling in Rhino. The way the curves are defined makes is possible to draw straight lines and smooth curves. The concept of the structure of the lines where inspired on techniques used in the shipbuilding industry at the beginning of the 19th century. The wooden planks of the ships hull where bend by adding weights at different points on the plank. The amount of bend of shape of the bend could be adjusted by increasing the weight or the position of the weights.

Degree

The concept of deformation was digitally implemented in to the curves definition. With the effect that the curve in not only defined by the start and end point of the line but also by the weights between the two. These position and strength of the weights will determine the amount of bending of the curve. The amount of weights between the start and end point are defined by the Degree . Degree 1 will mean that there are only the start and the end point. This will generate a straight line. Degree 3 will contain next to the start and end points two weights to define the curve. By increasing the degree more weights are added and the possibility to deform the line will increase.

Parts of the geometries topology is comparable with the Bezier curve. The surface supports the same use of weighted vertices to define the curvature and shape of the geometry. The geometry itself can be seen as a combination of two sets of "parallel" curves placed at a crosswise angle, with the mesh defined between the curves. Resulting effect is that the surface can support two different degrees, one in each direction. These curves on the surface are called ISOPARMS. The ISOPARM will behave almost the same as a Bezier curve. Selecting and moving a vertex on a surface will basically deform the ISOPARM causing the surface to deform. The more ISOPARMS on a surface, the more vertices are generated to deform the surface OR the higher the degree of the curves, the more vertices will be generated per ISOPARM and surface as a whole.

The NURBS surface contains several different components. We have already found out that the NURBS surface contains ISOPARMS. The ISOPARMS are the sets of crosswise angled curves on the surface. They are in fact the curves where the surface is based on, but are part of the surface itself.

## Introduction

When working with nurbs you need the modeling menu set:

In the edit curves menu you can find all commands with which you can alter curves. The surfaces menu contains all commands which create nurbs surfaces and in the edit nurbs menu you will find all commands to edit nurbs geometry.

### Construction history

In Maya geometry has a history. This history describes what has happend to that geometry, and how it was made. This information can be used to your advantage, because you can change things (for example values) afterwards. Which results in a more interactive way of modelling. For example; if you make an object based on curves, and change these curves, your object will also change (see image below).

History can be recognized in several ways. The most obvious is in the channelbox on the right side of your screen. This contains the regular X, Y, and Z transformation values, but also inputs and sometimes outputs. If there is information in the in- or outputs box, there is history. You will see outputs if your selected piece of geometry is used to make another piece of geometry.

Also history is recognizable if you select an object, and the output geometry becomes purple (in wireframe mode).

In order to change an object with the use of history, you can do several things:

• Change the object(s) that were used to make the with history connected object (as done in the above example).
• Change the value in the channelbox numerically, by clicking on an out- or input connection.
• Use the manipulator tool to change the value graphically (as done in below example).
• Deleting history

History is often very handy, and it is recommended to keep it as long as possible. But sometimes it gives unwanted results. For example, when you select some objects and move them, some objects move twice as fast. This is related to the history of these objects, where it accumulates the movement.

If you want to prevent this from happening, you can either select only the output geometry, and not the objects that were used to create the output geometry (like the curves in the above vase example), or delete the history. Which can be found in EDIT - DELETE BY TYPE - HISTORY.

Once the history is deleted, you cannot get it back. The geometry becomes dumb, and is no longer linked to other objects, and you will no longer be able to take advantage of the link between objects.

A key to understanding maya is understanding the way maya builds the geometry. For example: A polygon exists of Vertices and Edges. Editting the components of a polygon edits shape of an object, and the form or location of the other components. In order to change the shape on an object in maya, you can also modify component-type information to alter the shape.

There are a variety of component types, such as points, isoparms, faces, hull, pivot points and handles. These components can be used to interactively modify and reshape the appearance of an object. These may be confusing, but is very usefull to understand the different type of components, and the role they play in creating objects.

When you work with NURBS you almost immediately work with curves, often these curves are on the same place of the edge-isoparms of surfaces. Thus it often occurs that you want to select a curve, and by accident select a surface. In order to prevent this, you use selection masks. First you make sure you are in object mode. Than disable either sufaces or curves, by disabling one, you prevent selecting that type by accident.

• Surface selection:

Disable this option if you want to prevent selecting surfaces by accident.

• Curve selection:

Disable this option if you want to prevent selecting curves by accident.

When wanting to change NURBS or NURBS curves, you can use the component mode, in which you can select parts of a curve or geometry.

• Control point selection:

Use control points to change the shape of the surface or curve.

• Edit points:

Use edit points to select points on a surface, to add knots or change the surface or curve.

• Isoparms:

Use isoparms to extract curves from, or the creation of geometry

• Hulls:

Use hulls to select a line or row of cv's.

## Creating geometry

### Creating objects using primitives

The NURBS primitives can be selected by the Create- NURBS Primitives command. The settings of the geometry can be adjusted in the option box or after creation in the channel box.

Note that the use of nurbs primitives is not that convenient. It's easier to edit and work with your geometry if you create it by using curves. However, in some cases it is convenient to use isoparms originating from primitives, in the section about selection masks it is shown how you can select those.

### Creating objects by duplicating

To duplicate nurbs geometry, you use the edit > duplicate command, as is described in the creating objects by duplicating section of the chapter about modeling with polygons.

## Creating curves

### curve tools

To create a curve we can use two commands:

Both command create the same type of curve, but the way you draw them is different. You will mostly use the EP curve, as it will run through the points you specify. In most cases that is the most convenient way to draw a curve.

When using the CV tool, you'll specify the locations of the Control Vertices (which act like 'weights' that pull the curve into a curvature; the curve does not run trough them).

The degree can be adjusted by clicking on the rectangular box next to the command. An option box will open where adjustments can be made regarding the activated command.

When accuracy is required, there are several optional methods to assure accurate construction of curves:

• Activate the grid snap option to snap to grid points.
• Activate the curve snap option to snap to a curve( activate snap, press mouse button and hold whilst dragging along the curve).
• OActivate the point snap option to snap to a corner of a curve( first activate the display of the corner points - Display - Nurbs - Edit Points , activate snap, press mouse button and click on corner of curve).
• Enter the absolute or relative coordinate of the next point of the curve. (Activate the curve command and define the first point, type in the absolute or relative coordinate of the next point)

When you create a closed curve, you draw the last edit point (EP) on top of the first one, with either point- grid- or curvesnap. Or after creation move the last control vertex (CV) on the first one. This may seem strange, but using this methode results in less problems when using the curve in, for example, a loft action. This methode is absolutely not ment for polygonal modelling.

### arc tool

Create - Curve tools There are two main options: two point and a three point arc. The options define how you can create the curve.

## Editing curves

### component mode

Further alteration of a created curve is possible on component level. By selecting the component filter, Edit Points and Control Vertices of the line itself can be moved by using the move tool.

The commands we use to edit curves in different ways then through moving the components are found in the surfaces menuset, under the edit curves menu.

### open/close curves

When creating lines, sometimes lines don't form a closed curve. This could be a problem when wanting to create a loft or make a planar surface. Under Curves > open/close curves you find the option to close any gap in the curve.

### attach curves

To connect different lines with similar or different degrees, the EDIT CURVES ( adjust curve) - attach curves command can be used. This will connect or blend the end of one curve to the beginning of the other curve. The Option Box contains the setting how to connect the line, if it should blend them together or connect them retaining their original shape. The begin and end of a curve is defined by the drawing order. If a connected curve loops around and connects to de wrong end of the line, the end point of that line is not correct due to the drawing order. If the EDIT CURVES - reverse curve direction command is used the direction of the line will be altered which means that the end point becomes start point and vise versa. The curve will now attach correctly.

The difference between blend and connect is that the blend option will make a smooth transition between both curve ends, whilst the connect option just makes a straight connection.

More advanced options and problem solving of the attach curves command

### align curves

There is another way to connect two lines together. This is the align curves option. This option will give you more control on how the curves are attached. The way a curve is attached is defined by the continuity of the curvature of the connecting points of both of the lines.

• If there has to be no change in curvature of the connecting points the option connect can be used , also called a C0 connection.The position option causes the two points to meet exactly.
• Tangent causes the tangency at the two points to match, which is called C1.
• Curvature causes the two points to meet with the same arch in curvature. When this option is selected, the curvature scale sliders are available. These can be interactively adjusted in the Attribute Editor and the Channel Box.

Using options for generating continuity of the geometry is crucial if the geometry has to have a fluid continuity of form. Geometry based on curves will be affected by the continuity of the curves themselves. With the option of interactively altering the connection settings the geometry can be adjusted to alter the geometries continuity.

### detach curves

The option to detach curves is based on edit points, which become the cutting points. The cutting point can be placed anywhere along the curve. First go to component mode and select the Edit Point option. Select the location of the cut and then give the Detach command.

In the optionbox of the detach curves command you can choose whether you want to keep the originals or not.

### cut curve

Another option to cut a curve at a certain point is the Cut curve tool. Curves overlapping each other will behave as knives and will cut the curves at the point of intersection.

More advanced options can be found in the optionbox.

### offset curves

When wanting to create a copy of a curve, where every side has the same distance from the original, the regular scale option does not work satisfactory. Thus we use the offset curve command.

### extend

After a curve is drawn, it can be extended by using the extend curve command.

The extend curves option mentioned above only lets you add one point with a certain distance, the add points tool will let you click your own points that make the extension of the curve.

### insert knot

The geometry of the curve can be adjusted by adding extra vertices into the curve manually by inserting a knot by using the insert knot command. This will make it possible to locally adjust the vertex density of a curve. Which may be use full for local deformation of the curve.

### rebuild curve

Another option to change the number and placement of the certices is the complete rebuild of the curve by using the rebuild curve option. This will enable the change of the amount of vertices of the curve to the change of Degree of the curve.

### smooth curve

The smooth curve option is another way to adjust the curvature of your curve. The smoothing option works on the whole curve or the selected vertices of the curve.

### curve fillet

Another option of smoothing is the curve fillet option. This option will create a smooth fillet of corners of two different curves.

## Creating surfaces

The commands we use to create surfaces are all found in the surfaces menu set, under the menu surfaces.

### loft

Surfaces > loft creates a surface between two or more curves. It creates a surface from curve to curve in order of the selected curves.

### extrude

The extrude option is used to create NURBS geometry. One setting in the tool is used to extrude a single curve in a certain specified direction, creating a surface. This extrude option in one direction uses only one curve.

Extrusion along a path has the advantage that the direction of the extrusion can be controlled. There is however a disadvantage of generating a surface like this. The profile ( section ) of the surface generated isn’t constant if the curve along which it is extruded curves to much. To generate this geometry select all the settings on the right of the option box of the command.

First select the circle you want to extrude, then select the curve. And as final step select Extrude.

### planar

Surfaces > planar creates a planar (flat) surface enclosed by one or more curves, isoparms or trim edges. Two conditions have to be met in order to create a planar surface successfully:

1. the lines need to connect or intersect (no gaps between them)
2. the lines need to be planar (flat).

### bevel

With the bevel option you can make a beveled surface from a profile curve. Select a curve and then use the bevel option. This will create an extruded surface with beveled edges for a smooth transition.

### square

The square option looks a lot like the boundary option however it is limited to four intersecting or connecting curves. First select the 4 overlapping curves, then use the square option to make a NURBS shape.

### boundary

The boundary option will create a surface between an minimum of 3 curves connected to or intersecting each other. First select the three curves and use the boundary option to create the surface.

### birail

The other method to generate NURBS geometry is to define the geometry in both directions with curves and then using the birail option.

## Editing Surfaces

The commands we use to edit nurbs-geometry are all found in the surfaces menu set, under the edit nurbs menu.

### attach surfaces

Edit Nurbs > Attach surfaces: When we attach two surfaces, the Isoparms will have to be combined in one to generate the new attached surface. If the Isoparms don't line up they could be moved, possibly altering the curvature of the surface or extra isoparms are integrated. If the number of isoparms doesn't match new ones will be created to support both sets of the surfaces. The surface will move to close the gap between the two surfaces. If the isoparms are connected the curvature of the surfaces may alter due to the way the isoparms connect with each other. They can blend together or keep their curvature and make a hard connect without influencing the other isoparm.

### attach without movement

Edit NURBS > Attach Without Moving blends surfaces together, but they don't move towards each other. The surfaces themselves will retain their shape, their will be a surface created to fill the gap and the surface will try to align its tangency with the existing surfaces.

### align surfaces

Surfaces > align: With this option the surfaces are aligned. Just as the curves there are three methods of alignment. The C0 –positional alignment, the C1 – tangency alignment ( the surface will make a smooth connection with the least impact on its original shape) C2 – Curvature. The curvatures will be matched to generate a smooth transition. The in and out curvature will be the same, the effect on the existing surface will be larger. In the option box the settings of the alignment can be altered.

### open/close surfaces

Surfaces > open/close surfaces: Just as a curve a surface can be closed. The function works like the attach option with the difference that the attached edges belong to the same object. A surface can be closed in both directions or one of the two directions.

### detach surfaces

Surfaces > detach surfaces is used to split a surface using one or more isoparms as a cutting edge. The result is two or more separate surfaces. The advantage of this method is that the resulting geometry still will be defined by a set of crosswise isoparms and will have the full functionality of a NURBS surface, opposed to trimming, which effectively only hides specific parts of a surface.

### project curve on surface

Surfaces > project curve on surface: To be able to trim a surface at least one curve (curve on surface) should be present that divides the surface in (at least) two parts. Maya has the option of projecting a curve on a surface. The curve will be projected along the axis of the view port or the normal of the surface. The result will be a curve on both sides of the surface.

### intersect surfaces

Surface > Intersect creates a curve-on-surface along the intersection of two surfaces, which could later be used for trimming for instance.

### trim tool

Surfaces > trim tool can be used to cut out or cut off a part of a surface. The cutting edges are closed curves on the surface or curves moving van one edge of the surface to another or the same edge of the surface. The surface within the curves can be deleted or kept and the surface outside the curves deleted.

When you've created a curve-on-surface with Intersect Surfaces or Project Curve on surface, the trim tool removes the parts divided by the curves.

To remove parts of your geometry that are intersecting:

Select the two surfaces that are intersecting, and need removing.

Go to Surfaces > Intersect, this will create a curve on the surface of both the objects, this curve can later be used for trimming (removing parts of the geometry).

Now the NURBS geometry is ready for trimming. To trim: Select the object to be trimmed, go to Surfaces -> Trim Tool And click on the parts of the geometry that you want to keep (a dot will appear on the parts that are preserved). When ready, press ENTER.

Repeat this process to make a hole in the other part of the geometry.

### insert isoparm

In the case of the surface we can Insert isoparms which in their turn are defined by the vertices. Adding an isoparm will increase the vertices of the surface. If after generation of a surface, the surface locally have to be adjusted and more vertices are needed to support the transformation inserting a new isoparm can be enough to help the transformation.

### extend surface

Extend Surfaces extends the surface with a certain value defined in the option box of the command. The direction and starting point of the extension can be altered.

### offset surface

Offset Surfaces is a quick way of generating an object with thickness. The offset and the original surface can easily closed by lofting the edges of the surfaces, because both surfaces have the same topology.

### round tool

Surfaces > round tool: The round tool is used to generate beveled edges on surfaces. The tool has the advantage in contrast to the bevel option that a rectangular edge can be beveled without first adjusting the surfaces themselves.

### circular fillet

Edit NURBS > Surface Fillet > Circular Fillet enables you to make smooth transitions between two intersecting surfaces. The fillet tries to accommodate a tangent continuity. The Radius of the fillet can be adjusted. If the radius is to big the fillet may possibly fail.

### freeform fillet

Surface > Surface Fillet > freeform fillet: Free form fillet is basically the same function as the circular fillet. The difference is the way the fillet is defined. With a circular fillet, the fillet is created between two objects. With the free form fillet the edges of the fillet is defined by curves on surfaces. This will create the option to make very complex fillets, with the fillets still tangency aligned with the surfaces.

### fillet blend tool

Surface > Surface Fillet > Fillet blend tool: The surface blend fillet is a good example how the topology of NURBS surfaces influence the possibilities to adjust a surface. With the Surface Blend Fillet tool it is possible to blend multiple surfaces together. By creating the surface the tangency will be aligned with all the surfaces where the blend is applied to. In the selection option of the tool, the first thing which is asked is to select the left edge and after that the right edge. This will mean that the direction of the blend surface is defined in one direction by the selection. Twisting of the surface will mean that the surface direction has to be altered. This can be done after the blend is made.

## Common problems

Several problems can occur when modeling with NURBS. Modeling with nurbs: Troubleshooting describes common issues and the solutions.

## Tutorials

Overview of Maya topics