"Compute Mesh Intersecting Faces" Omnigraph node sends a non-pairable list of triangles faces

Hello,
I am a bit confused about how to use Compute Mesh Intersecting Faces
The problem is that face0 and face1 attribute come with non matching list size, so that the pairs can be obtained.
Below is the image of the action graph. how can I get the pair of triangles in intersection?

Let me ask the dev team for some help on this.

1 Like

Hello Richard, Thank you
I was also wondering if there is way to access Physx API from inside a C++ omniverse extension? I am guessing that this node is making a call to PxMeshQuery::findOverlapTriangleMesh, is it not? I was thinking I can use it to get the pairs.
Because now I have to loop over all the triangles and test for intersecting pair

The documentation page you’re linking explains how to obtain the pairs.
Assuming that you’ve set input overlap pairs to just a pair of prims for example.

  • overlapPairs0 = ['/Prim1', '/Prim2']
  • overlapPairs1 = ['/Prim3', '/Prim4']

This node will test:

  • '/Prim1' <–> '/Prim3'
  • '/Prim2' <–> '/Prim4'

The Face Indices output is a prims bundle containing results for all the overlap pairs.
In this case you will have two results

  • prim0 (that refers to Prim1 vs Prim3) check
  • prim1 (that refers to Prim2 vs Prim4) check.

You can extract a single result, for example prim1, to check intersection results of Prim2 with Prim4, using the Extract Prim node with prim1 path.

The Extract Prim node will give you faces0 and faces1 arrays.

Assuming for example the following content for them:

  • faces0 = [0, 2, 4]
  • faces1 = [2, 5, 7]

This output indicates that:

  • face at index 0 of '/Prim2' intersects face at index 2 of '/Prim4'
  • face at index 2 of '/Prim2' intersects face at index 5 of '/Prim4'
  • face at index 4 of '/Prim2' intersects face at index 7 of '/Prim4'

There is a known issue when the same face intersect other faces multiple times.
For example if face index 5 intersects 3 faces (0,4,2) on the other side, the node will report

  • faces0=[0,4,2]
  • faces1=[5]

instead of

  • faces0=[0,4,2]
  • faces1=[5,5,5]

This issue will be fixed in next release

1 Like

Thank you for your explanation.
I think I am facing the problem you mentioned because I am getting a non-matching list size for faces0 and faces1. looking forward for the next release.