# Laplacian smooth on control points

Hi everyone,
the smooth command smothen out the bulges of an irregular surface, but it also changes a lot the overall shape of the surface see attached images.
Is there any command to smooth a surface without loosing the overall shape? Such as the Laplacian smooth for meshes?

Hi, this is the wrong approach. You are not able to ever create a smooth surface just by having one big one. Smoothing cp locations doesnât help, if they are totally wrong located.
Take the initial shape and build it new with a couple of simple surfaces. Start with the big, low-curved ones and apply transitional surfaces in a second step (blends, fillets).

Yes, usually the best thing to do is reconstructing the surface from reference curves, however when you start from a mesh or surface that needs to be reverse engineered you can not smooth fit or fair the extracted curves too much to not increase the distance between the original surface and the extracted curves, furthermore if you manipulate adjacent curves their overal shape might change differently and this might cause a waving effect on the surface that it might be easier to solve by smoothing the surface because it would consider also the connection between consecutive curves in the other direction.
Maybe the example I sent is not the best, but it was usefull to explain the problem.

In mesh modeling it can be applied a laplacian smooth to flatten the bulges by preserving the overal curvature of the surface according to an input radius. I think it might be useful a command similar to that for the control points of the surface.
Do you think there is a command in rhino that does that?

The Smooth command appears to use a version of Laplacian smoothing of control points.

Are you trying to smooth curves or surfaces?

Hello - there is not.

-Pascal

Thank you everyone for the fast response,
Iâm trying to smoothen a surface.
About the fact that Rhino already uses the laplacian smooth, then I guess what I would need is being able to smooth only a certain group of control points only along U or V and not the entire surface, do you think it is it possible?

yes, select the points and use the moveuvn tool

Great! I wasnât aware of this command, thanks a lot!
R

Yes.
PointsOn to turn on the control points of the object to be smoothed.
Select the control points to be smoothed.
Smooth command.

move uvn is really great- the scale setting is super helpful for doing really fine detailed stuffâŚ

And getting off the subject a bit, but always good to mention-
It also plays into the âDave Schultz curve offset hackâ

1 Like

The Smoothing part of the MoveUVN command is fundamentally different than the Smooth command, particularly for surfaces. Both are useful though one or the other may be more applicable depending on the task and desired result.

The Smooth part of the MoveUVN command moves selected control points in the normal direction by t towards the average location of the adjacent U or V control points. It does use the average of the control points in both the U and V directions. The user selects how far the control points move using a slider, and the move is made in one step. No smoothing in the tangential directions occurs.

The Smooth command moves control points in the direction the average of the coordinates of the surrounding control points. The surrounding control points of surfaces used for the average are in both the U and V directions. The size of the step and number of steps is selected by the user as a fraction of the distance from the location at the beginning of the step to the average coordinate(s) of the adjacent control points. Increasing the number of steps allows the smooth effect to diffuse. This method is similar to methods used for solving Laplaceâs equation, hence the name Laplacian.

The coordinates to be averaged are user selected and can be:

• X, Y and/or Z in the world coordinate system
• X, Y and/or Z in the CPlane coordinate system
• U, V and/or N in the Object (parameter) coordinate system (Note that X corresponds to U, Y corresponds to V and Z corresponds to N)

Experiment

3 Likes

This is not correct. First of all you donât need to create curves to create surfaces. I personally learned surface modeling from professionals hardly using curves. I usually start with surfaces 3x3 or 4x4 single span, move them to the rough location and increase degree/order on demand. I know this is not so common in Rhino, since its a bit limited by its tools but it works. You can use the point deviation analysis to measure deviation from the original shape and by moving cps directly or with the move uvn tool you can manually fit it quite well.

This is a common task in surface modeling and it would be odd if this wouldnât be possible.

The problem with smoothing is that its not only about relative locations of the cps, but also about where the surfaces and it cps are located on the shape. Having only a few is extremely important to smooth a surface.The curvature graph is a great to tool check the overall flow of a such a surface. If you see a infliction, waves or even stronger irrigation you surface is not smooth at all, even if you apply lapacian smooth a hundred times.

