Intersect bug in max


#1

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

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

?


#2

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


#3

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

… or on Area maybe


#4

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.

image

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


#5

Here are a couple of related threads:


#6

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

change

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

to

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: .


#7

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

rebuild normals? invalidate caches?


#8

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


#9

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


#10

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


#11

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


#12

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


#13

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


#14

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


#15

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 ?