Yes. I could in theory use an octree to find the closest vertex and then only search triangles which are closer than that, but I haven’t implemented i…
drdubosc: Great! … The whole discussion of how to roll your own hasn’t been a waste of time; far from it, for me, anyway. Still can’t script any be…
Good link, very useful, thanks! drdubosc: BTW, I’ve been having a fair amount of luck with MaxScript: MeshProjIntersect. 1st set up the data …
Caprier: Second, if the projection misses the triangle, then try an orthogonal projection on each of the three edges. This is the part I missed. I d…
What do you think of this: Input: Mesh M and query point Q Output: Point P on M with minimal distance PQ Pseudocode 0: mindist = MAXFLOAT; closestP…
Thanks a lot for your interest, guys! Maybe we first can ignore the “efficient” bit and settle on an algorithm that is guaranteed to find the closest…
Interesting idea! One could even try to use Texture Baking for this… But since surface brightness is also dependent on angle between surface and ligh…
Hi Bobo, Bobo: Hi Martin, Check out this thread from a couple of days ago – I posted a demo scene with the code inside a Scale Scripted Contro…
Caprier: As I see it, the workflow would be: 1- find the closest vertex. Caprier, thanks a lot for the suggestion and code. First searching for…
Thanks Neil! Unfortunately, the trick here is in which direction to shoot the ray. One could use the pivot point, or the center of mass, center of bou…
FWIW, there is also the nearestPathParam() function that you can call on a spline with a point3 and it will give you the interpolation value between 0…
Awesome, Adam. Thanks a lot for posting this! – MartinB
Look into the units struct. Specifically the units.decodeValue() function. From the MXS online help: units.decodeValue <string> Parses <s…
I know three ways, all of them fairly hacky IMHO: You can restore a previously generated config file of the OBJ importer/exporter. It’s the file ob…