Page MenuHome

Join Triangles Modifier
Needs ReviewPublic

Authored by Ish Bosamiya (ish_bosamiya) on Mar 16 2019, 2:32 PM.
Tokens
"Love" token, awarded by helloidonthaveanyideaformyusername."Love" token, awarded by fiendish55."Love" token, awarded by Dheim."Love" token, awarded by Dspazio."Love" token, awarded by erickblender."Love" token, awarded by jorsh."Like" token, awarded by leha."Love" token, awarded by juri3d."Love" token, awarded by wissammax."Love" token, awarded by marcog."Love" token, awarded by lopoIsaac."Like" token, awarded by dbystedt."Love" token, awarded by davidmcsween."Like" token, awarded by MrJomo.

Details

Summary

The commit ports the join triangles operator to a mesh tool which is then used by modifier to perform the required joining of the triangles to form quads based on the different parameters.
This modifier has been a requested for a long time now, mainly by animators.
For those doing procedural modeling, often triangulated meshes are generated but for further modeling, it must be converted to quads which meant having to apply all the modifiers before proceeding, this modifier helps them continue to have a fully procedural mesh.

Diff Detail

Repository
rB Blender
Branch
quadify_modifier (branched from master)
Build Status
Buildable 3139
Build 3139: arc lint + arc unit

Event Timeline

This is a short video showing the functionality of the modifier.

If this is used in animations the tri to quad conversion will 'pop' on deformation.

Can you point to where this was requested? Were example use cases given?

If this is used in animations the tri to quad conversion will 'pop' on deformation.
Can you point to where this was requested? Were example use cases given?

Non destructive mesh editing is always welcome, Blender lacks a lot of this kind of modifiers.
I would personally use this on 3rd party imported OBJ and FBX since they are often triangulated, and mix with other modifiers to suits my needs.

  • non destructive, you can go always back and adjust it, remove it or whatever, unlike edit mode method.
  • interactive settings and you see what you get
  • can be combined with other modifiers to get as sort of "procedural" meshes
  • can be applied on multiple meshes with few clicks without Edit mode->run tris to quads->adjust parameters until you're super sure it's correct, otherwise you will lose the ability to adjust it until the undo limit is reached.

How can you not see how is this useful? :)
I'll never understand why devs are always so reluctant about this kind of addition

Thank you Ish for your hard work!

This modifier can be very useful after Decimate modifier to get clean quadrangular topology similar to ZB Remesher or InstantMeshes. Even more so if you have ClothSim or Multires modifiers that you do not want to collapse before everything is approved by client while you need to test with lowpoly asset (it would be nightmare to retopologize cloth manually many times). Another useful area is when working with booleans (e.g cylinder cutting a box ) where after many booleans in mod stack ngeons should be eliminated ( game assets such as guns/hard surface, buildings(booleans for doors, windows) etc). There are many other user cases, it's definitely great to have. Subjectively I would prefer Triangulate modifier with Quad-triangulation option or Decimate with checkbox "keep quads", but I may not be seeing many possibilities as this modifier does come with many useful options.

Just a note/request: In ideal case UVs should not be affected and edges with Seams should be ignored.

If this is used in animations the tri to quad conversion will 'pop' on deformation.
Can you point to where this was requested? Were example use cases given?

+1 with the guys, all this little stuff are really useful for modeling.
Keeping everything editable is really important.

It's like a merge modifier we talked about last time.
Example of how it is useful
https://youtu.be/PvIpxabeWQI?t=288

Or the triangulate on Ngons, this is just an option to add to the triangulate modifier and it would help a lot!!!!!!

If this is used in animations the tri to quad conversion will 'pop' on deformation.
Can you point to where this was requested? Were example use cases given?

I didn't try it yet but it seems like it will speed up retopo process , just a note retopo is the most time consuming in character design in Blender.

+1 Great work... I hope to see this make the cut.

If this is used in animations the tri to quad conversion will 'pop' on deformation.

Yes that would be a problem if this modifier was placed after the armature modifier. I personally would use it while importing game assets which are generally triangulated but you want to see the cleaner geometry while animating them, but don't want to retriangulate during export because that could lead to a different triangulation as compared to the original model.

Can you point to where this was requested? Were example use cases given?

It was actually as a comment over at right click select.
I was working on a side limit for the triangulate modifier and came across this comment. Although I couldn't find any other places where it had been requested, I thought that it would be useful for game development as well as procedural modeling and proceeded to make it happen (also felt like a good challenge to get to know the Blender code better).
There were no example use cases given then but, now there seems to be an abundance on this thread. A lot of people of the community want to see this modifier in the master branch, please take a look at the overwhelming positive response on a tweet I made about it.

Or the triangulate on Ngons, this is just an option to add to the triangulate modifier and it would help a lot!!!!!!

Take a look at this patch I submitted sometime back, I hope this is what you are referring to.
It has been accepted but has not yet landed in the master branch.

If this is used in animations the tri to quad conversion will 'pop' on deformation.
Can you point to where this was requested? Were example use cases given?

