Rhino 7 Subdivision Surface Project

Thanks for the update Brian.

I’m personally hoping Sub-D will be able to replace T-splines for me in the future and symmetry planes in T-splines are one of my MUST HAVE tools. My day to day work involves creation of 4 quadrant objects and Tsplines ability to produce smooth transitions across symmetry planes changed the game for me from the start.

Cheers

DK

2 Likes

Can anyone point me to some sources on the mathematics behind “evaluating the limit surface” ? I mean is there a way to directly compute the limit NURBS surface without doing the sub-d step by step ?

For starters, read the Exact evaluation section of https://en.wikipedia.org/wiki/Catmull–Clark_subdivision_surface and then read Jos Stam’s paper https://docs.google.com/viewer?url=http%3A%2F%2Fwww.dgp.toronto.edu%2Fpeople%2Fstam%2Freality%2FResearch%2Fpdf%2Fsig98.pdf

Thanks !

Hi all, does anyone know if it is possible to reverse engineer the original control polygon from a sub-divided mesh? Someone has sent me a smooth mesh that was generated in Maya; I’m looking to get back to the control polygon so I can turn this into Rhino Sub-D surfaces and then into NURBS so I can work with surfaces, rather than the mesh. I could use the smooth mesh to create a sub-d surface, but the result is extremely heavy.
Cheers,
Steven

Hi, Steven,

Yes it it possible to “undivide”. Ideally, you need to know what type of subdivision occurred. If you’re looking at a mesh that you know has been subdivided, then there are two standard suspects. If the faces are all quads and nearly all vertices have 4 edges, then something like a Catmull-Clark quad scheme is likely. If the faces are all triangles and nearly all vertices have 6 edges, then something like a Loop-Warren triangular scheme is likely.

Currently there is no tool in Rhino WIP to automatically “undivide”. It’s not hard to automate and I’ve added issue RH-52279 to our SubD todo list. If you want to post your mesh, I’ll add it to the issue as a test case.

As of today, this work is not scheduled to occur for the initial release of Rhino 7. Depending on customer needs and feedback, our priorities are subject to change. (You guys pay the bills, so we like to do stuff that makes you happy.)

Technical details for the interested reader:

It is possible to mix subdivision algorithms and perform other control net modifications between subdivision steps. “Reverse engineering” these types of steps is challenging. My speculation is these techniques are not all that common. The blather below assumes we are dealing with a mesh that was the result of applying the same subdivision algorithm several times.

You want to work back one level at a time. If you know how many times the original was subdivided, that’s helpful because the level1 -> level0 step has to consider introducing n-gons where n is an atypical face edge count. Later subdivision steps only involve the native facet (quads or triangles).

At each level, the key step is to identify which current level vertices are descendants of previous level vertices. Next, and much easier, is to identify the current vertices that are descendants of edges from the previous level. After this using the topology of the current level, previous faces are easy to pick out.

If you’re looking at a quad mesh:

Ordinary interior vertices have 4 edges. Any interior vertex with N edges where N != 4 was either a vertex in the original mesh or a level 1 vertex at the center of a level 0 N-gon.

Ordinary boundary vertices have 3 edges (2 creases and an interior edge). Any boundary vertex that doesn’t look like is a descendant from a level 0 vertex.

In areas of regular quads, look at the 4x4 patches. In general there are four possibilities for where the previous level’s vertices were located. These shown in the image below

Typically clues from extraordinary vertex locations, boundaries, (interior creases, if that information can be gleaned), and neighboring regions that have been solved, will quickly eliminate some of these possibilities. After that, you try what’s left and see if you can get a consistent result.

