Jump to content

Smoothing NURBS Curves


Recommended Posts

Is there a setting that allows me to smooth NURBS curve facets?  The shape on the right is an extruded NURBS surface.  The same shape on the right was an extruded NURBS Surface.  The one on the left was made shape converted into a mesh and then a solid. Adjusting the 3d conversion resolution seems to have no effect on the appearance of the either shape.  

  5acbe1ed4fe4e_ScreenShot2018-04-09at5_53_58PM.thumb.png.f5eec3a0a7166dc7eadcc62d3a00349f.png5acbe1b401060_ScreenShot2018-04-09at5_54_10PM.thumb.png.c4e211154a87f40fdb9ebf692b697bfb.png

 

  • Like 1
Link to comment

I hope I am understanding your description correctly. If the one on the left (the faceted one) was converted to a mesh then the "facets" you are seeing are actually the polygons of the mesh. The amount of faceting would have been determined by the active 3D Conversion Resolution at the time of the conversion. Those facets were maintained when the object was converted back to a solid. There is no easy way to smooth the shape out again geometry wise. You may be able to improve the appearance by adjusting the Mesh Smoothing Angle of the render mode you are using.

 

I would avoid converting anything to a mesh unless there's a good reason to do so and set your 3d Conversion Resolution for the result you want prior to conversion. My example below shows the difference between converting at Low and High. If your goal was to create a generic solid from your original extrude I would do that conversion directly without using a mesh as an intermediate step.

 

The 3d Conversion Resolution is used for conversion operations (eg. extrude to mesh) and when calculating solids operations (Solid Additions, Solid Subtractions etc.). The 2d Conversion Resolution is used for when extrudes and other pieces of 3d geometry are created from curved 2d shapes.

 

NURBS curves and surfaces are inherently smooth geometry wise. They can appear facetted depending upon your render settings but the geometry remains smooth. For OpenGL for example, they may appear facetted at Low and Medium Detail settings. There is a rebuild command (Model>3d Power Pack>Rebuild NURBS). Note that once you extrude a NURBS surface it becomes a extrude or solid and is no longer a NURBS object. You can extract NURBS elements from it using the Extract Tool or by converting it to NURBS.

 

Kevin

 

5acc2a68978b1_ScreenShot2018-04-09at7_57_06PM.thumb.png.ae831095f7a0f6b9f3a3f762d89632f5.png

  • Like 3
Link to comment

I will try to rebuild the NURBS surface command. 

 

Actually, the NURBS appeared faceted when in fact the underlying geometry was smooth.  Here is the same surface before it was extruded. It is a true planar NURBS surface.  Model is close to the origin.   You can see the selection geometry was smooth but the Open GL representation is faceted.  Adjusting the 3d conversion resolution did not help much.  Is there another setting somewhere?

 

Untitled 1a.vwx

 

  5acc36d9b7c6c_ScreenShot2018-04-09at5_36_24PM.thumb.png.f282e572a710b581d94a452116a675d0.png5acc37b726002_ScreenShot2018-04-10at12_02_34AM.thumb.png.85c978854d750afa4a7013088c103619.png

Edited by cberg
Link to comment
8 minutes ago, cberg said:

Ok I see.  There is a setting in Open GL Options where you can adjust the detail.  I had mine set to low. 

^ that's the setting. Your NURBS surface only appears facetted because of the rendering preference, but its actual geometry is not. If you switch to Wireframe you'll see that its nice and smooth. I would recommend switching to Wireframe if you feel there's something not right with a piece of geometry. Wireframe will give you a clear indication of what the geometry looks like. Below is a Wireframe image of my example. You can see the faceting is clearly part of the geometry.

 

Kevin

 

5acc4194ef32a_ScreenShot2018-04-09at9_44_41PM.thumb.png.96722365481e4a65259bc5deebe8ef1e.png

 

Link to comment
  • 1 year later...

I am having similar issues, but can't seem to resolve it by changing any render settings.

 

The images below show a viewpoint above a viaduct that diverges into two branches. Each of the viaducts is generated using a nurbs curve (in an extrude along path).

 

In wireframe everything appears as it should - nice smooth curves, and the point where the two viaduct parapets converge (near the bottom right of the image) is correct - they join in line with each other.

 

However in OpenGL, they are heavily segmented and the meeting point appears well out of alignment as a result.

 

