denisT: As we can see the only problem is the casting mxs point3 to Vector3 and add the value to List. For some unknown reason max doesn’t allow …
Nice, thanks! 8x faster with no effort. updated the code in previous post Wonder if it is possible to skip maxscript loop over points at all and som…
josephjacir: or writing a better option. this one works better ( struct AutodeskOctree ( Points, IArray, Octree, fn MakeListOfType type_…
Not sure if it was the latest version, but anyway. Should be enough for tests Find similar vertex position in 2 objects 3ds Max SDK…
Yeah, seems like recursion performance penalty is way too big. But sometimes 2d uniform grid in enough for the task Time: 0.207sec. Mem: 1936L – Poi…
thanks! it helps indeed, I also removed tree_node_pt since it doesn’t affect the performance at all KDTree build. Time: 0.226sec. Mem: 663336L Poin…
Replacing the arrays with value type makes it even slower because of the constant random memory access I guess. So it looks like we’re out of options …
you can use these patterns combined with (dotNetClass “System.Text.RegularExpressions.RegEx”).Replace to remove the comments local block_comment = “\…
Thanks for testing it! Should have mentioned that I only borrowed the build algorithm idea and did my tests in mxs version of kdtree. And this non-rec…
Klvnk: as what exactly Twice as fast as its recursive counterpart. I’m talking about tree building performance only
Klvnk: trees like recursion and mxs doesn’t funny thing is that even non-recursive tree building algorithms are only twice as fast
denisT: you have to use some “tree” algorithms. I once made a maxscript kdtree for a nearest neighbor search, but it was terribly slow to build a…
what if submaterial is also a multimaterial?
DaveWortley: otherwise it flashes on taskbar… same story win7x64