Notifications
Clear all

[Closed] Align UV script optimizations

Could you post an example of the scene you usually work with? (preferably MAX 2020 version). I need to see the type of data you have. How best to optimize depends on it.

It’s easy not to use a snapshot for a mesh, as well as any conversion to mesh geometry at all. I do this in order to use the methods of meshop mapfaces to elements that are not part of polyop.
I assume that after improving the code and algorithms, we can increase the performance up to 4 times continuing to use only pure maxscript.

Here is an example file.
Katwijk.max (25.9 MB)

You can ignore the roofs, only the walls are relevant.

@Serejah I did a quick test and it seems fast, but I’m not sure how fast. I only tried a small portion of the example file. It was faster than my original script anyway.

I did a test in Blender, which is the source app for the buildings, and it did it in about 4 min 45 sec. I first clicked left, and then bottom. Maybe it could do it twice as fast if there was a button for bottom left align, but there’s not.

I’ve made the test – do all using c++ :
roofs :
CPP SDK elements:22610 time:205

walls:
CPP SDK elements:137464 time:4315

the time in msec… it definitely beats the Blender

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

I think that is possible to make pure MXS version which can do the job for about 40-60 sec

not bad for 131391 uv elements

walls are 137464 elements… what I found

Very nice
I guess I will have to learn a bit more to progress further
@denisT What’s your opinion on python in Max?

Most likely your number is more correct. I just copy pasted uvs to mesh and used MNMeshElements to check the count. And maybe it isn’t a valid method at all.

Oh wow, that would still be fantastic! So there is still reason for me to dig deeper

Serejah,
do you remember that MXS algorithm to find all mesh geom elements? You already found it once on this forum…

Page 3 / 4