4
$\begingroup$

Related to this question, I've tried to understand how triangles are interpreted in Blender.

Doing these experiments, the result is a bit surprising and I'd want to know why.

Starting from a quad, I obtain this (see gif below): kind of convex hull is calculated and the faces are overlapping only for first and third vertex in fan point of view:

enter image description here

But if we test that for a polygon with more than 4 vertices, it does not happen anymore:

enter image description here

Surely, I've not tested it for all configurations (all vertex amount), but it seems to be a rule.

Why? And, by the way, how this behavior has a link to my original question?

In hope the title of this new question is good enough, this time, thanks for any information.

$\endgroup$
1
  • 1
    $\begingroup$ Title skills over 9k. $\endgroup$
    – Leander
    Commented May 8, 2017 at 19:45

1 Answer 1

3
$\begingroup$

I showed a similar example to your first before. The quad is always cut from vert 0 to vert 3, while n-gons are triangulated using a better algorithm, possibly because the possibility of concave faces is more likely.

You will also find that an n-gon is triangulated dynamically as you alter it.

editing an ngon

I expect the tri/quad drawing code was left alone when n-gon support was added. Maybe it could be suggested that the work being done for 2.80 could include the use of same drawing algorithm for all faces.

$\endgroup$
2
  • 1
    $\begingroup$ I suspect that the tri/quad drawing code was left alone in case changing it interfered with proper display of files created with legacy versions. $\endgroup$
    – brasshat
    Commented May 9, 2017 at 6:02
  • $\begingroup$ FYI, finally found BM_face_calc_tessellation in bmesh_polygon.c does the job. Simple and hard coded for 3 and 4 (depending on a flag) vertices and much more complex for > 4... (@brasshat) $\endgroup$
    – lemon
    Commented May 9, 2017 at 12:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .