MaxScript/Python for Detecting Stretched/Distorted UVs in 3ds Max

MaxScript/Python for Detecting Stretched/Distorted UVs in 3ds Max

razan_ns_hussein
Observer Observer
836 Views
4 Replies
Message 1 of 5

MaxScript/Python for Detecting Stretched/Distorted UVs in 3ds Max

razan_ns_hussein
Observer
Observer

Hi 3ds Max Scripting Community,

I need a MaxScript/Python solution to identify objects with UV distortion in 3ds Max, similar to the blue and red colors shown in the UV Editor during area distortion visualization.

Details:

  • 3ds Max Version: 2021

Objective: Detect and print the names of objects with UV distortion indicated by blue and red colors in the UV Editor.

Your help is greatly appreciated! If you have a script or tips how to write one, please share.image.png

Thank you!

0 Likes
837 Views
4 Replies
Replies (4)
Message 2 of 5

RGhost77
Advisor
Advisor

Hello @razan_ns_hussein !
Do you find any solution?


Royal Ghost | veda3d.com
0 Likes
Message 3 of 5

denisT.MaxDoctor
Advisor
Advisor

@RGhost77 wrote:

Hello @razan_ns_hussein !
Do you find any solution?


This is not a complicated thing. What is distortion? Two possible criteria come to mind:
1. The ratio of map face and geo face areas is different than average.
2. The ratio of perimeter (sum of face edge lengths) of map and geo faces is different.

 

In both cases, we need to calculate the ratio for all faces, find the average, and find the maximum distance from the average. All faces can then be arranged by their ratio distance from the average.
If the ratio is the same as the average, then there is no distortion, it is represented as 0. If the ratio difference equals the maximum, it is represented as 1.

 

 
 

 

0 Likes
Message 4 of 5

RGhost77
Advisor
Advisor

Good point.

But interesting, is the way to access to color map of Area Distortion mode somehow?
It's look like vertex color map but with no access.


Royal Ghost | veda3d.com
0 Likes
Message 5 of 5

denisT.MaxDoctor
Advisor
Advisor

I don't think it's easily accessible from any of the channels. The data is stored in the internal buffer and rendered on-the-fly, I suppose.

0 Likes