In hidden line, they are a bit better, but the same problems are there.

 

Is there any way I can improve this? Is it because my Nurbs curves have too few vertices (I want to keep them to a minimum to ensure smooth curves and for filesize)

 

2090637460_ScreenShot2019-11-27at13_07_25.thumb.jpg.e592a93931118ef8025d836f47b63e59.jpg1335467531_ScreenShot2019-11-27at13_07_10.thumb.jpg.a0a443e37a4b5f8bf872bc1e234e5cab.jpg1731759318_ScreenShot2019-11-27at13_07_40.thumb.jpg.42dfb2cadf7a74323ce8359b9e3311d8.jpg

Link to comment

You've built things in a similar way to how I would model that sort of shape. I think you've just hit upon a weakness in VW - it doesn't do large curves well. I've had this problem a lot with larger curved objects. I believe its directly related to how VW breaks curves down into segments for rendering. If the object is small, there's enough segments and it looks ok. As the curve gets larger, the segments get larger and it begins to look awful. Even when you turn the various conversion resolutions up, the segments still remain too large. I've attached an image showing what I mean.

 

621970159_ScreenShot2019-11-27at8_24_43AM.thumb.png.8f166e452e9913ae388eae1d585240b1.png

 

I'm not really sure what the solution is. Perhaps someone like @Matt Panzer knows a technical way around it.

 

Kevin

 

  • Like 1
Link to comment
  • Vectorworks, Inc Employee
1 hour ago, line-weight said:

I assume the 'large' is relative to drawing units? So it could potentially be improved by changing what my drawing units are?

 

I do not believe it has anything to do with units. I would say it's relative to the zoom level.  The closer you look, the larger the facets appear.

Link to comment
44 minutes ago, Matt Panzer said:

 

I do not believe it has anything to do with units. I would say it's relative to the zoom level.  The closer you look, the larger the facets appear.

I don't think that's true - the facets are the same size regardless of how far in or out I'm zoomed (at least, looking at it in OpenGL in VW2018)

 

edit - fiddling around, I think I see what you mean, regardless of the radius of a curve in units, the 'closer' you look at it the more obvious they are. There is a facet per x angular degrees of curve.

 

As @Kevin McAllister's diagram shows.

 

Strange thing is that pasting one of the objects into a new document seems to halve the facet angle. I don't understand why; I can't seem to find any settings that are different.

Edited by line-weight
Link to comment

An observation: if I draw a circle and zoom in (in OpenGL) there is a facet approximately every 5.5 degrees (image on left, orange line is the 'true' curve)

 

But if I chop that circle back, so it's an arc with a sweep of only 5.5 degrees, it's faceted into much smaller pieces (to the extent that you have to really zoom in to see it, image on right)

 

So it seems to be related to length of curve as well as radius (at least, as far as a circle is concerned, not sure the same applies to a NURBS path)

 

1796388933_ScreenShot2019-11-27at22_43_15.thumb.jpg.9f0a704343001309f8d00a28aa747eea.jpg335527331_ScreenShot2019-11-27at22_43_36.thumb.jpg.0fa50d62f8e4185f08790b3d315c378a.jpg

Link to comment

@Matt Panzer would it be fair to classify this as a bug?

 

Effectively it would seem that there is certain geometry that is unusable/undrawable in Vectorworks. It's not something obscure that I want to draw - just something with a gradual curve. It looks like the only way I can do it is to manually draw it as a series of short, straight segments, that are shorter than the smallest faceting I can get VW to do.

Link to comment

I’ve encountered similar problems with NURBS curves, (coincidently also trying to model a viaduct) selecting interpolated points mode I placed the NURBS curves through the alignment points I was given bu the client but the NURBS curves failed to pass through the points, it came close  but not through. Similar problem as described above where the curve was faceted, adjusting the degree and weight made little difference.

The way I managed to get something as close to acceptable as possible by creating the curve in another package and then importing in to Vectorworks.

What may help was a Marionette script I found on the forum that Marissa created for someone wanting to divide a a curve into segments which does a similar thing, this may help

 

 

Link to comment
15 minutes ago, axhake said:

I’ve encountered similar problems with NURBS curves, (coincidently also trying to model a viaduct) selecting interpolated points mode I placed the NURBS curves through the alignment points I was given bu the client but the NURBS curves failed to pass through the points, it came close  but not through. Similar problem as described above where the curve was faceted, adjusting the degree and weight made little difference.

