Intersect bug in max


run across some strangeness with max

-- run

delete objects;
pobj = convertToPoly(plane dir:[0,1,0]);
r = point pos:[0,50,2] dir:[0,-1,0] cross:off axistripod:on;

-- select the border edges of the plane and shift scale to add a ring of faces  then run....

mobj = convertToMesh pobj; 
intersectRay mobj (ray r.pos r.dir);

-- delete the new extruded Faces then run....

intersectRay mobj (ray r.pos r.dir);

do you get the results

(ray [0,0,2] [0,1,0])



I can confirm the bug. Tested on max2020. Tomorrow will test on 2022.


I remember this bug. It takes place for polyobjects. There should be another thread on this subject on this forum

… or on Area maybe


if you shift newly extruded faces out in ray direction it will work too.
the issue is that new faces overlap the original and faced backward to the ray.


RayMeshGridIntersect has a #doublesided option, and hopefully it can work it this case.


Here are a couple of related threads:


it’s not just editable poly though, it effects editable mesh too.


pobj = convertToPoly(plane dir:[0,1,0]);


mobj = convertToMesh(plane dir:[0,1,0]);

and repeat without the additional converttomesh() !

and you still get the same problem. It’s odd as the ray is projected onto the original geometry, not the new extrusion. You can detach it and it works then reattach it and it breaks again :confused:

there are situations where this happens with the new geometry can be intersected but the original geometry can’t. My guess is theres a fault in the ray vs kdtree code they are using when things are planar or how the kdtree is constructed deciding the old geometry can be ignored :confused: .


maybe a forcing some “smart - extra - update” can help?
forcing some notifications?

rebuild normals? invalidate caches?


you can add a noise modifier with z set to 0.001m that works :face_with_raised_eyebrow:


of course it has to be done automatically by the system … but who knows? maybe they forgot or missed something? :stuck_out_tongue_winking_eye:

as I remember in version something 2018-2019, they changed the intersectRay method… the way of face processing


I’ve got plenty of ray intersect stuff I can use instead but it’s not my issue as such :slight_smile:


I wrote my own intersection… built-in was too slow for some of my tasks


and any fix from autodesk is not going to be back dated :wink:


I don’t think we should expect any improvements in this area… you just have to learn to live with these shortcomings :sunglasses:


Ha ha ha… believe it or not, noise seems to do wonders. Life takes a turn for the better


there’s quite a few ways to duplicate this issue, drag shift a face (poly or mesh) to create a cloned face in the local xy plane will do the trick! how was this never noticed ?