View Full Version : Intersecting a ray and an object

11 November 2006, 02:26 AM
Here's my situation. I would like to define an x,y coordinate, and then shoot a ray downwards along z (or an x,z coordinate, depending on whether y or z is up), and see where it intersects with the actual physical mesh of an object. Is there some sort of intersect ray command that would let me do this? Something where I can specify an x, a y, a direction, and it will retunr me the z where the ray intersects with the mesh?

- Neil

11 November 2006, 03:10 AM
from the highend site....this seems to come up frequently....

11 November 2006, 06:47 AM
Thanks for the info, but do you know of a version that runs on Linux? This seems to be windows only. Or perhaps an all melscript method?

- Neil

11 November 2006, 08:46 AM
i don't think you'll find a mel-only-solution because it's quite expensive to calculate ray-intersection. it's quite easy to code it in the api - just one command-call will give you everything (point, normal, etc.) - and the plugin available on highend is exactly that command made available as an command/node.
maybe you'll give it a try and ask the guy who released that plugin if he has a linux version for you or he'll give you the code. ( )
good luck!

12 December 2006, 02:02 PM

I am wondering if someone can please help me to get this plugin to work in Maya 8.0? I can not run it, nor v7 in Maya 7.0 nor v8 in Maya 8.0. However, i have found another version at highend3d forums, ( which works, but unfortunately it is compiled only for Maya 7.0.

The output i get when trying to load plugin in Maya 8.0 is:

loadPluginCallback "C:/Documents and Settings/Nejc/Desktop/RAYiNTERSECT/8/rayIntersect.mll" "plug-in";
// Error: file: C:/Program Files/Alias/Maya8.0/scripts/others/pluginWin.mel line 593: Unable to dynamically load : C:/Documents and Settings/Nejc/Desktop/RAYiNTERSECT/8/rayIntersect.mll
The specified module could not be found.
// Error: file: C:/Program Files/Alias/Maya8.0/scripts/others/pluginWin.mel line 593: Access is denied.
// Error: file: C:/Program Files/Alias/Maya8.0/scripts/others/pluginWin.mel line 593: Access is denied.
(rayIntersect) //
// Result:1//

Joojaa at higend3d suggested that visual C runtime libraries were missing. So i installed those (C++, i can not find C only), but with no luck.

Any ideas what might be wrong?

Thank you in advance!

07 July 2007, 02:29 AM
here is rayIntersect compiled for maya 8.5 linux (fedora core5) makefile is included

CGTalk Moderation
07 July 2007, 02:29 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.