GSoC 2018 - Bevel Improvements

I absolutely love many of the changes to bevel so far. I came in here to post about the connecting edges for outer miter arcs, but billrey beat me to it, and the changes are already in and working great!

Sometimes I feel like I’m some weirdo who uses Segment: 2 Profile: 1.0 bevels and nobody else does. I have a minor suggestion for improving the outer miter, but I’m not sure if it’s viable to do, since it’s fairly specific to this case.

If that last edge were joined up in my gif, you would retain all quads. But this is specific to segments = 2, so I’m not sure how viable it is to implement.

EDIT: Kio’s post below suggests an easy solution to this, but reading further, I think that the extra edge for the sake of quads is likely to break curvature in many circumstances, and might not be desirable after all.

4 Likes

I think this would only be possible with an extra ‘quadify’ or ‘connect’ modifier. Which, to be clear: I would really love to see!

1 Like

One thing I would love on the bevel is a merge option, or a merge modifier.

3 Likes

that (remove doubles) would be really useful, and it could live along edgesplit

1 Like

you can force that topology by adding an extra edge like this:

I wanted to give some more points to discuss about the bevel modifier in regards to subdivision surfaces modelling. For this I grabbed some random mesh from work which shows some of the issues we encounter regularily. Think of some bent hard surface model, with clean shading and uniform edge quality - just to give some contrast to the 90° planar technical models some people also do.

The original mesh was created in max with quad chamfer, but as it does not create perfect topology in all cases either it has been a bit optimized for better shading.

I took said mesh and removed the control loops, and added weights for for bevel modifier in blender to see how it turns out. It does not match 100% but i think its close enought to see some points. :slight_smile:

I used arc for outer miter and sharp for inner, 1.0 profile with 2 segments and a subsurface modifier with 2 subdivisions.

Case 1:

Over all its pretty close, but looking closer there appear some shading issues at the outer corners of the inset part. Arc mitter works great on A, but it does not really work on B - the surface gets bulgy because it adds quite some open edges. The original uses sharp miter here which shade just fine.

Case 2:


Here we see two outer miter corners, while A kinda works the shading in B is really not nice. Even if I force the same topology as seen on A onto B its not as great as the original.

So the gist of it is, that it seems like it might be worth a second thought if it should be possible to define miter type per edge somehow. I dont know if this is technically feasible or even implementable without spending too much hours…

thanks for reading.

4 Likes

Zuorion - OK, I understand what you mean but he Shift jump. I had forgotten the Shift key handling in modal bevel, as I don’t use it myself, even though I coded this a long time ago. It’s tricky to get the code right to handle transitions between the different value modes, and I seem to have a bug here.

Yes, I should add spread and loop slide to things that you can control with keys.

As to the property values settings and parameters for keymap - I’m not sure how to do that right now.

Rekov and michealknubben - yeah, some kind of ‘keep quads after bevel’ has been an oft-requested feature. In the example you show, that connection edge makes sense if the original face there was a nice convex quad, but maybe not in other cases. Anyway, such things could be added but it is a bunch more programming and there are other things on my TODO list (see earlier in this long thread).

Wazou: the next major thing that I will do to Bevel is make it merge properly. This is a long, hard task. (People might be interested in the “Inset Straight Skeleton” addon, used to be “Inset Polygon” addon, that I just ported to 2.8. It does collisions and merging, but only works on planar or near planar faces or groups of faces. And it doesn’t quite work in all cases – the special cases get very hairy here.) But will likely do better Booleans before tackling this work on Bevel, as Booleans are more urgently sort-of-broken right now (since Carve went away).

kio: Interesting examples; thanks for writing them up. I feel a little lost about what to do about it, though. I must admit that while I added these new mitering options because people said that they were better for subdivision, I was not really sure why. And your examples show that it is not necessarily the case. There is some subtle art/math involved in figuring out what geometry is going to yield the desired subd results, and I am far from understanding that.

As you suspect, it would not be easy to allow per-edge miter choices. The problem is almost entirely a UI problem, however – internally, the code could handle it just fine. And while I could probably figure out a UI to allow this spec on a per-edge basis for the Bevel Tool, the real problem comes with how to specify it for the modifier. I’m open to ideas here. But again, this is not going to be on the top of my TODO list, probably.

Another approach would be to try to figure out an “auto” mode for choosing the miter type. If there’s some rule we could figure out about when one type of miter would be better than another, then it would be easy to implement such a rule in the modifier and tool. But I have no idea what such a rule would be. Your examples in this post show that it is not easy, because I don’t see what the differing feature is between cases where we got good results vs cases where we got bulges. Any reader of this thread have any ideas here?

