2
$\begingroup$

(Using Blender 3.6.8)

Analysis

Trying to understand how the Density socket of the Distribute Points on Faces node behaves, I wrote the following basic GeometryNodes graph, derived from the question "Noise texture to control scatter density in geo nodes":

GN graph - By Face Corner Off

1. The Switch node connected to the By Face Corner input parameter is controlling whether the input ID is referring to a Face index, or to a Face Corner index.
2. If By Face Corner is False, the Density is captured per Face. Consequently it is the same for all the Face Corners of the chosen face. For the demonstration, it is set high compared to unselected faces. The figure above is illustrating the expected behaviour for face 1 of a 2x2 Grid.
3. If By Face Corner is True, the Density seems to be defined per Face Corner, in agreement with the documentation of the Selection socket stating "The selection of which face corners should be considered for point distribution". The figure below is illustrating the expected behaviour for face corner 1 (i.e. bottom right corner of face 1). However, it is to notice that fewer points are distribute per unit area.

GN Graph - Face Corner 1 selected


Problem (?)

If face corner 2 is selected, the output is:

GN Graph - Face Corner 2 selected

I was expecting a triangular shape as for face corner 1, not a quad. It seems that odd face corner indices are producing triangular shapes, while even face corner indices are producing quadrangular shapes. Inserting a Triangulate node just after the Grid node shows that in this case, the result is the same whatever the face corner selected inside the same face.


Question

How to interpret Face Corner index manipulated by Distribute Points on Faces node for quadrangular meshes ?


Resources


Follow-up

An other shape made with a Curve Circle node with 7 vertices followed by a Fill Curve node with Mode set to N-gons shows an unpredictable (?) behaviour:

Results for each Face Corner of a 7-gons

1. The displayed number on the right is the selected Face Corner index.
2. The cube is put at the selected Face Corner position.

Results for each Face Corner of a 7-gons with Poisson

Changing the Distribution Method from Random to Poisson Disk does not seem to modify significantly the heterogeneity between face corners.

$\endgroup$
1
  • $\begingroup$ I haven't run through all the options for myself yet, but this sure looks like bad logic somewhere, which, while it may not be particularly harmful in itself, may be symptomatic of something that is. I'm guessing, once exhaustively tested, it should become a bug report $\endgroup$
    – Robin Betts
    Commented May 8 at 17:52

1 Answer 1

1
$\begingroup$

(Using Blender 3.6.8)

From developers answers and some experiments, the conclusion is that it is not a bug, merely a side effect of triangulation of mesh faces.

In what follows, analysis is detailed in a first part with some guidelines. Information from the developers are pasted at the end.


Analysis

The process seems to be as follows:

  • Faces are triangulated.
  • Density and Selection fields input in the Distribute Points on Faces node are "transferred" from the original face corners to the vertices of these triangles.
  • Points are distributed by sampling once each of these triangles.
  • The Density for a triangle is the average of the Density of its 3 vertices. The Density of a not selected face corner is 0.

The next picture illustrates the case of a single N-gons with 7 face corners.

Results

1. (top left sub-figure) This is the reference configuration with Density set to 10 for all face corners. Whatever the triangle, its Density is thus 10 also. Consequently, a dense uniform distribution is achieved.
2. (top centre sub-figure) This shows the face corners indexing (as "Cn") and the (cached) triangles indexing (as "Tn").
3. (top right sub-figure) This configuration is such that Density for all face corners except C0 is lowered to 0.1. As C0 is only a vertex of T1, T2 to T5 are sparsely sampled with a Density of 0.1. And T1 is less sampled than the reference configuration because its Density is 10.2/3.
4. (middle left sub-figure) This configuration is such that Density for all face corners except C1 is lowered to 0.1. As T4 is the only triangle without C1 as one of its vertices, it is the only triangle sparsely sampled with a Density of 0.1. All other triangles are sampled with a Density of 10.2/3.
5. (remaining sub-figures) Density of face corner C2 to C6 is successively kept to 10, while it is lowered to 0.1 for all the others. These sub-figures show that only triangles connected to this face corner are highly sampled with points.
(Side note: it is to notice that the sampling of a triangle looks the same on all sub-figures. This is probably because the seed of the Random Number Generator to draw the associated point cloud is based on the (cached) triangles index).

Guidelines

Based on the desired effect, Selection and Density by Face or by Face Corner domain might be considered. An Evaluate on Domain node is useful to experiment, as follows:

Face domain Face Corner domain


From the developers

Replies on TICKET-121608:

Gerstmann Bradley: The issue stems in face corner, which I assume is a limitation just like how a mesh may be triangulated. If you triangulate it you will find the result being more restricted.

enter image description here

enter image description here

According to Iliya Katushenock:

Distribute Points of Faces node use face tris as way to distribute points of surface. This is correct that if there is no any density there will no points. If you select just one face corner, there is some density. And this mode do not use density as way to control distribution of points, if you want more complicated one, you can switch node option.

For user requests and feedback, please use other channels: https://developer.blender.org/docs/handbook/communication/user_feedback/

For more information on why this isn't considered a bug, visit: https://developer.blender.org/docs/handbook/bug_reports/not_a_bug/

$\endgroup$
0

You must log in to answer this question.

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