0
$\begingroup$

I have geometry node setup with proximity node for plane, and when distance is zero between cube and plane then points of plane to go from position 1 to position 2. Attached is a node setup and output. Here i would like to consider cube volume for distance calculation. When plane points are inside cube then distance is zero and so plane points go correctly from position 1 to position 2. Last image is the expected result.

Third Image: It is considering faces of cube for distance calculation rather than volume of cube which is problem where distance changing based on faces of cube.

Fourthimage : If original plane points are inside cube then consider distance is zero and plane points goes from position 01 to position 02.This is expected result.

Finally how to make points are inside or outside calculation to drive mix node?

Nodesetup Actual setup

Problem issue

Expected Expected

$\endgroup$

3 Answers 3

2
$\begingroup$

To know what's "inside" of a mesh, we need to check the normals of that mesh:

enter image description here

I compare the nearest normal with the (normalized) vector toward the nearest position. If these two vectors are going in the same direction, as revealed by the sign of their dot product, then the sampled vertex lies inside the target. Otherwise, it does not.

We can group this up, and then mix from proximity to 0 on the basis of its output to make sure that our vertices inside the target return a distance of 0:

enter image description here

Note that the very concept of "inside" requires that we target a manifold mesh, and that the direction of its normals matter.

$\endgroup$
1
  • $\begingroup$ Perfect & quick solution! $\endgroup$
    – Chris
    Commented Aug 18, 2023 at 10:00
0
$\begingroup$

Maybe multiplying a Raycast after the Map Range will help you:

enter image description here

$\endgroup$
0
$\begingroup$

I'm new to blender and still learning geometry nodes in the blender and after seeing your question, I think it might be good to try it. I came much close to the solution, but I'll try and keep the correct one soon. Here's the answer from me for now. Here's the image of the 2 geometries before adding Geometry node : enter image description here enter image description here

And here's the picture of the Geometry node for the square

$\endgroup$

You must log in to answer this question.

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