[Closed] MeshProjIntersect….?
Question #1 (probably for Bobo):
Is the “MeshProjIntersect” interface a new addition in MXS 8? It appears to be, but it does not have the symbol/notation in the docs.
Question #2 (for anyone who knows):
What is this feature for? Is it a replacement/successor/extension to the “RayMeshGridIntersect” interface added in MXS 6?
The docs are pretty brief about both, and I’ve never really used either interface (I’m developing for Max 5). There is a mesh scanning process used in my script that I’ll need to accelerate before I finish it, but some replies I read in the Autodesk MaxScript forum (about a year ago) regarding “RayMeshGridIntersect” scared me away from moving to MXS 6 to use it. I remember the comments suggesting that this voxel-based interface was not entirely finished/stable/full-featured…?
The addition of the “MeshProjIntersect” interface makes me wonder if this is sort of a successor/replacement…
I’d also like some more information on both MeshProjIntersect and RayMeshGridIntersect. Specifically, how do they differ and when would you use one versus the other, and how exactly do you determine the best grid size when using RayMeshGridIntersect?
The example added to the RayMeshGridIntersect entry definitely helps to understand how to use it, but like John, I’m not clear about MeshProjIntersect and whether or not it’s meant to replace RayMeshGridIntersect.
The following quotes were taken from a thread in the Autodesk MaxScript forum regarding the MeshProjIntersect & RayMeshGridIntersect interfaces:
Borislav Petrov wrote:
I have no idea where this interface (MeshProjIntersect) came from. It might be something internal related for example to the Projection modifier and normal maps rendering, but I might be wrong. It appeared on the list of interfaces and got documented, but I don’t know whether it is usable. Please ask Larry.
The RayMeshGridIntersect interface on the other hand has been FIXED in Max 8 and returns correct Barycentric coordinates etc., so it could be used successfully to accelerate ray intersections in place of IntersectRayEx…
John Swafford wrote:
So was the Barycentric coordinates issue the only known bug with RayMeshGridIntersect in Max 6? As far as you know, is the rest of it functional/stable?
Borislav Petrov wrote:
There were multiple broken methods. I reported all bugs and then had to test the fixes as MXS QE, so to the best of my knowledge the interface is functional now.
The following e-mail responses are from Larry Minton at Autodesk regarding the MeshProjIntersect interface:
John,
I forwarded your message to the developer that added that interface.
Unfortunately, I know nothing about it.
Larry
John,
This is all he had to say…
The MeshProjIntersector was designed for projection mapping, so given a
point on mesh A, and given a second mesh B and a cage, the intersector
will find the projected point on mesh B corresponding to the point on
mesh A. Hence it’s a “projection” intersector.
You can see an example of usage in the RTT script.
The intersector also has regular ray/mesh intersection routines, but
honestly I can’t remember if, or how well, they work.
Larry
FYI: Another reply from Larry mentions the “UI\MacroScripts\Macro_BakeTextures.mcr” file as an example of using the MeshProjIntersect interface. The file has been around since Max 5, but this usage is obviously a revision for Max 8.
-John