Procedural NURBS along polygons

   8687   12   1
User Avatar
Member
52 posts
Joined: March 2008
Offline
How can I produce a NURBS geometry from polygons? What I have is a heavily distorted torus (actually, some walls might have holes, so complicating the topology but step by step) made by fusing metaballs. I then convert them into polygons to be able to cut out a cylindrical hole in the middle. I then want to have this (messy) geometry as well-organised NURBS. So, I thought I could intersect what I have with vertical radially positioned planes (or similar) generating points through which to draw my isoparm curves. I would then loft a surface through the curves, keeping it periodic in both directions. Keeping everything procedural, naturally.

How would I go about it? Does this sound feasible? Is this a good approach? I can make a couple of sketches if my description is unclear. Thank you very much for your advice!

Anna
User Avatar
Staff
3456 posts
Joined: July 2005
Offline
sounds ugly…I've never had any luck converting polys to NURBS…
so I always ask myself
- why do I need nurbs?
- can I get the topology I need with some other method?

can you post an eg file?
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
639 posts
Joined: July 2005
Offline
I am not sure if this is going to be an easy or clean process… under a fairly limited circumstances, you can convert poly to NURBS. In order to convert it, usually your polygon topology has to be VERY clean and everything in Quad face. So you might have to select area by area in order to convert them to patches if you have some slightly more complex model… again… if you need NURBS, you might as well try to model in NURBS… most of the time, the NURBS type geometry used in FX tend to be the simpler type.
User Avatar
Member
2199 posts
Joined: July 2005
Offline
I think the only way you'd do that in Houdini is to snap new nurbs curves to the surface you have and re-skin those into patches.

If you are just trying to smooth out the geometry you have there are better ways to go about it.
The trick is finding just the right hammer for every screw
User Avatar
Member
52 posts
Joined: March 2008
Offline
[postimage.org]

Thank you very much for the helpful answers (and patience)

No, of course not “convert”. I am aware that this cannot be clean. And, yes, I could rebuild this manually, in Houdini or elsewhere, but I would like to have a procedural solution so that I could produce variations by changing the parameters up the chain. I am actually not wedded to NURBS (but I think this is an interesting challenge because what I am trying to design here is a procedural-design workflow as much as an object) and my current model is actually smoothed (sub-ded) polygons but I would like to have cleaner and more rational output (this object is meant to be CAMed eventually).

This object needs to have straight, cylindrical inner surface, rounded transition edge and freeform outer surface. So, I was hoping that it might be possible to sample the outer part of the geometry at some regular intervals (I do not know, using ray casting, snapping with plane constraints or whatnot – this is where I am looking for advice). This would produce the points to draw the curves through. I would not care if the resulting NURBS surface is not absolutely precise. I could intersect these curves with the vertical curves distributed radially at equal intervals, fillet the intersections and get my profiles.

I am pretty sure I would be able to write a script for this, say in Maya or Rhino or elsewhere. So, I thought why not in Houdini (to which I am new but I hear what everyone says about the flexibility)? Obviously Maya and Rhino or engineering software do not provide metaballs and other parts of the workflow. Also, I like the visual programming approach and am interested to see how adaptable it is for my purposes…

Thanks again for your thoughts,

Anna
User Avatar
Member
2199 posts
Joined: July 2005
Offline
Well in that case, you could set up a path and sweep a bunch of grids along it then use those grids and your source in a cookie sop to generate a bunch of profiles and then convert those to nurbs curves using the fit sop, or resample them and then convert to nurbs curves, and finally skin them together.

However I think you would lose a bunch of detail in doing so.

If you can think of a way to script this in another package just write down the workflow and I'm pretty sure it could then be converted to a set of sops and assets.

If you get stuck converting the code to sops just post it up here and I'm sure we can help out.
The trick is finding just the right hammer for every screw
User Avatar
Member
52 posts
Joined: March 2008
Offline
Thanks. I shall give it a go…
User Avatar
Member
52 posts
Joined: March 2008
Offline
Excuse further basic questions but…

I’ve done what you advised and have some progress (thanks again) but I am only able to get a ruled surface. It seems the Resample SOP outputs polygonal curves and not NURBS. I can use the Fit SOP after to fit a NURBS curve but this kills the purpose of resampling by producing crazy numbers of randomly positioned control points. I must be missing something obvious. How can I resample my profiles to have the same number of points each and skin them into a periodic shape (topological torus) that is smooth (NURBS) in both directions?

Thank you for the advice…
User Avatar
Member
2199 posts
Joined: July 2005
Offline
Use the resample sop which will create resampled polygons with the number of points you want. Then skin the profiles together and set the output to be a mesh, by turning off output polys, then convert to a nurbs surface using the convert sop.

If you want neatly ruled surfaces work as much as possible with meshes and then convert to nurbs only as the final step. You can go back and forth between nurbs and meshes as long as you aren't using trim curves. To convert back to a mesh from a nurbs surface use the convert sop and turn on convert using hulls and set the convert type to mesh.

hope this helps.
The trick is finding just the right hammer for every screw
User Avatar
Member
52 posts
Joined: March 2008
Offline
Thank you for the advice.

I did as you advised and am getting the conversion but the resulting surface still does not have continuity through points and consists of rectilinear patches. So, my problem remains – how, in this scenario, can I get a surface that is smooth in both directions? Sorry if I am missing the obvious.
User Avatar
Member
52 posts
Joined: March 2008
Offline
I reduced the number of points and the surface became smooth. So, I increased it back again and it does look angled in the viewport and smooth in the render. So, I am guessing it is a LOD setting somewhere? Also, the output of my Skin SOP is all black. Is it something to do with the normals oriented inwards (my guess from previous experience but I did not find Flip Orientation or similar)? It becomes OK after Convert SOP, but only if I convert to NURBS - polygons remain pure black.

I guess I need to educate myself about the geometry types in Houdini. They seem to be somewhat different that in other packages. I am not sure what the differences are between Mesh and Polygon types. And then there are some I have never heard of before. Pasted Surface, for example…
User Avatar
Member
2199 posts
Joined: July 2005
Offline
Make sure you remove all point normals from your surface. Use an attribute sop and delete the N attribute. Mantra doesn't need the normals defined on the syrface as it will calculate its own from the surface.

LOD is set in the view port and defaults to 1. You can turn this up or down depending on performance of your graphics card.

When you convert a mesh to NURBs it should have a basis of 4 my default. You can change this with U and V order parameters. Turning it up will make the surface smoother with the loss of some detail. Turning it to 2 will make a hard edged surface much like the original mesh.

Mesh = ruled surface - ie regular number of rows and columns.
Polys are just polys as it any other package.

Pasted surface is one nurbs surface “glued” onto another to add detail.
The trick is finding just the right hammer for every screw
User Avatar
Member
52 posts
Joined: March 2008
Offline
Thanks, this helped…
  • Quick Links