1
$\begingroup$

I distrubuted objects with instancer and the loop function see below:

enter image description here

As we can see the problem is they are overlapping occasionally. Of course, the more object I distribute the more likely they overlap. My first idea was to use the Intersect Plane Plane node but I didn't know how to incorporate it into the graph. To avoid overlapping we should also measure distance between objects to limit the calculations (only adjacent objects matters) because otherwise the node graph could be very slow. So the soulution might be very comlex.

The current graph can be seen below: enter image description here

$\endgroup$
1
$\begingroup$

I don't have a solution that is not computationally expensive. But if performance is not a big factor in your node tree, here is method you can use.

Append Condition

You create an empty vector list, at each iteration, you construct a KD tree from this list, generate a a random vector, check if there are any vectors in the vicinity of radius equal to circles diameter, if there are, don't append it, otherwise, append the random vector:

Append Condition

Blend File:

$\endgroup$
  • $\begingroup$ Can you share the blender scene file? I tried to reproduce your solution but something not right for me. $\endgroup$ – Prag Mar 4 '18 at 17:44
  • $\begingroup$ @Prag Sure, I added the blend file. $\endgroup$ – Omar Emara Mar 4 '18 at 18:24
  • $\begingroup$ I tried to utilize your soultion but I failed with real cylinder objects. As you can see the graph here (ANGraph) this results overlapping cylinders (3D View). Furthermore a bit confusing that your input attriubte is named to diameter but it is connected to the radius attr of the Find Points in Radius node. $\endgroup$ – Prag Mar 13 '18 at 19:25
  • $\begingroup$ @Prag Your multiply node that goes into the diameter is set to 1, set it to 2. The radius input in the Find Points in Radius is the radius of the search circle, and since we are testing collision between two circles, that is, two radii, that is, a diameter. Then the radius is the diameter. Don't worry yourself with naming. $\endgroup$ – Omar Emara Mar 13 '18 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.