Once you’ve decided which vertices came from the previous level, you choose a subdivision algorithm, build a linear system with the locations of the previous vertices as unknowns, and solve that system. (This is not rocket science, but you would want to automate this step. :slight_smile: The algorithm and formulae that Rhino SubD uses are described in detail in the Rhino SubD Subdivision Rules document. The vertex subdivision formulae would be the ones you would use to build the linear system.

– Dale Lear

3 Likes

I made a reverse Catmull-Clark script a while back. For closed meshes without any valence 3 vertices it can recover the starting mesh exactly - shown here the forward and reverse CC steps


Valence 3 vertices need a special treatment, and so far I only solved these approximately, so it will recover the topology, but not the exact geometry around these vertices:

I didn’t get it working for open meshes at all yet, but maybe with a little more work. If you want to send me a file to test it on I’ll give it a go.

4 Likes

Just an idea, isn’t a sub-d all new faces, so reversing the face list you could in theory check them for the matching vertex (the new center vertex) and figure out if it is a tri or quad that the faces belong to and then move on?

Also - if it is just the topology you need, I have something using a different approach that will work on open or closed quad meshes, even if they are not strictly Catmull-Clark type.


As you can see though - because the vertices of the recovered coarse quad layout are not repositioned with this technique, if you re-subdivide it, the result shrinks compared to the input.
@Holo - I’m not sure I follow - I thought we were talking about Steven’s case where we don’t have the original control polygon

1 Like

We were, I just imagine that when rs.CoerceMesh( subDmesh ) then the faces would be in the order they were generated and therefore possible to regenerate… BUT that would not work well if other mesh tools were used to generate new faces though. So maybe not a good path to follow for anything other than on unedited subdivided objects.

That’s interesting, but it appears the creasing is either ON (sharp) or OFF (smooth). What really makes any good SubD workflow sing is the ability to control the amount of “sharpness” of the crease.

TSplines takes the On/Off approach as well, so you need to add loops to control the sharpness, leading to cages that can be hard to maipulate. Contrast this to Modo which uses Pixar SubDs and gives a level of edge sharpness control without added loops. But the best one (and most relevant to a NURBS system) is what Creo Freestyle uses.

Honestly I don’t get PTC. When we first looked at Creo we sat through the session watching the reseller recreate one of our technical validation models. He recreted a form in 2 mins using a handful of control cages that took us a half a day in TSplines to get right - all because of the ability to control the edge sharpness of the crease.

I’m sure you have looked at how Creo Freestyle does it but if not, you need to!

2 Likes

Thanks for taking the time to do some of the heavy lifting (advocacy) towards Rhino SubD excellence.

1 Like

Thanks all for the responses; looks like it’s doable, just has a lot of edge cases that need considering. I’ll also have to see if I’m allowed to post the mesh or part of it as its not mine to share.
Cheers,
Steven

SubD tools def speed up modeling certain organic shapes:

a few features that would make great addition:

-Toggle between SubD & mesh

-Creasing with gradient/falloff over single or multiple edges
(to get something like below without altering edge flow)

subD2

7 Likes

That right there is crucial!
+1

Great work, cool to see!

3 Likes

Toggle!

Once forms become complex watertight conglomerates, and during the process of getting there, the ability to “toggle” is critical; at least with the way T-Splines works. I don’t know if the Rhino implementation in intended to be fundamentally different?

One reason is that topology needs to managed and massaged. Once complexity rises, often the only sane method of management is box mode, and the only sane method of verification is the rapid toggle process. One learns to ‘read’ box…

1 Like

The ability to “toggle” the display mode between showing the surface or showing the control net is in the Rhino bug system as RH-53220

7 Likes

@dalelear Is the ability to ‘freeze’ (lock) areas of a SubD form in the development pipeline? Apologies in advance if the feature has been covered: A quick scan of the forum and the Rhino SubD doc did not uncover such for me, unless I simply missed? (Lots of unrelated “freeze/lock” hits.)

A ‘freeze’ feature is highly effective in pursuit of complex forms. It’s the inverse of designer’s ability to create exactly what he/she wants: not breaking what is already deemed complete or fixed while continuing to modify adjacent areas. Freeze along with Match (to nurbs) is powerful.

Feature detailed here:

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-3D3FD0DD-1061-47C2-9691-2118DA883B68

The information this feature would need is built into the core SubD object. Currently there is no user interface access to this feature. Ideally it would work the same way on SubD, Brep, Mesh, PointCloud objects.

This request is in our issue tracking system as RH-53277

Cool! Thank you, Dale. Appreciated!!!

In RH-53277 you end with - “This is probably not needed for the Minimum Viable SubD release” - an opinion I do not seek to directly dispute. Clearly, it’s a matter of realities, priorities and prudent sequential delivery of useful features.

However, I would like to point out that: unless one is a ‘blob’ designer, most SubD creations do not live in a vacuum. They exist in concert with nurbs. Match (to nurbs) Pull (to nurbs) and Freeze are critical towards the development of typical manufactured parts. In the hands of a skilled operator, SubD can be utilized beyond concept modeling. Been there, done that, though extremely difficult (impossible?) without such tools, IMO.

Rhino SubD will get there eventually I’m sure, and my gut tells me it’s going to be great in the aggregate.

1 Like