5 Likes

Howard T - The mitering options are definitely an improvement for subdivision surface, and one example of where you can see this is this bug I reported a while back. The outer miter option seems to have solved this issue when set to arc. I made a little gif to demo the results. Bevel by weight with Profile 1.0 and 2 Segments.

Unfortunately, I don’t think the current patch miter geometry is ideal. In the picture below, the red ones are the result of setting the outer miter to patch. The grey is what I did by hand, and the latter mesh still yields the best result over all, also better than outer miter: arc.

2 Likes

We need a triangulate on Ngons ^^

3 Likes

I also ran through all of the miter combinations in the somewhat unique Profile 1.0 case. As you can see, none of the Inner Miter options other than ‘Sharp’ produce useful results. If you are specifically interested in using bevels to create supporting geometry for subdivision, only Outer: Arc, Inner: Sharp currently produces a useful result.

I would just add that Outer: Patch, Inner: Sharp could produce a useful result if it were changed to match the example I posted just above.

2 Likes

It’s because you cannot add subsurf on ngons!

If you want something correct, you need correct mesh with no Ngons.

On Juri’s build, there is a modification on the triangulate modifier to triangulate only Ngons, with it, you can have proper subsurf even if the wire isn’t perfect.

3 Likes

Wazou - You can in fact add subsurf to n-gons, and you actually used one of the cases where it works. Look at my gif above. Look at option No. 1 below. That is the best case scenario that you can currently get out of the bevel modifier without needing to do any additional work.

Of the three options below, only option No. 1 can be created by the bevel modifier. I think the Outer Miter: Patch should be changed to reflect option No. 2, which is better than option No. 1. But currently bevel does not give this. And option No. 3 is better, but it requires manually adding additional geometry, which in this case was not simple, because none of those surfaces are planar. They are all curved, and adding that geometry such that it did not break the curve was tedious and time-consuming.

1 Like

I mean, you need to add lines, in your example, it’s ok on this mesh, not on other like a hole in a cube or else. That really depends on the mesh.

Option 1 is great to work with subdiv, you don’t want options 2 because the wire will not be correct.

Keeping Ngons on a mesh with subsurf is a bad workflow IMO.

This is correct and easy to clean.

1 Like

Those additional red lines you’ve added absolutely break curvature, and are not viable options. If you absolutely want all quads, the best version of that looks like this. It’s not quite the same as your edited example with yellow lines, but the topology is the same at least.

But again the point of this discussion is in trying to come up with a bevel modifier that produces useful results. And frankly having tested every possible combination of these things on this mesh, I still think option 2 looks better than option 1, and you don’t have to add additional geometry to either to get them to look alright, even with n-gons. Here is the blend if you want to play around with it yourself.

1 Like

I understand your point of view :wink:

Sadly it doesn’t work on every possibilities, that’s why I would prefer to have a triangulate on Ngons as I explain on my video.
But yes, having more possibilities is always great!

How do you enable that floating status info thingy? It seems great to have all that info right there, instead of looking for it in the UI.

Wazou - The good news for you is that the behavior you want already seems to be implemented. Set your bevel to Profile 1.0, Segments 2, Outer Miter: Arc, Inner Miter: Sharp. You just have to triangulate your base mesh as I show here in order to end up with the all quads result:

I would like to hear what people thing comparing the current result of the bevel modifier to the one that I manually corrected. Is the ‘Better?’ version actually better? The edges follow their original lines much more closely, at least.

3 Likes

Thanks for your reply.

The current state is already very usable, and to be fair I did not check if some of these issues could be addressed with other tools like creases. My feeling is that with a bit of mix and match of bevel, creases and shrink wrap most of these issues can be solved some way.

Interesting to hear that it’s more of an UI/UX problem, and even if I only thought briefly about it I would agree that it’s not very clear how to do it.

your to-do list sounds very reasonable to me, all those things are more important than to dive deeper into this specific thing…

1 Like

Your version is better IMO.

1 Like

https://developer.blender.org/D4367
Someone did that a few days ago. It’s waiting for review.

3 Likes

Can someone explain to me “mark seams” and “mark sharp” options? when i’m trying to use them nothing happens. For example. Default cube > Add bevel modifier > mark seams > apply bevel mod> enter edit mode and nothing is marked. Am i missing something?

1 Like