The way I managed to get something as close to acceptable as possible by creating the curve in another package and then importing in to Vectorworks.

What may help was a Marionette script I found on the forum that Marissa created for someone wanting to divide a a curve into segments which does a similar thing, this may help

 

 

 

Thank you - I will have a look at that.

 

I too have come to the conclusion that I am going to have to draw the path as a segmented line. This can be done by changing the degree of the NURBS path (to create more vertices) and/or converting each vertice to a corner type. Unfortunately this then results in the EAP object becoming hollow, which means I can't then subtract from it (for example to make the arches through the viaduct). So I'm now looking into using a loft instead of an EAP.

Link to comment

Yep, went through the same process but gave up as results were not good, after several days of trying splashed out £200 and bought ProgeCAD, took about 10 minutes to do it and import in to Vectorworks.
The amount of time I spent trying to get a smooth result out weighed the cost of something that worked.

 

Link to comment
2 minutes ago, axhake said:

Yep, went through the same process but gave up as results were not good, after several days of trying splashed out £200 and bought ProgeCAD, took about 10 minutes to do it and import in to Vectorworks.
The amount of time I spent trying to get a smooth result out weighed the cost of something that worked.

 

 

Was the object you imported a genuinely curved geometry or was it segmented?

Link to comment
25 minutes ago, axhake said:

I did some time ago do a comparison of the lack of accuracy relating to the faceting problem with curves, I compared the results from Vectorwork, AutoCAD, ArchiCAD and Microstation and found the results interesting which does pose a problem when trying to work with others

 

That's interesting - although, I think it is a parallel problem to the faceting problem - the geometry of the underlying curve could be 100% correct but the faceting problem still exist, I think?

 

Did you ever get a response from VW on that?

 

I have raised other questions to do with these kinds of curves, for example here specifically to do with NURBS curves:

 

 

 

I also spent some time setting out the issue but there was no response from VW at all.

Edited by line-weight
Link to comment

No, raised it as a potential but but never heard back from anyone.

Agreed; In you screen shot above the orange line shows the true geometry of the curve but the VGM is simplifying the curve by faceting it.
Had a similar problem many years ago with Bentley MX Rail, doing rail alignment, all curves were displayed as faceted, took several weeks for someone to find out there was a check box within the application to enable curve fitting which once checked produced nice smooth curves, unfortunately it doesn't look like Vectorworks has this capability.

 

But as I found without having a curve pass through the points as intended you will always end up with something that is an approximation and not what I needed to work with other design teams, when I passed some sections over to them they did not match the sections they created, slightly out each time due to the faceting problem.

  • Like 1
Link to comment

That is very poor that there was no follow-up from VW, after you put the effort in to do those tests and explain the results.

 

I think the conclusion for now has to be that VW is simply not capable if you want to deal accurately with complex curved geometry.

 

I'm going to have to rebuild most of my viaducts using segmented paths. Thanks for posting the Marionette link above, that will at least make it a bit less messy and tedious than it would be otherwise.

  • Like 1
Link to comment
  • Vectorworks, Inc Employee
6 hours ago, line-weight said:

@Matt Panzer would it be fair to classify this as a bug?

 

Effectively it would seem that there is certain geometry that is unusable/undrawable in Vectorworks. It's not something obscure that I want to draw - just something with a gradual curve. It looks like the only way I can do it is to manually draw it as a series of short, straight segments, that are shorter than the smallest faceting I can get VW to do.


It could be considered a bug, but it may be a technical limitation or simply a performance limitation.

Can you send me a file with a few of you most problematic objects in it?

I’d like to see if I can come up with anything that may help and, more importantly, I’d like to submit a bug with the file. While it may require a lot more than a bug fix, it’s worth a shot.  In any case, it will get more eyes on the issue.

  • Like 2
Link to comment
52 minutes ago, Matt Panzer said:


It could be considered a bug, but it may be a technical limitation or simply a performance limitation.

Can you send me a file with a few of you most problematic objects in it?

I’d like to see if I can come up with anything that may help and, more importantly, I’d like to submit a bug with the file. While it may require a lot more than a bug fix, it’s worth a shot.  In any case, it will get more eyes on the issue.

 

Thank you. I've attached an example file.

If you look at the sheet layer I've tried to make obvious the issues.

facetingproblems.vwx

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...