Holes for mesh surfaces

@nokipaike: Nice and familiar to me, one thing that really stands out from this is the need for “holes” in mesh surfaces. We have this with 2D curves, any closed curve inside another closed curve is a hole by default. We really need this ability in mesh surfaces as a matter of urgency. I assume that as we already have this with curves, it is not going to be difficult, or time consuming to implement. Can we hear from the devs (maybe @mano-wii ?) on this matter please? It would be useful to get their impression of the work involved.

At the moment, we have to break up surfaces into parts with the hole straddling two faces, this is not good when you want to use wireframe modifiers to get a line drawing.

Cheers, Clock.

1 Like

task : Mesh support for n-gons with holes
https://developer.blender.org/T68888

on review: Blueprint tool
https://developer.blender.org/D5344

on review: Destructive Extrude Operator
https://developer.blender.org/D5336

1 Like

Man, that Destructive Extrude option has to get implemented. I absolutely fell in love with the feature back when I tried out ZBrush box modelling, which allowed you to make holes automatically when two meshes met. Please, please, please let it get accepted! :smile:

3 Likes

is already selected, only needs to be revised

Campbell Barton:
Added to T63731: Modeling Module to review for 2.81.

1 Like

Doesn’t look like that is going to happen any time soon… You can do this with 2D curves, what is so hard to do with planar surfaces?

Here is my brake disc - done with 2D curves:

All the objections to this and sculpting can be catered for with a simple note in the manual - “Don’t Try to Sculpt NGons with Holes in Them!” Or simply disable holed surfaces when sculpting - CAD people won’t want to sculpt these surfaces anyway and this is who this feature is aimed at.

Destructive Extrude looks good!

Cheers, Clock.

1 Like

Unfortunately - as the destructive extrude developer says in the task - his implementation does NOT allow to create holes or to go full along an edge and just dissolve the part you pushed in.

I love this feature from sketchup and always wanted it in Blender but if we get this particular implementation we won’t get the best part, the holes and full cutouts.

1 Like

Re: holes in mesh faces.

The original BMesh design allowed for these, and there is some code (“ifdef’d out”, meaning not compiled in) that caters for them. But it was never carried through, I think mainly to expedite launching BMesh.

As a mesh tools developer, I am of two minds about supporting holes.

On the pro side:

  • Clearly users want this.
  • It makes some algorithms easier to implement: it is a pain to deal with booleans or knife cuts that make a hole right now, because you have to arrange for 2 support edges to be added to connect the hole to the surrounding face. (However, this by itself doesn’t solve all the problems: Blender also doesn’t want vertices repeated in a face, so there are other funny cases that knife and boolean have to fix up with extra support edges anyway.)

On the con side:

  • A large amount of code, both inside Blender and in addons, has been written assuming that faces do not have holes. All of that code would not work (in the best case) or maybe crash (in the worst case) until updated to deal with holes. This is a pretty massive undertaking. The fact that you can do this with 2D curves is a proof that it can be done but doesn’t negate the fact that there is a massive amount of work to do to get this to work. And it is not easy to figure out everything that has to change: sometimes when one is developing an algorithm, one assumes certain “invariants” are true and writes code that is correct assuming those invariants hold. Developers are not great at documenting all such hidden invariant assumptions, so it may be a long difficult task to uncover all of the bugs that would be introduced by introducing holes.
  • Maybe there’s a performance or memory concern. At the very least, faces are likely to take at least 8 more bytes each in BMesh face (the way the ifdef’d-out code works). Maybe with careful attention the performance and memory effects could be very minimal, however.
  • Maybe this makes it harder to export to other 3d formats that don’t allow holes. Though one could always add the needed support edges on export, so this isn’t too big a deal.

I would estimate that it might be a 3 month full-time job to put holes properly into Blender’s BMesh and Mesh representations. Doable, but needs to be prioritized and balanced against other things that the developers could be doing.

10 Likes

Accepted! Is there a possible case for a new type of face that does support holes? Rather than try to get around all the work involved in sorting the whole structure out and debugging every possible scenario caused by allowing holes in every face available at the moment, could we not have a special case face that does permit holes, I am sort of thinking out loud here… This “holed” face is particularly useful to CAD applications and when trying to produce line drawings from a mesh.

One thing I have noticed is that if I create two faces with the hole straddling them, I cannot use wireframe mods as the connecting lines also show and I can find no way to avoid this. I am going to investigate whether I can combine 2D curves with other mesh object to achieve what I want and I’ll let you know how this goes!

Thanks for the reply!

Cheers, Clock.

2 Likes

Yes, a special new face type with holes would be one way of adding them (different from how the ifdef-out code imagined), and would likely be better from a performance and space point of view. It would also mostly if not entirely eliminate the possibility of existing code crashing.

But it would not much improve the time needed to implement things properly. All the code that processes faces would now have to be augmented with code that handles the ‘faces-with-holes’ too, or else those faces will not get processed – maybe leaving big gaps in mesh (the faces with holes might just disappear).

4 Likes

I thought as much, oh well, it was a good thought while it lasted…

So, I tried this:

The “Freestyle” needs some more work (I am not very good with this yet), but it has some promise. The top and bottom faces are 2D curves, so no interconnecting edges across the holes (yippeee!) and the depth is a simple edge extrusion. I will try to break this method now with a more complex model. This will give me a workaround and a technique I can develop.

Here is the model in 3D view:

Cheers, Clock.

1 Like

I will add that the main reason the 2d curves handle this fairly easily is that there are very few edit-like operations that happen on curves: face filling and extruding and edge beveling are about it, so it wasn’t too hard to make code that handles that. Whereas with general meshes, there are tons of editing operations that can happen on them.

2 Likes

if you read the comments of the task they discuss performance issues.

Thanks, I read the lot and I agree that it is a long task to implement this and fraught with danger to so much other code. My experiments with 2D curves are going well, they also make excellent 2D draughting tools when placed in top view and rendered white on white background with Freestyle lines added to the render. I will post an example tomorrow after my day’s flying (56 year old glider).

Salu, Clock.

1 Like

currently, creating this object with simple beziers, with holes and extruding the object …
after a mesh conversion, after merging doubled points, after selecting the sharp edges that I need …
if i want to make a bevel … here’s what i get …
simple holes become a long and tiring operation. :expressionless:

1 Like

See, I wouldn’t do it like that, I would do it like this:

The way you did it (the Blender Polygon Modeller’s way) produces absolutely s**t topology from a CAD point of view and is very hard to deal with. This is one of the things we have got to get over before Blender can be seen as a serious, accurate modeller, it just is not good enough at the moment, but with a little bit of development and some ideas from CAD people, it can be made to work!

I used standard Blender, Offset Edges and my own PDT tools. If we had holes in planar surfaces, it would be even better BTW.

Cheers, Clock. :grin:

EDIT:

I forgot to say this took me less than 5 minutes to make… :mechanical_arm:

5 Likes

I also see the same potential.
It takes only a minimum of will in this direction, and it seems that the road is starting to open up in this sense.

1 Like

Will be better ask for a better nurbs modeling support and import nurbs from cad software