algorithmic modeling for Rhino
The Holy Grail of NURBS design is conversion of easily manipulated and often Grasshopper created meshes into smooth and efficient polysurfaces instead of huge yet still ridiculously sharp-faceted polysurfaces. Geomagic Freeform Pro will do this for tens of thousands of dollars.
I have achieved this goal in Grasshopper by creating both a very fine re-mesh using Kangaroo MeshMachine also a crude yet curvature adaptive re-meshing that I take the *dual* of to afford mostly hexagons/pentagons whose outlines I then project onto the fine mesh, and I also use some random points inside each face to create several tiny little surface normal circles upon the mesh. This lets me use a short Python script to create patch surfaces using parallel processing that is 4X as fast on my four core CPU.
I also included a little Python script to access a brep join command that accepts tolerance so you don't have to tweak the main Rhino tolerance setting to get it to work.
When I updated my Python for Rhino 6 WIP, my Python patch script now crashes in Rhino 5, which is why I'm using Rhino 6 WIP and Grasshopper 1 but it should open in Grasshopper 0.9.X in Rhino 5. I'm not sure if a normal Rhino 5 Python set up will crash too much for other users with this script.
Tags:
Would it be possible to unroll these double curved patches to some sort of approximation?
This should be linked in FAQ because someone is always asking how to turn their mesh into a NURBS surface.
I think you're missing the point of mesh to nurbs conversion, that is reduction in amount of polygons (be it mesh or trimmed surfaces). Producing surfaces in a similar amount doesn't give you any advantage...
This is a standard mesh to nurbs conversion result: http://www.tsplines.com/j/subdtonurbs/MeshToNurbsBoatShell.png
You want to start with a proper mesh reparametrization:
http://www3.cs.stonybrook.edu/~gu/software/RiemannMapper/figures/ti...
Once you have your mesh reparametrized it's relatively easy to divide it into surfaces. That is the easiest approach but it doesn't take into account any features(creases etc)...
This illustrates a nice mesh parametrization with features.
https://www.graphics.rwth-aachen.de/media/paper_images/qgp_340.png
EDIT:
Got a brief look at the Geomagic thingy... seems like it's a subd modeler (like tsplines). Creating nurbs out of subd meshes is easy cause you can basically trace back the subdivision. With Giulios help I was able to make a rough version of that process here: http://www.grasshopper3d.com/forum/topics/skeletal-mesh?commentId=2...;
(the point is that subd meshes to nurbs are not as much challenging as mesh to nurbs).
Your last link, fixed:
http://www.grasshopper3d.com/forum/topics/skeletal-mesh?commentId=2...
Here is autosufacing output from Geomagic Freeform, before (manually set to 1700 faces) and after smoothing (then set to 800 faces) to remove original mesh facets, but oh boy, ZBrush ZRemesher then run through T-Splines smooth mode to give NURBS beats it by a mile:
The ZBrush/T-Splines workflow gave only 118 faces! Granted, it's smoother, but T-Splines has serious code in it to combine faces into bigger patches when converting to NURBS.
If I tell Geomagic Freeform to stick to 118 faces...it does work, actually, but you can tell how much direction smart ZBrush ZRemesher is due to its recent update:
If I use a much finer ZRemesher output for T-Splines, I still get only 162 faces, and retain a bit more detail:
These systems are relying on highly bent surfaces running along edges, whereas mine relies on smaller rather flat patches to adaptively capture such detail. That I rely on projecting points and curves onto a very fine version of the original mesh, means I cannot just increase my hexa/penta cell size, since the projection to the closest mesh point will be wrong in tight areas.
I could possibly combine three adjacent cells at a time and make a super-patch by using the same little circle guides but only the outline of all the cells in the group to cut the count to about a third, if I had a strategy to select them, with a few lone stragglers left ungrouped.
Python bug report about Rhino 5 crashes of my Python patch component after I installed Rhino 6 WIP, here:
http://www.grasshopper3d.com/forum/topics/python-crashing-in-rhino-...
I used Python to sort the mostly hexagonal patch outline curves and associated mesh surface little guide circles into interior curve removed clusters to make bigger patches at once. However the loss of simple hexagons meant I had to turn the patch UV spans up high, slowing it down and yet still leaving several failed patch trims. The higher span alone would ruin the larger patch advantage even if it didn't fail in giving a closed polysurface.
An entirely new strategy presented itself when I realized that any uniform triangular mesh such as MeshMachine produces can be directly converted to an all quad mesh without needing any of the face multiplying subdivisions that Weaverbird requires to create a quad mesh. Each edge becomes a diamond quad face.
I tweak it by then re-projecting the vertices onto a fine remeshed model to round out the flatness of the new vertices within the original mesh faces.
Though making little simple untrimmed NURBS surfaces out of these worked, there was much worse subtle little kinks between faces than my large patches showed, which was already a hassle.
This is a perfect mesh to now directly feed into T-Splines though, which can smooth out all kinks and convert to NURBS. It's not as efficient as ZBrush ZRemesher but it nicely leaves lots of little quads where there is high surface detail. It's still efficient enough to allow T-Splines soft selection editing too.
File uploading from Dropbox via iPhone failed the first time. Script still requires Weaverbird and Soapbox since I lacked the time to redo it in Python. It will always rely on Kangaroo 1 MeshMachine.
Nik, you need you own blog page on this site; these explorations are advance and priceless.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by