Serejah
@serejah
New Member
Joined: Feb 14, 2024
Topics: 34 / Replies: 1221
Reply
RE: [maxscript] KDTree. Can we make it faster?

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 …

4 years ago
Forum
Reply
RE: [maxscript] KDTree. Can we make it faster?

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…

4 years ago
Forum
Reply
RE: [maxscript] KDTree. Can we make it faster?

josephjacir: or writing a better option. this one works better ( struct AutodeskOctree ( Points, IArray, Octree, fn MakeListOfType type_…

4 years ago
Forum
Reply
RE: [maxscript] KDTree. Can we make it faster?

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…

4 years ago
Forum
Reply
RE: [maxscript] KDTree. Can we make it faster?

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…

4 years ago
Forum
Reply
RE: [maxscript] KDTree. Can we make it faster?

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…

4 years ago
Forum
Reply
RE: [maxscript] KDTree. Can we make it faster?

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 …

4 years ago
Forum
Topic
Forum
Replies: 66
Views: 139
Reply
RE: MAXScript find and remove specified string from text file

you can use these patterns combined with (dotNetClass “System.Text.RegularExpressions.RegEx”).Replace to remove the comments local block_comment = “\…

4 years ago
Forum
Reply
RE: Do 2 BoundingBoxes Intersect

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…

4 years ago
Forum
Reply
RE: Do 2 BoundingBoxes Intersect

Klvnk: as what exactly Twice as fast as its recursive counterpart. I’m talking about tree building performance only

4 years ago
Forum
Reply
RE: Do 2 BoundingBoxes Intersect

Klvnk: trees like recursion and mxs doesn’t funny thing is that even non-recursive tree building algorithms are only twice as fast

4 years ago
Forum
Reply
RE: Do 2 BoundingBoxes Intersect

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…

4 years ago
Forum
Reply
RE: Set all material's diffuse to white

what if submaterial is also a multimaterial?

4 years ago
Forum
Reply
RE: Bring Max Process to Front

DaveWortley: otherwise it flashes on taskbar… same story win7x64

4 years ago
Forum
Page 30 / 84