# 3D intersect

Hi all,

I’m playing around with Intersect (3D Mesh Ray) and I wondered if it was possible to intersect a 3D mesh with another one (instead of a simple line)…

I tried with arbitrary point to get vertices from a DX9 cylinder but intersect node doesn’t take Z axis in account.

Thanx a lot!

no, there is no function to intersect it with another mesh. but you can intersect it with many lines if you like, the input for transforms is spreadable.

ahh, this the reason why the intersect nodes only output 1 hitpoint, because it’s supposed to be spreadable by the transforms?

because the way it is now it doesn’t seem optimal to me- most meshes are solids in a way, so every ray should hit at least two points.

a valid solution would be to output the point which get hit first in terms of raylength, not in terms of surface order in the mesh.

Ok tonfilm, thanx.

@Velcrome: Wouldn’t your problem be solved with intersect (3D mesh subset ray)?

a valid solution would be to output the point which get hit first in terms of raylength, not in terms of surface order in the mesh.

looking at the help patch for Intersect (3D Mesh Ray) it seems to me that it works like that.
the hitpoints are chosen in a way, that they have a minimal distance to the lower end of the line.

not if the mesh in question is rotated

really?! on my place the intersection point is always the one nearer to the lower end of the line. independant of the rotation of the meshes.

when I use spreaded lines, only a few of them seem to intersect with the spreaded mesh, whereas many lines obviously cross them…

What’s wrong?

Intersect.rar (5.4 kB)

the intersection output referes to the mesh transform input. you see there which mesh was intersected.
to intersect a spread of meshes with a spread of lines, you have to input all possible combinations of the transforms. like a Cross (2d) does with values.

what your patch does right now is, it checks if the first line intersects the first mesh, the second line intersects the second mesh, the third the third and so on…

I see… I thought intersect was meshes and lines indices free. So if I want to be sure my 16 lines to fully intersect with meshes, I would actually have 16 lines*64 meshes…

Thanks a lot tonfilm, that’s clearer now.