Updated 10 Aug 2003

Latest Updates

Mesh from NURBS

Latest Tutorial

We have recently had several questions regarding mesh generation from Rhino NURBS models. This tutorial shows some of the mesh tools in action and illustrates several methods of controlling the number of polygons used in the final mesh. This is important in any kind of 3D simulation, and can have a big impact on the size of our digital model files.. The more polygons the rendering or simulation software has to process. This leads to longer rendering times, or in a simulator, a slower frame rate and therefore the fluidity of the animation degrades.

1.   Rhino can generate a mesh from any surface or solid model created within itself. The first tool modellers will discover is the ‘Mesh from NURBS Object...’. Clicking on this button will bring up a prompt asking you to ‘Select Surfaces or Polysurfaces to mesh:’ Left-click to select them and then hit enter to complete the selection. Then comes the interesting bit!

2.   The Polygon Mesh Options box opens and offers a simple slide control over the number of polygons used to represent the item selected. Hitting the Preview button will show what the mesh will look like at that particular setting, and the Command History window will report how many points (vertices) and polygons have been used to make that mesh. It is very easy to try the slider at different positions and immediately view the resulting mesh. Clicking on the OK button will create the mesh as a new part in your model, and leave the original NURBS object selected.

3.   Here the slider is set at the high end, and the mesh is very fine, but has over 2300 polygons! Just for one cylinder of one engine! This mesh would look very smooth, but if the rest of our model was meshed similarly the simulator would be hopelessly slow.

4.   Here the slider is set at the low end, and the mesh is quite crude, with only 30 polygons! However, with smoothing and a good texture, this might be more than adequate for our model. This may be a sufficient level of control for many mesh items.

5.   You will have noticed a fourth button on the Polygon Mesh Options dialogue box, titled ‘Detailed Controls...’. Clicking on this button will bring up a new dialogue box with a number of additional controls over just how the mesh is created from the NURBS master part. The Rhino Help files contain a very good explanation of how meshes are generated and how these various parameters affect the final mesh produced. There is nothing like trying them out to get a sense of how useful they may be.

6.   Here we have the default settings for the Polygon Mesh Detailed Options dialogue box, and the mesh that would be generated. The six data entry boxes allow you to define limits on the polygons created. These limits come into effect when a polygon would otherwise break the limitation. Then additional vertices are added to or removed from the mesh so that the new arrangement of polygons stays within the limits set. If we start by look at one setting, ‘Max aspect ratio:’, and see how changes made to the setting alter the mesh. The aspect ratio of a polygon is the relative proportion of its length to its width. Set at 6, A polygon 1 inch high could have a length of up to, but no longer than 6 inches. The part we are modelling here is cylindrical, so we could have single polygons running from one end to the other rather than having 5 or 6 end-to-end as there are here. We will try adjusting the value to 30, which will allow much thinner-proportioned polygons. You can over-type the value, or use the up/down arrow buttons.

7.   You can see the side of the cylinder is now made of polygons that run from end to end, and the polygon count has gone down from 534 to 124. The mesh would look identical visually, and yet we have saved over 75% of our polygon count for this part. The other controls work in a very similar way. Including several limits can mean there is an interaction between the settings, so try them out individually first. Sometimes changing the settings has no effect on the mesh. This is because the polygons are already accurately matching the mesh and don’t need any more refinement, or they are being limited by another setting. Rhino tries very hard to get as accurate a mesh from the NURBS master part as possible, so polygon counts can rise alarmingly with some shapes and geometries. The Detailed Options allow very great control over the mesh actually created, and as you can Preview the result of any settings it is easy to make the mesh that is appropriate for your model. Do check the help files thoroughly on these controls and remember some settings are related to size, others to proportion and angle, and so are independent of the size of your model.

8.   Here we have limited the minimum edge length to 1 unit, instead of the tiny 0.0001 default setting. Now the mesh will be made from polygons with edges 1 unit or longer, proportioned up to 1:30 but no more, and with no more than 20 degrees change of facing direction between adjacent polygons. Polygon count is now 48. ‘Maximum edge length’ works in exactly the same way, while ‘Max dist, edge to surf:’ dictates how closely, or loosely, the mesh follows the original NURBS surface. If you leave any of these settings blank, Rhino will go ahead an generate a mesh without considering that limitation on the refinement process.

9.   ‘Minimum Initial grid quads:’ is slightly more obscure in its function, and the default setting is off. Rhino  applies a crude start mesh to the NURBS model then checks all the current polygons against the parameters set. Where the mesh exceeds those limits, more vertices and polygons are added until the conditions are all met. When this control is used, it sets the start number of quad polygons with which Rhino initiates the meshing process. This is useful if you know you will need polygons for editing purposes later on in the project, but Rhino would otherwise use a few large polygons to represent that surface.

10.  The 5 check boxes to the right of the Polygon Mesh Detailed Option dialogue box are additional controls which affect the structure of the final mesh created. Refine and Pack Textures are on by default, The other three are off. The help files provide more details on what these functions do, but we will be covering these and some other useful mesh tools in another tutorial.