By the way, if you do surface modeling in car design, like I did for years, you nowadays almost always get a high resolution scan of shapes much more complicated then yours. Usually the scanned data is created by clay modelers, which need to be digitalized, improved and smoothed out. So I did these task really a hundred of times.

Latelly I had to work with shoe lasts, and the company that sent me the last models had only NURBS models with a lot of imperfections, so I was wondering what could have been the best way to improve them while being able to make the new surfaces as closeas possible to the original one, the thing here is that the parts of the shoe need to fit perfectly to the last, so if itâs not super accurate it wounât work.
Anyway thanks for the tips Iâll try manipulating a surface by moving the few control points instead of using curves!
R

You need a clear definition of who closely the shoe needs to match the last. âPerfectlyâ implies an exact match with zero deviation everywhere which probably cannot be achieved.

Make a copy of the model and try simplifying the model using RemoveKnot (not RemoveControlPoint) which will result in reducing the numbers of rows or columns of control points. Remove knots where the surface does not have any abrupt changes in shape and the see how much the surface has changed using PointDeviation. The reason using RemoveKnot instead of RemoveControlPoint is RemoveKnot will result in less change to the surface shape.

Rebuild can also be used to obtain a simplified surface but the result of Rebuild is a surface with an even distribution of knots and control points, which may not be satisfactory for surfaces with areas of rapid shape change.

After simplifying the surface use Patch with the Starting surface option and the simplified surface as the starting surface and the input mesh or curves as the source of points. This will pull the simplified surface to more closely match the input. Then move individual control points as needed to optimize the surface.

1 Like

Smooth can be effective on curves or surfaces with many control points which are ânoisyâ. I have not found it useful on curves or surfaces with few control points.

Sure, because having a only few cps almost always guarantee smoothness. There is a connection to it, so this is why any good model has only as few cps as required to reflect the shape.

Deviation is not deviation. If you get a deviation because of irregularites on the reference shape/scan, then its even required to diverge from the inital shape. Reversing its not about finding the perfect fit, its about balancing deviation with shape simplification (leading to good surface properties such as smooth curvature flows)

Deviation is deviation. Causes of deviation vary.

Depending on the use of the surface the appropriate tradeoff between smooth vs minimimizing deviation from the input data will vary. Surfacing scan data from a studio clay model is different than developing a surface model of an existing boat which will be used for technical analysis or to design parts to fit to.

Since the initial question was about how to âsmooth a surface without loosing the overall shapeâ,
I thought it might be helpful to share a perspective from a mesh processing world-

While Laplacian smoothing is good for removing little bumps and wobbles, it also causes shrinkage of the overall form. If many iterations are applied this effect can be significant.

One well known approach to mitigating this is Taubin smoothing - borrowing from signal processing and thinking of the smoothing or fairing as a low pass filter - treating the high frequency wobbles as noise and removing them, while trying to keep the larger frequencies which give it its overall shape.

Of course with NURBS, rebuilding or fitting a new surface with fewer control points will also remove some of the high frequency wobbles, and indeed maybe is a better way to go. It certainly makes it easier to make later changes to the shape while keeping it smooth. I just wanted to point out though that there are approaches possible to removing noise without changing the vertex count.

It seems you are also asking a different question about how to
âsmooth only a certain group of control points only along U or Vâ
Something I use in conjunction with the soap film goal in Kangaroo is a tangential only smoothing operator - there because I want to keep the mesh vertex distribution good without distorting the form. Essentially just calculate the vector for the Laplacian smoothing of each vertex, then remove the component in the surface normal direction. Perhaps something similar could be done for with NURBS.

4 Likes

True, but you would be surprised how good some clay models are. Iâve partially seen good surface model deviating only a 1/10 of a millimeter or even less at critical areas.
Anyway my point is that reversing a shape is easier, then smoothing out a very dense surface model. And in my experience, many parts can have much greater deviation. Of course it doesnât mean you can or should do the opposite. Its just the way I personally would approach such a problem.

This can be done for both surfaces, curves and meshes using the Smooth command. Select âObject coordinatesâ, âSmooth Xâ and âSmooth Yâ. When Object coordinates is selected X means U, Y means V and Z means normal.

3 Likes