Why does it have to be useful in animation, why can't we users have more ways to just model various pieces of content non-destructively (like a remove-doubles modifier which would be useful with boolean operations)?

Don't forget that before a character or object can be animated, it has to be modeled. The problem modifiers can always be applied so you have a workable mesh for a shot. We should also not forget that Blender is used by far more than animators.

How feasible is it to add a tick box to stop re-evaluating the base
mesh after the evaluated mesh has been generated and cached,
that way the modifier can still work with animation without beeing applied?

On a side note as I understand you don't want to add small modifiers
for small operation that are rarely used and will only pollute
the interface and that is the objection to remove doubles modifier

Is it possible to add a utility modifier that basically have multiple
small operations including remover doubles with tick box's to enable
or disable each of them ?

If this is used in animations the tri to quad conversion will 'pop' on deformation.
Can you point to where this was requested? Were example use cases given?

Why does it have to be useful in animation, why can't we users have more ways to just model various pieces of content non-destructively (like a remove-doubles modifier which would be useful with boolean operations)?

This was in response to the diff submission which states:

This modifier has been a requested for a long time now, mainly by animators.

How feasible is it to add a tick box to stop re-evaluating the base
mesh after the evaluated mesh has been generated and cached,
that way the modifier can still work with animation without beeing applied?

I am not too sure about the caching, @Campbell Barton (campbellbarton) can weigh in on this. But the modifier need not be applied even while animating when the join triangles modifier is evaluated before the armature modifier.

Is it possible to add a utility modifier that basically have multiple
small operations including remover doubles with tick box's to enable
or disable each of them ?

Maybe, but since Blender is going to have everything nodes, I think it would make more sense to have separate modifiers for all the individual operators.

  • add vertex group support

Before getting into code review or looking into details I'd like to see example uses cases for this modifier.

Otherwise we could:

  • Postpone until nodal modifiers are supported.
  • Make this an optional post-process for the decimate modifier.

All BMesh operators _could_ be made into modifiers, however the modifier system isn't designed for constructive modelling (at least not with many fine grained operations).

Before getting into code review or looking into details I'd like to see example uses cases for this modifier.
Otherwise we could:

  • Postpone until nodal modifiers are supported.
  • Make this an optional post-process for the decimate modifier. -----

All BMesh operators _could_ be made into modifiers, however the modifier system isn't designed for constructive modelling (at least not with many fine grained operations).

The modifier system is quite well for performing nondestructive operations. Though the stack is cluttered quite fast if you have many modifiers. But this is more a UI/UX problem imho.
Nodes surely can handle more operations UI-wise (and can be nested via groups) but even there you have to take care to avoid an excessive "noodle salad".
If "isn't designed for" means there is slow performance, I dont also understand how a layer of nodes above them should increase the performance ?
On the other hand, adding it as mode for the decimate modifier could work (why only as post process ?)
The functionality seems useful enough for itself, according to the many user comments above.

Modifier nodes are planned, I'd rather postpone this modifier until the new system is implemented.

Hi to All:

I'd like to hint few things here. But first I'd want to take a moment to salute all the people that are making this tool such great, specially the developers involved and @Ish Bosamiya (ish_bosamiya) :

1º - @Campbell Barton (campbellbarton) : Im not totally sure if you're taking a final decision with your last statement. If that's the case, then we could gladly jump to point 2 :-D .- if not, all depends on how much time are you planning to start migrating the actual modifier system to a node based. Note that I'm not asking for a timeframe that you probably aren't willing to give easily as there are a lot of previous (and more crucial tasks to solve before). If we're talking about 1+ year, I'd prefeer to include this mod in the master branch as I think its:

-"free" and quality work that increases the tool value meanwhiling it's consuming a reasonabily low time from core developer effort to deal with and..


- It could be later included on the new node system (I'm speculating that should be easier to convert an actual, well tested modifier than a new node based on this subject)

Those are my two cents.

2º - As I'm trying my hand fiddling with the code, I found that this patch isn't applicable anymore to the master branch. I guess it's because MOD_join_triangles.c still includes Derived Mesh code (lines from 166 to 170). I got rid of these and worked like a charm on the last build. Question is: ¿It's actually relevant to keep this working with the latest master branch or are we definitively shutting down the engines here?

Thank you all for your time. Cheers!

Before getting into code review or looking into details I'd like to see example uses cases for this modifier.
Otherwise we could:

  • Postpone until nodal modifiers are supported.
  • Make this an optional post-process for the decimate modifier. -----

All BMesh operators _could_ be made into modifiers, however the modifier system isn't designed for constructive modelling (at least not with many fine grained operations).

Hi Campbell,

Could you kindly elaborate how the modifier system isn't designed for constructive modelling please?

Does it mean, the advised workflow would be to apply modifiers whenever possible?

Or that it is not advisable to have large stacks of modifiers on scene objects because Blender isn't meant to handle them?

Kind Regards,

@Andrew Zhou (dodeqaa) for every constructive modifier it's currently converting all data to BMesh and back - even if all of the modifier's in the stack operate on BMesh data types.