Some thoughts on a NURBS to Poly workflow with MoI

 From:  Keris
3196.8 
Another process came to me while doing thought experiments about better ways to mesh out NURBS into subdivision-friendly polygons. This system is simple in concept but probably costly in backend execution. But I shall present it so that you can see what you will of it.

The goal of this method is to produce as many continuous quads as possible. To do that, the first step is to walk each visible edge (the ones that MoI is showing us), plopping down a vertex where the angle setting, using the divide larger and avoid smaller as upper and lower bounds it tries to honor, says it should put one. Do this for every edge first.

Next, compare the edges of each NURB patch that are parallel (the ones that poly edges will cross to join). Now, to make sure we keep an even count, if the two sides aren’t equal, one will need to be re-interpolated to match the other. A setting could toggle if we should go up or down; although I think that as things become more complex in iterations, some logic would probably help to choose which might be best in certain cases (thus making the option a bias toward a behavior and not strict). Now just walk through the model, evening up the count (very time consuming …)

Next, once each side is equal, check where each vertex lies compared to the underlying UV isoparams. The ratio between two UVs aren’t likely to be the exact same on both sides, thus the resulting poly line will follow a path that interpolates between them. Just run the lines across all the surfaces, letting the crossing lines meet up on the UV surface where they will. You could add some code to try to maintain some uniformity or specific aspect ratio throughout, but beyond the current option this service can be done after the fact in most poly modelers.

Now, of course, this method isn’t perfect. Following the above logic will have it utterly fail once it reaches any sort of interior trim. It can try to get around this by just ignoring the trim at first and meshing the trimmed part as above. Then, if the bias is set to “go lower,” it will mesh the interior part by trying to maintain as many edge points as the geometry above already has (like the usual guide for making holes in sub-d surfaces). If the bias is set to “go higher,” then the hole will cause the surface it’s cut into to be re-interpolated to contain the additional points. Thus doing the cross edge fitting on interior trimmed surfaces first is the best course of action.

Another failure is end cap trims. All of their natural sides are trimmed off, and unless it’s a quad trim (and thus probably should just be a damn quad without a trim), you don’t really have the nice four edges to maintain a good quad setup. In fact, in things like circle caps, you could have a whole mess of other NURBS patches terminating along it. As such, they’d need to be special cased into “known quantities” that can be meshed similarly each time. Circles and ellipses are pretty easy (each point on its edge collapses to the center. In fact, most any regular polygon besides the square can be treated like this and the effect isn’t so bad (although even sided items could be meshed across to the opposite face, but that would create a whole mess of tris). Much anything beyond that, though, is way too complex to automate. Leaving it as it is now in the N-gon mode is probably sufficient.

Now, I don’t claim this to be a silver bullet. It might not even turn out to be practical. But it’s an idea to kick around. Of course, this assumes you have enough access to the meshing system to actually make this sort of thing possible.